next-i18next-static-site 2.0.0 → 2.1.1

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 +17 -4
  2. package/package.json +14 -13
package/README.md CHANGED
@@ -55,13 +55,13 @@ NEXT_PUBLIC_I18N_DEFAULT_NAMESPACE=common
55
55
  Additional [i18next options](https://www.i18next.com/overview/configuration-options) can be set with `NEXT_PUBLIC_I18N_OPTIONS`:
56
56
 
57
57
  > Note:
58
- > Calling functions like `parseMissingKeyHandler` won't work within the .env file, use <I18nProvider i18n={i18nOptions} /> instead. See [example](https://github.com/xairoo/next-i18next-static-site/blob/main/examples/web-ts/pages/_app.tsx).
58
+ > Calling functions like `parseMissingKeyHandler` won't work within the .env file, use `<I18nProvider i18n={i18nOptions} />` instead. See [example](https://github.com/xairoo/next-i18next-static-site/blob/main/examples/web-ts/pages/_app.tsx).
59
59
 
60
60
  ```
61
61
  NEXT_PUBLIC_I18N_OPTIONS={"debug": true}
62
62
  ```
63
63
 
64
- > Adding the same option keys within <I18nProvider i18n={i18nOptions} /> will replace the values from the .env
64
+ > Adding the same option keys within `<I18nProvider i18n={i18nOptions} />` will replace the values from the .env
65
65
 
66
66
  Add your locales like that:
67
67
 
@@ -118,6 +118,14 @@ const App = function ({ Component, pageProps }) {
118
118
  namespaces,
119
119
  defaultNamespace,
120
120
  locales,
121
+
122
+ // Additional options, not required.
123
+ // https://www.i18next.com/overview/configuration-options
124
+ debug: true,
125
+ parseMissingKeyHandler: (key) => {
126
+ console.log("Parsing missing key:", key);
127
+ return <span className="error">{key}</span>;
128
+ },
121
129
  };
122
130
 
123
131
  return (
@@ -151,5 +159,10 @@ export default function Home() {
151
159
 
152
160
  ## Online Example at Cloudflare Pages:
153
161
 
154
- https://next-i18next-static-site.pages.dev/de
155
- Source: [examples/web](https://github.com/xairoo/next-i18next-static-site/tree/main/examples/web)
162
+ - Simple example:
163
+ https://next-i18next-static-site.pages.dev
164
+ Source: [examples/web](https://github.com/xairoo/next-i18next-static-site/tree/main/examples/web)
165
+
166
+ - MDX blog example:
167
+ https://next-i18next-static-site-example-mdx-blog.pages.dev
168
+ Source: [examples/web](https://github.com/xairoo/next-i18next-static-site/tree/main/examples/web-mdx-blog)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-i18next-static-site",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "i18next solution for static sites build with Next.js (static HTML export / next export)",
5
5
  "homepage": "https://github.com/Xairoo/next-i18next-static-site",
6
6
  "bugs": {
@@ -40,25 +40,26 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/js-cookie": "3.0.6",
43
- "@types/react": "19.0.2",
44
- "@types/react-dom": "19.0.2",
45
- "eslint": "9.24.0",
43
+ "@types/react": "19.2.14",
44
+ "@types/react-dom": "19.2.3",
45
+ "eslint": "10.0.3",
46
46
  "eslint-config-custom": "*",
47
- "i18next": "24.2.0",
47
+ "i18next": "25.8.18",
48
48
  "js-cookie": "3.0.5",
49
- "next": "15.1.3",
50
- "react": "19.0.0",
51
- "react-i18next": "15.2.0",
52
- "release-it": "17.11.0",
49
+ "next": "16.1.6",
50
+ "react": "19.2.4",
51
+ "react-i18next": "16.5.8",
52
+ "release-it": "19.2.4",
53
53
  "tsconfig": "*",
54
- "tsup": "8.3.5",
55
- "typescript": "5.8.3"
54
+ "tsup": "8.5.1",
55
+ "typescript": "5.9.3"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "i18next": ">=23.7.11",
59
59
  "js-cookie": ">=3.0.5",
60
- "next": ">=14.0.0",
61
- "react": ">=18.2.0",
60
+ "next": "^14.0.0-0 || ^15.0.0-0 || ^16.0.0-0",
61
+ "react": "^18.2.0 || ^19.0.0-0",
62
+ "react-dom": "^18.2.0 || ^19.0.0-0",
62
63
  "react-i18next": ">=15.2.0"
63
64
  },
64
65
  "dependencies": {