next-intlayer 3.5.5 → 3.5.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.
- package/README.md +6 -8
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -227,12 +227,12 @@ export default pageContent;
|
|
|
227
227
|
Access your content dictionaries throughout your application:
|
|
228
228
|
|
|
229
229
|
```tsx
|
|
230
|
-
// src/app/[locale]/page.
|
|
230
|
+
// src/app/[locale]/page.tsx
|
|
231
231
|
|
|
232
|
-
import { ClientComponentExample } from "@
|
|
233
|
-
import { LocaleSwitcher } from "@
|
|
234
|
-
import { NestedServerComponentExample } from "@
|
|
235
|
-
import { ServerComponentExample } from "@
|
|
232
|
+
import { ClientComponentExample } from "@components/ClientComponentExample";
|
|
233
|
+
import { LocaleSwitcher } from "@components/LangSwitcherDropDown";
|
|
234
|
+
import { NestedServerComponentExample } from "@components/NestedServerComponentExample";
|
|
235
|
+
import { ServerComponentExample } from "@components/ServerComponentExample";
|
|
236
236
|
import { type NextPageIntlayer, IntlayerClientProvider } from "next-intlayer";
|
|
237
237
|
import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
|
|
238
238
|
|
|
@@ -310,8 +310,6 @@ export const ServerComponentExample = () => {
|
|
|
310
310
|
> <img src={content.image.src.value} alt={content.image.value} />
|
|
311
311
|
> ```
|
|
312
312
|
|
|
313
|
-
For more detailed usage of intlayer into Client, or Server component, see the [nextJS example here](https://github.com/aymericzip/intlayer/blob/main/examples/nextjs-app/src/app/%5Blocale%5D/demo-usage-components/page.tsx).
|
|
314
|
-
|
|
315
313
|
## (Optional) Step 8: Internationalization of your metadata
|
|
316
314
|
|
|
317
315
|
In the case you want to internationalize your metadata, such as the title of your page, you can use the `generateMetadata` function provided by NextJS. Inside the function use the `getTranslationContent` function to translate your metadata.
|
|
@@ -379,7 +377,7 @@ Ensure your TypeScript configuration includes the autogenerated types.
|
|
|
379
377
|
|
|
380
378
|
{
|
|
381
379
|
// your custom config
|
|
382
|
-
include: [
|
|
380
|
+
"include": [
|
|
383
381
|
"src",
|
|
384
382
|
"types", // <- Include the auto generated types
|
|
385
383
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intlayer",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Internationalisation tool for Next.js applications. Declare your multilingual contant in the same lever than your component. Powered by TypeScript, declaration files.",
|
|
6
6
|
"keywords": [
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
],
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"webpack": "^5.96.1",
|
|
75
|
-
"@intlayer/chokidar": "^3.5.5",
|
|
76
75
|
"@intlayer/config": "^3.5.5",
|
|
77
76
|
"@intlayer/core": "^3.5.5",
|
|
77
|
+
"@intlayer/chokidar": "^3.5.5",
|
|
78
|
+
"@intlayer/dictionaries-entry": "^3.5.5",
|
|
78
79
|
"@intlayer/webpack": "^3.5.5",
|
|
79
|
-
"react-intlayer": "^3.5.
|
|
80
|
-
"@intlayer/dictionaries-entry": "^3.5.5"
|
|
80
|
+
"react-intlayer": "^3.5.6"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@types/node": "^22.10.1",
|
|
@@ -89,21 +89,21 @@
|
|
|
89
89
|
"tsc-alias": "^1.8.10",
|
|
90
90
|
"tsup": "^8.3.5",
|
|
91
91
|
"typescript": "^5.7.2",
|
|
92
|
+
"@utils/ts-config": "^1.0.4",
|
|
92
93
|
"@utils/eslint-config": "^1.0.4",
|
|
93
94
|
"@utils/ts-config-types": "^1.0.4",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"@utils/ts-config": "^1.0.4"
|
|
95
|
+
"intlayer": "^3.5.6",
|
|
96
|
+
"@utils/tsup-config": "^1.0.4"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"next": ">=14.0.0 <16.0.0",
|
|
100
100
|
"react": ">=16.0.0 <19.0.0",
|
|
101
|
-
"@intlayer/webpack": "^3.5.5",
|
|
102
101
|
"@intlayer/config": "^3.5.5",
|
|
103
|
-
"@intlayer/core": "^3.5.5",
|
|
104
|
-
"react-intlayer": "^3.5.5",
|
|
105
102
|
"@intlayer/dictionaries-entry": "^3.5.5",
|
|
106
|
-
"intlayer": "^3.5.
|
|
103
|
+
"intlayer": "^3.5.6",
|
|
104
|
+
"@intlayer/core": "^3.5.5",
|
|
105
|
+
"@intlayer/webpack": "^3.5.5",
|
|
106
|
+
"react-intlayer": "^3.5.6"
|
|
107
107
|
},
|
|
108
108
|
"engines": {
|
|
109
109
|
"node": ">=14.18"
|