next-language-selector 0.2.4 β†’ 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # next-language-selector
2
2
 
3
+ ![npm version](https://img.shields.io/npm/v/next-language-selector?color=3178C6&style=flat-square)
4
+ ![bundle size](https://img.shields.io/bundlephobia/minzip/next-language-selector?color=black&style=flat-square)
5
+ ![security score](https://socket.dev/api/badge/npm/package/next-language-selector?style=flat-square)
6
+ ![license](https://img.shields.io/npm/l/next-language-selector?color=gray&style=flat-square)
7
+
3
8
  A lightweight, configurable language selector for Next.js (App Router & Pages Router).
4
9
  Efficiently manages the `NEXT_LOCALE` cookie and works seamlessly with `next-intl` or any other i18n solution.
5
10
 
@@ -27,7 +32,7 @@ import { LanguageSelector } from "next-language-selector";
27
32
 
28
33
  const locales = [
29
34
  { name: "English", code: "en", flag: "πŸ‡ΊπŸ‡Έ" },
30
- { name: "Deutsch", code: "de", flag: "πŸ‡©πŸ‡ͺ" },
35
+ { name: "Deutsch", code: "de", flag: "πŸ‡©πŸ‡ͺ" }, // flags are optional
31
36
  ];
32
37
 
33
38
  export default function Footer() {
@@ -76,7 +81,7 @@ Use the `renderCustom` prop to take full control over the rendering while keepin
76
81
 
77
82
  To make sure Next.js detects the language from the cookie set by this component, update your `middleware.ts` or `proxy.ts`:
78
83
 
79
- ```typescript
84
+ ```tsx
80
85
  import createMiddleware from "next-intl/middleware";
81
86
  import { routing } from "./i18n/routing";
82
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-language-selector",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Configurable language selector for Next.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "peerDependencies": {
29
- "next": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
29
+ "next": "^14.0.0 || ^15.0.0 || ^16.0.0",
30
30
  "react": "^18.0.0 || ^19.0.0"
31
31
  },
32
32
  "keywords": [