@intlayer/docs 6.1.5 → 6.1.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/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +404 -173
- package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +262 -113
- package/blog/en/intlayer_with_next-i18next.mdx +431 -0
- package/blog/en/intlayer_with_next-intl.mdx +335 -0
- package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +463 -209
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +185 -71
- package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +36 -28
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
- package/dist/cjs/generated/docs.entry.cjs +32 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +32 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +2 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/component_i18n.md +186 -0
- package/docs/ar/intlayer_with_angular.md +2 -2
- package/docs/ar/intlayer_with_astro.md +246 -0
- package/docs/ar/intlayer_with_create_react_app.md +3 -2
- package/docs/ar/intlayer_with_express.md +2 -2
- package/docs/ar/intlayer_with_nestjs.md +2 -2
- package/docs/ar/intlayer_with_nextjs_14.md +2 -2
- package/docs/ar/intlayer_with_nextjs_15.md +2 -2
- package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ar/intlayer_with_nuxt.md +2 -2
- package/docs/ar/intlayer_with_react_native+expo.md +11 -20
- package/docs/ar/intlayer_with_react_router_v7.md +195 -241
- package/docs/ar/intlayer_with_tanstack.md +198 -272
- package/docs/ar/intlayer_with_vite+preact.md +9 -9
- package/docs/ar/intlayer_with_vite+react.md +7 -7
- package/docs/ar/intlayer_with_vite+vue.md +9 -9
- package/docs/ar/vs_code_extension.md +48 -109
- package/docs/de/component_i18n.md +186 -0
- package/docs/de/intlayer_with_angular.md +2 -2
- package/docs/de/intlayer_with_astro.md +246 -0
- package/docs/de/intlayer_with_create_react_app.md +2 -2
- package/docs/de/intlayer_with_express.md +2 -2
- package/docs/de/intlayer_with_nestjs.md +2 -2
- package/docs/de/intlayer_with_nextjs_14.md +2 -2
- package/docs/de/intlayer_with_nextjs_15.md +2 -2
- package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/de/intlayer_with_nuxt.md +2 -2
- package/docs/de/intlayer_with_react_native+expo.md +11 -20
- package/docs/de/intlayer_with_react_router_v7.md +193 -242
- package/docs/de/intlayer_with_tanstack.md +194 -266
- package/docs/de/intlayer_with_vite+preact.md +9 -9
- package/docs/de/intlayer_with_vite+react.md +9 -9
- package/docs/de/intlayer_with_vite+vue.md +11 -11
- package/docs/de/packages/vite-intlayer/index.md +3 -3
- package/docs/de/vs_code_extension.md +46 -107
- package/docs/en/component_i18n.md +186 -0
- package/docs/en/how_works_intlayer.md +1 -1
- package/docs/en/index.md +1 -1
- package/docs/en/intlayer_cli.md +1 -1
- package/docs/en/intlayer_with_angular.md +4 -4
- package/docs/en/intlayer_with_astro.md +246 -0
- package/docs/en/intlayer_with_create_react_app.md +4 -4
- package/docs/en/intlayer_with_express.md +3 -3
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_nestjs.md +2 -2
- package/docs/en/intlayer_with_nextjs_14.md +31 -5
- package/docs/en/intlayer_with_nextjs_15.md +31 -5
- package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
- package/docs/en/intlayer_with_nuxt.md +4 -4
- package/docs/en/intlayer_with_react_native+expo.md +46 -24
- package/docs/en/intlayer_with_react_router_v7.md +164 -211
- package/docs/en/intlayer_with_tanstack.md +166 -241
- package/docs/en/intlayer_with_vite+preact.md +12 -12
- package/docs/en/intlayer_with_vite+react.md +12 -12
- package/docs/en/intlayer_with_vite+solid.md +2 -2
- package/docs/en/intlayer_with_vite+svelte.md +2 -2
- package/docs/en/intlayer_with_vite+vue.md +12 -12
- package/docs/en/introduction.md +1 -1
- package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/en/packages/react-intlayer/useI18n.md +1 -1
- package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/en/releases/v6.md +1 -0
- package/docs/en/roadmap.md +1 -1
- package/docs/en/vs_code_extension.md +24 -114
- package/docs/en-GB/component_i18n.md +186 -0
- package/docs/en-GB/intlayer_with_angular.md +3 -3
- package/docs/en-GB/intlayer_with_astro.md +246 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
- package/docs/en-GB/intlayer_with_express.md +2 -2
- package/docs/en-GB/intlayer_with_nestjs.md +2 -2
- package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
- package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/en-GB/intlayer_with_nuxt.md +2 -2
- package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
- package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
- package/docs/en-GB/intlayer_with_tanstack.md +174 -248
- package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
- package/docs/en-GB/intlayer_with_vite+react.md +9 -9
- package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
- package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/en-GB/vs_code_extension.md +42 -103
- package/docs/es/component_i18n.md +182 -0
- package/docs/es/intlayer_with_angular.md +2 -2
- package/docs/es/intlayer_with_astro.md +246 -0
- package/docs/es/intlayer_with_create_react_app.md +3 -2
- package/docs/es/intlayer_with_express.md +2 -2
- package/docs/es/intlayer_with_nextjs_14.md +2 -2
- package/docs/es/intlayer_with_nextjs_15.md +2 -2
- package/docs/es/intlayer_with_react_native+expo.md +11 -20
- package/docs/es/intlayer_with_react_router_v7.md +188 -232
- package/docs/es/intlayer_with_tanstack.md +203 -273
- package/docs/es/intlayer_with_vite+preact.md +7 -7
- package/docs/es/intlayer_with_vite+react.md +7 -7
- package/docs/es/intlayer_with_vite+vue.md +9 -9
- package/docs/es/vs_code_extension.md +53 -114
- package/docs/fr/component_i18n.md +186 -0
- package/docs/fr/intlayer_with_angular.md +2 -2
- package/docs/fr/intlayer_with_astro.md +246 -0
- package/docs/fr/intlayer_with_create_react_app.md +3 -2
- package/docs/fr/intlayer_with_express.md +2 -2
- package/docs/fr/intlayer_with_nestjs.md +2 -2
- package/docs/fr/intlayer_with_nextjs_14.md +2 -2
- package/docs/fr/intlayer_with_react_native+expo.md +11 -20
- package/docs/fr/intlayer_with_react_router_v7.md +188 -248
- package/docs/fr/intlayer_with_tanstack.md +192 -265
- package/docs/fr/intlayer_with_vite+preact.md +7 -7
- package/docs/fr/intlayer_with_vite+react.md +7 -7
- package/docs/fr/intlayer_with_vite+vue.md +9 -9
- package/docs/fr/vs_code_extension.md +50 -111
- package/docs/hi/component_i18n.md +186 -0
- package/docs/hi/intlayer_cli.md +1 -4
- package/docs/hi/intlayer_with_angular.md +2 -2
- package/docs/hi/intlayer_with_astro.md +246 -0
- package/docs/hi/intlayer_with_create_react_app.md +2 -2
- package/docs/hi/intlayer_with_express.md +2 -2
- package/docs/hi/intlayer_with_nestjs.md +2 -2
- package/docs/hi/intlayer_with_nextjs_14.md +2 -2
- package/docs/hi/intlayer_with_nextjs_15.md +2 -2
- package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/hi/intlayer_with_nuxt.md +2 -2
- package/docs/hi/intlayer_with_react_native+expo.md +11 -20
- package/docs/hi/intlayer_with_react_router_v7.md +199 -243
- package/docs/hi/intlayer_with_tanstack.md +210 -285
- package/docs/hi/intlayer_with_vite+preact.md +9 -9
- package/docs/hi/intlayer_with_vite+react.md +9 -9
- package/docs/hi/intlayer_with_vite+solid.md +1 -1
- package/docs/hi/intlayer_with_vite+vue.md +11 -11
- package/docs/hi/vs_code_extension.md +49 -110
- package/docs/it/component_i18n.md +186 -0
- package/docs/it/intlayer_with_angular.md +2 -2
- package/docs/it/intlayer_with_astro.md +246 -0
- package/docs/it/intlayer_with_create_react_app.md +3 -2
- package/docs/it/intlayer_with_express.md +2 -2
- package/docs/it/intlayer_with_nestjs.md +2 -2
- package/docs/it/intlayer_with_nextjs_14.md +2 -2
- package/docs/it/intlayer_with_nextjs_15.md +2 -2
- package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/it/intlayer_with_nuxt.md +2 -2
- package/docs/it/intlayer_with_react_native+expo.md +11 -21
- package/docs/it/intlayer_with_react_router_v7.md +195 -242
- package/docs/it/intlayer_with_tanstack.md +203 -267
- package/docs/it/intlayer_with_vite+preact.md +9 -9
- package/docs/it/intlayer_with_vite+react.md +13 -11
- package/docs/it/intlayer_with_vite+vue.md +11 -11
- package/docs/it/vs_code_extension.md +50 -111
- package/docs/ja/component_i18n.md +186 -0
- package/docs/ja/intlayer_with_angular.md +2 -2
- package/docs/ja/intlayer_with_astro.md +246 -0
- package/docs/ja/intlayer_with_create_react_app.md +3 -2
- package/docs/ja/intlayer_with_express.md +2 -2
- package/docs/ja/intlayer_with_nestjs.md +2 -2
- package/docs/ja/intlayer_with_nextjs_14.md +2 -2
- package/docs/ja/intlayer_with_nextjs_15.md +2 -2
- package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ja/intlayer_with_nuxt.md +2 -2
- package/docs/ja/intlayer_with_react_native+expo.md +18 -29
- package/docs/ja/intlayer_with_react_router_v7.md +204 -250
- package/docs/ja/intlayer_with_tanstack.md +218 -286
- package/docs/ja/intlayer_with_vite+preact.md +9 -9
- package/docs/ja/intlayer_with_vite+react.md +11 -11
- package/docs/ja/intlayer_with_vite+vue.md +11 -11
- package/docs/ja/vs_code_extension.md +50 -111
- package/docs/ko/component_i18n.md +186 -0
- package/docs/ko/intlayer_with_angular.md +2 -2
- package/docs/ko/intlayer_with_astro.md +246 -0
- package/docs/ko/intlayer_with_create_react_app.md +3 -2
- package/docs/ko/intlayer_with_express.md +2 -2
- package/docs/ko/intlayer_with_nestjs.md +2 -2
- package/docs/ko/intlayer_with_nextjs_14.md +2 -2
- package/docs/ko/intlayer_with_nextjs_15.md +2 -2
- package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ko/intlayer_with_nuxt.md +2 -2
- package/docs/ko/intlayer_with_react_native+expo.md +19 -28
- package/docs/ko/intlayer_with_react_router_v7.md +190 -244
- package/docs/ko/intlayer_with_tanstack.md +200 -270
- package/docs/ko/intlayer_with_vite+preact.md +9 -9
- package/docs/ko/intlayer_with_vite+react.md +9 -9
- package/docs/ko/intlayer_with_vite+vue.md +11 -11
- package/docs/ko/vs_code_extension.md +48 -109
- package/docs/pt/component_i18n.md +186 -0
- package/docs/pt/intlayer_with_angular.md +2 -2
- package/docs/pt/intlayer_with_astro.md +246 -0
- package/docs/pt/intlayer_with_create_react_app.md +3 -2
- package/docs/pt/intlayer_with_express.md +2 -2
- package/docs/pt/intlayer_with_nestjs.md +2 -2
- package/docs/pt/intlayer_with_nextjs_14.md +2 -2
- package/docs/pt/intlayer_with_nextjs_15.md +2 -2
- package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/pt/intlayer_with_nuxt.md +2 -2
- package/docs/pt/intlayer_with_react_native+expo.md +11 -20
- package/docs/pt/intlayer_with_react_router_v7.md +7 -13
- package/docs/pt/intlayer_with_tanstack.md +183 -258
- package/docs/pt/intlayer_with_vite+preact.md +9 -9
- package/docs/pt/intlayer_with_vite+react.md +9 -9
- package/docs/pt/intlayer_with_vite+vue.md +9 -9
- package/docs/pt/vs_code_extension.md +46 -107
- package/docs/ru/component_i18n.md +186 -0
- package/docs/ru/intlayer_with_angular.md +2 -2
- package/docs/ru/intlayer_with_astro.md +246 -0
- package/docs/ru/intlayer_with_create_react_app.md +3 -2
- package/docs/ru/intlayer_with_express.md +2 -2
- package/docs/ru/intlayer_with_nestjs.md +2 -2
- package/docs/ru/intlayer_with_nextjs_14.md +2 -2
- package/docs/ru/intlayer_with_nextjs_15.md +2 -2
- package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ru/intlayer_with_nuxt.md +2 -2
- package/docs/ru/intlayer_with_react_native+expo.md +11 -20
- package/docs/ru/intlayer_with_react_router_v7.md +192 -238
- package/docs/ru/intlayer_with_tanstack.md +197 -269
- package/docs/ru/intlayer_with_vite+preact.md +9 -9
- package/docs/ru/intlayer_with_vite+react.md +9 -9
- package/docs/ru/intlayer_with_vite+vue.md +11 -11
- package/docs/ru/vs_code_extension.md +48 -109
- package/docs/tr/component_i18n.md +186 -0
- package/docs/tr/how_works_intlayer.md +1 -1
- package/docs/tr/index.md +1 -1
- package/docs/tr/intlayer_cli.md +1 -1
- package/docs/tr/intlayer_with_angular.md +4 -4
- package/docs/tr/intlayer_with_astro.md +246 -0
- package/docs/tr/intlayer_with_create_react_app.md +4 -4
- package/docs/tr/intlayer_with_express.md +3 -3
- package/docs/tr/intlayer_with_lynx+react.md +1 -1
- package/docs/tr/intlayer_with_nestjs.md +2 -2
- package/docs/tr/intlayer_with_nextjs_14.md +2 -2
- package/docs/tr/intlayer_with_nextjs_15.md +4 -4
- package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
- package/docs/tr/intlayer_with_nuxt.md +4 -4
- package/docs/tr/intlayer_with_react_native+expo.md +12 -21
- package/docs/tr/intlayer_with_react_router_v7.md +222 -267
- package/docs/tr/intlayer_with_tanstack.md +400 -303
- package/docs/tr/intlayer_with_vite+preact.md +12 -12
- package/docs/tr/intlayer_with_vite+react.md +12 -12
- package/docs/tr/intlayer_with_vite+solid.md +2 -2
- package/docs/tr/intlayer_with_vite+svelte.md +2 -2
- package/docs/tr/intlayer_with_vite+vue.md +12 -12
- package/docs/tr/introduction.md +1 -1
- package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
- package/docs/tr/roadmap.md +1 -1
- package/docs/tr/vs_code_extension.md +54 -115
- package/docs/zh/component_i18n.md +186 -0
- package/docs/zh/intlayer_with_angular.md +2 -2
- package/docs/zh/intlayer_with_astro.md +246 -0
- package/docs/zh/intlayer_with_create_react_app.md +3 -2
- package/docs/zh/intlayer_with_express.md +2 -2
- package/docs/zh/intlayer_with_nestjs.md +2 -2
- package/docs/zh/intlayer_with_nextjs_14.md +2 -2
- package/docs/zh/intlayer_with_nextjs_15.md +2 -2
- package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/zh/intlayer_with_nuxt.md +2 -2
- package/docs/zh/intlayer_with_react_native+expo.md +19 -28
- package/docs/zh/intlayer_with_react_router_v7.md +200 -248
- package/docs/zh/intlayer_with_tanstack.md +208 -283
- package/docs/zh/intlayer_with_vite+preact.md +9 -9
- package/docs/zh/intlayer_with_vite+react.md +9 -9
- package/docs/zh/intlayer_with_vite+vue.md +9 -9
- package/docs/zh/vs_code_extension.md +51 -105
- package/package.json +10 -10
- package/src/generated/docs.entry.ts +32 -0
|
@@ -55,7 +55,7 @@ yarn add intlayer angular-intlayer @intlayer/webpack
|
|
|
55
55
|
|
|
56
56
|
- **intlayer**
|
|
57
57
|
|
|
58
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
58
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
59
59
|
|
|
60
60
|
- **angular-intlayer**
|
|
61
61
|
The package that integrates Intlayer with Angular application. It provides context providers and hooks for Angular internationalization.
|
|
@@ -283,7 +283,7 @@ export default appContent;
|
|
|
283
283
|
|
|
284
284
|
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
285
285
|
|
|
286
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
286
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
287
287
|
|
|
288
288
|
### Step 5: Utilize Intlayer in Your Code
|
|
289
289
|
|
|
@@ -637,9 +637,9 @@ For more complex scenarios, you can create a pipe to safely render the HTML.
|
|
|
637
637
|
|
|
638
638
|
Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
639
639
|
|
|
640
|
-

|
|
641
641
|
|
|
642
|
-

|
|
643
643
|
|
|
644
644
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
645
645
|
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-03-07
|
|
3
|
+
updatedAt: 2025-10-03
|
|
4
|
+
title: Getting Started with Intlayer in Astro
|
|
5
|
+
description: Learn how to add internationalization (i18n) to your Vite and React application using Intlayer. Follow this guide to make your app multilingual.
|
|
6
|
+
keywords:
|
|
7
|
+
- Internationalization
|
|
8
|
+
- Documentation
|
|
9
|
+
- Intlayer
|
|
10
|
+
- Vite
|
|
11
|
+
- React
|
|
12
|
+
- i18n
|
|
13
|
+
- JavaScript
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- environment
|
|
17
|
+
- astro
|
|
18
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-astro-template
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Getting Started Internationalizing (i18n) with Intlayer and Astro
|
|
22
|
+
|
|
23
|
+
See [Application Template](https://github.com/aymericzip/intlayer-astro-template) on GitHub.
|
|
24
|
+
|
|
25
|
+
## What is Intlayer?
|
|
26
|
+
|
|
27
|
+
**Intlayer** is an innovative, open-source internationalization (i18n) library designed to simplify multilingual support in modern web applications.
|
|
28
|
+
|
|
29
|
+
With Intlayer, you can:
|
|
30
|
+
|
|
31
|
+
- **Easily manage translations** using declarative dictionaries at the component level.
|
|
32
|
+
- **Dynamically localize metadata**, routes, and content.
|
|
33
|
+
- **Ensure TypeScript support** with autogenerated types, improving autocompletion and error detection.
|
|
34
|
+
- **Benefit from advanced features**, like dynamic locale detection and switching.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step-by-Step Guide to Set Up Intlayer in Astro
|
|
39
|
+
|
|
40
|
+
### Step 1: Install Dependencies
|
|
41
|
+
|
|
42
|
+
Install the necessary packages using your package manager:
|
|
43
|
+
|
|
44
|
+
```bash packageManager="npm"
|
|
45
|
+
npm install intlayer astro-intlayer
|
|
46
|
+
# Optional: add React island support
|
|
47
|
+
npm install react react-dom react-intlayer @astrojs/react
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash packageManager="pnpm"
|
|
51
|
+
pnpm add intlayer astro-intlayer
|
|
52
|
+
# Optional: add React island support
|
|
53
|
+
pnpm add react react-dom react-intlayer @astrojs/react
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```bash packageManager="yarn"
|
|
57
|
+
yarn add intlayer astro-intlayer
|
|
58
|
+
# Optional: add React island support
|
|
59
|
+
yarn add react react-dom react-intlayer @astrojs/react
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **intlayer**
|
|
63
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
64
|
+
|
|
65
|
+
- **astro-intlayer**
|
|
66
|
+
Includes the Astro integration plugin for integrating Intlayer with the [Vite bundler](https://vite.dev/guide/why.html#why-bundle-for-production), as well as middleware for detecting the user's preferred locale, managing cookies, and handling URL redirection.
|
|
67
|
+
|
|
68
|
+
### Step 2: Configuration of your project
|
|
69
|
+
|
|
70
|
+
Create a config file to configure the languages of your application:
|
|
71
|
+
|
|
72
|
+
```typescript fileName="intlayer.config.ts"
|
|
73
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
74
|
+
|
|
75
|
+
const config: IntlayerConfig = {
|
|
76
|
+
internationalization: {
|
|
77
|
+
locales: [
|
|
78
|
+
Locales.ENGLISH,
|
|
79
|
+
Locales.FRENCH,
|
|
80
|
+
Locales.SPANISH,
|
|
81
|
+
// Your other locales
|
|
82
|
+
],
|
|
83
|
+
defaultLocale: Locales.ENGLISH,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default config;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> Through this configuration file, you can set up localized URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md).
|
|
91
|
+
|
|
92
|
+
### Step 3: Integrate Intlayer in Your Astro Configuration
|
|
93
|
+
|
|
94
|
+
Add the intlayer plugin into your configuration.
|
|
95
|
+
|
|
96
|
+
```typescript fileName="astro.config.ts"
|
|
97
|
+
// @ts-check
|
|
98
|
+
|
|
99
|
+
import { intlayer } from "astro-intlayer";
|
|
100
|
+
import { defineConfig } from "astro/config";
|
|
101
|
+
|
|
102
|
+
// https://astro.build/config
|
|
103
|
+
export default defineConfig({
|
|
104
|
+
integrations: [intlayer()],
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> The `intlayer()` Astro integration plugin is used to integrate Intlayer with Astro. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Astro application. Additionally, it provides aliases to optimize performance.
|
|
109
|
+
|
|
110
|
+
### Step 4: Declare Your Content
|
|
111
|
+
|
|
112
|
+
Create and manage your content declarations to store translations:
|
|
113
|
+
|
|
114
|
+
```tsx fileName="src/app.content.tsx"
|
|
115
|
+
import { t, type Dictionary } from "intlayer";
|
|
116
|
+
import type { ReactNode } from "react";
|
|
117
|
+
|
|
118
|
+
const appContent = {
|
|
119
|
+
key: "app",
|
|
120
|
+
content: {
|
|
121
|
+
title: t({
|
|
122
|
+
en: "Hello World",
|
|
123
|
+
fr: "Bonjour le monde",
|
|
124
|
+
es: "Hola mundo",
|
|
125
|
+
}),
|
|
126
|
+
},
|
|
127
|
+
} satisfies Dictionary;
|
|
128
|
+
|
|
129
|
+
export default appContent;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
133
|
+
|
|
134
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
135
|
+
|
|
136
|
+
### Step 5: Use your content in Astro
|
|
137
|
+
|
|
138
|
+
You can consume dictionaries directly in `.astro` files using the core helpers exported by `intlayer`.
|
|
139
|
+
|
|
140
|
+
```astro fileName="src/pages/index.astro"
|
|
141
|
+
<!-- astro -->
|
|
142
|
+
---
|
|
143
|
+
import { getIntlayer } from "intlayer";
|
|
144
|
+
import appContent from "../app.content";
|
|
145
|
+
|
|
146
|
+
const { title } = getIntlayer('app');
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
<html lang="en">
|
|
150
|
+
<head>
|
|
151
|
+
<meta charset="utf-8" />
|
|
152
|
+
<meta name="viewport" content="width=device-width" />
|
|
153
|
+
<title>{title}</title>
|
|
154
|
+
</head>
|
|
155
|
+
<body>
|
|
156
|
+
<h1>{title}</h1>
|
|
157
|
+
</body>
|
|
158
|
+
</html>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Step 6: Localized routing
|
|
162
|
+
|
|
163
|
+
Create a dynamic route segment to serve localized pages, for example `src/pages/[locale]/index.astro`:
|
|
164
|
+
|
|
165
|
+
```astro fileName="src/pages/[locale]/index.astro"
|
|
166
|
+
<!-- astro -->
|
|
167
|
+
---
|
|
168
|
+
import { getIntlayer } from "intlayer";
|
|
169
|
+
|
|
170
|
+
const { title } = getIntlayer('app');
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
<h1>{title}</h1>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The Astro integration adds a Vite middleware during development that helps with locale-aware routing and environment definitions. You can still link between locales using your own logic, or utility functions like `getLocalizedUrl` from `intlayer`.
|
|
177
|
+
|
|
178
|
+
### Step 7: Continue using your favorite framework
|
|
179
|
+
|
|
180
|
+
Continue using your favorite framework to build your application.
|
|
181
|
+
|
|
182
|
+
- Intlayer + React: [Intlayer with React](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_vite+react.md)
|
|
183
|
+
- Intlayer + Vue: [Intlayer with Vue](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_vite+vue.md)
|
|
184
|
+
- Intlayer + Svelte: [Intlayer with Svelte](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_vite+svelte.md)
|
|
185
|
+
- Intlayer + Solid: [Intlayer with Solid](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_vite+solid.md)
|
|
186
|
+
- Intlayer + Preact: [Intlayer with Preact](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_vite+preact.md)
|
|
187
|
+
|
|
188
|
+
### Configure TypeScript
|
|
189
|
+
|
|
190
|
+
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
191
|
+
|
|
192
|
+

|
|
193
|
+
|
|
194
|
+

|
|
195
|
+
|
|
196
|
+
Ensure your TypeScript configuration includes the autogenerated types.
|
|
197
|
+
|
|
198
|
+
```json5 fileName="tsconfig.json"
|
|
199
|
+
{
|
|
200
|
+
// ... Your existing TypeScript configurations
|
|
201
|
+
"include": [
|
|
202
|
+
// ... Your existing TypeScript configurations
|
|
203
|
+
".intlayer/**/*.ts", // Include the auto-generated types
|
|
204
|
+
],
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Git Configuration
|
|
209
|
+
|
|
210
|
+
It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
|
|
211
|
+
|
|
212
|
+
To do this, you can add the following instructions to your `.gitignore` file:
|
|
213
|
+
|
|
214
|
+
```plaintext
|
|
215
|
+
# Ignore the files generated by Intlayer
|
|
216
|
+
.intlayer
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### VS Code Extension
|
|
220
|
+
|
|
221
|
+
To improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.
|
|
222
|
+
|
|
223
|
+
[Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
224
|
+
|
|
225
|
+
This extension provides:
|
|
226
|
+
|
|
227
|
+
- **Autocompletion** for translation keys.
|
|
228
|
+
- **Real-time error detection** for missing translations.
|
|
229
|
+
- **Inline previews** of translated content.
|
|
230
|
+
- **Quick actions** to easily create and update translations.
|
|
231
|
+
|
|
232
|
+
For more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### Go Further
|
|
237
|
+
|
|
238
|
+
To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md) or externalize your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md).
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Doc History
|
|
243
|
+
|
|
244
|
+
| Version | Date | Changes |
|
|
245
|
+
| ------- | ---------- | -------------------------------------------- |
|
|
246
|
+
| 6.2.0 | 2025-10-03 | Refresh for Astro integration, config, usage |
|
|
@@ -53,7 +53,7 @@ yarn add intlayer react-intlayer react-scripts-intlayer
|
|
|
53
53
|
|
|
54
54
|
- **intlayer**
|
|
55
55
|
|
|
56
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
56
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
57
57
|
|
|
58
58
|
- **react-intlayer**
|
|
59
59
|
|
|
@@ -235,7 +235,7 @@ module.exports = appContent;
|
|
|
235
235
|
|
|
236
236
|
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
237
237
|
|
|
238
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
238
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
239
239
|
|
|
240
240
|
> If your content file includes TSX code, you should consider importing `import React from "react";` in your content file.
|
|
241
241
|
|
|
@@ -1169,9 +1169,9 @@ By applying these changes, your application will:
|
|
|
1169
1169
|
|
|
1170
1170
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
1171
1171
|
|
|
1172
|
-

|
|
1173
1173
|
|
|
1174
|
-

|
|
1175
1175
|
|
|
1176
1176
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
1177
1177
|
|
|
@@ -192,7 +192,7 @@ module.exports = indexContent;
|
|
|
192
192
|
|
|
193
193
|
> Your content declarations can be defined anywhere in your application as soon as they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
194
194
|
|
|
195
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
195
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
196
196
|
|
|
197
197
|
### Express Application Setup
|
|
198
198
|
|
|
@@ -362,9 +362,9 @@ By default, `express-intlayer` will interpret the `Accept-Language` header to de
|
|
|
362
362
|
|
|
363
363
|
`express-intlayer` leverages the robust capabilities of TypeScript to enhance the internationalization process. TypeScript's static typing ensures that every translation key is accounted for, reducing the risk of missing translations and improving maintainability.
|
|
364
364
|
|
|
365
|
-

|
|
366
366
|
|
|
367
|
-

|
|
368
368
|
|
|
369
369
|
Ensure the autogenerated types (by default at ./types/intlayer.d.ts) are included in your tsconfig.json file.
|
|
370
370
|
|
|
@@ -339,7 +339,7 @@ module.exports = appContent;
|
|
|
339
339
|
}
|
|
340
340
|
```
|
|
341
341
|
|
|
342
|
-
> For details on content declarations, see [Intlayer’s content docs](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
342
|
+
> For details on content declarations, see [Intlayer’s content docs](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
343
343
|
|
|
344
344
|
---
|
|
345
345
|
|
|
@@ -215,9 +215,9 @@ By default, `express-intlayer` will interpret the `Accept-Language` header to de
|
|
|
215
215
|
|
|
216
216
|
`express-intlayer` leverages the robust capabilities of TypeScript to enhance the internationalization process. TypeScript's static typing ensures that every translation key is accounted for, reducing the risk of missing translations and improving maintainability.
|
|
217
217
|
|
|
218
|
-

|
|
219
219
|
|
|
220
|
-

|
|
221
221
|
|
|
222
222
|
Ensure the autogenerated types (by default at ./types/intlayer.d.ts) are included in your tsconfig.json file.
|
|
223
223
|
|
|
@@ -58,7 +58,7 @@ yarn add intlayer next-intlayer
|
|
|
58
58
|
|
|
59
59
|
- **intlayer**
|
|
60
60
|
|
|
61
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
61
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
62
62
|
|
|
63
63
|
- **next-intlayer**
|
|
64
64
|
|
|
@@ -414,7 +414,7 @@ module.exports = pageContent;
|
|
|
414
414
|
|
|
415
415
|
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
416
416
|
|
|
417
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
417
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
418
418
|
|
|
419
419
|
### Step 7: Utilize Content in Your Code
|
|
420
420
|
|
|
@@ -1398,7 +1398,32 @@ Link.displayName = 'Link';
|
|
|
1398
1398
|
|
|
1399
1399
|
By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience while also benefitting from improved SEO and usability.
|
|
1400
1400
|
|
|
1401
|
-
### (Optional) Step 12:
|
|
1401
|
+
### (Optional) Step 12: Get the current locale in Server Actions
|
|
1402
|
+
|
|
1403
|
+
If you need the active locale inside a Server Action (e.g., to localize emails or run locale-aware logic), call `getLocale` from `next-intlayer/server`:
|
|
1404
|
+
|
|
1405
|
+
```tsx fileName="src/app/actions/getLocale.ts" codeFormat="typescript"
|
|
1406
|
+
"use server";
|
|
1407
|
+
|
|
1408
|
+
import { getLocale } from "next-intlayer/server";
|
|
1409
|
+
|
|
1410
|
+
export const myServerAction = async () => {
|
|
1411
|
+
const locale = await getLocale();
|
|
1412
|
+
|
|
1413
|
+
// Do something with the locale
|
|
1414
|
+
};
|
|
1415
|
+
```
|
|
1416
|
+
|
|
1417
|
+
> The `getLocale` function follows a cascading strategy to determine the user's locale:
|
|
1418
|
+
>
|
|
1419
|
+
> 1. First, it checks the request headers for a locale value that may have been set by the middleware
|
|
1420
|
+
> 2. If no locale is found in headers, it looks for a locale stored in cookies
|
|
1421
|
+
> 3. If no cookie is found, it attempts to detect the user's preferred language from their browser settings
|
|
1422
|
+
> 4. As a last resort, it falls back to the application's configured default locale
|
|
1423
|
+
>
|
|
1424
|
+
> This ensures the most appropriate locale is selected based on available context.
|
|
1425
|
+
|
|
1426
|
+
### (Optional) Step 13: Optmize your bundle size
|
|
1402
1427
|
|
|
1403
1428
|
When using `next-intlayer`, dictionaries are included in the bundle for every page by default. To optimize bundle size, Intlayer provides an optional SWC plugin that intelligently replace `useIntlayer` calls using macros. This ensures dictionaries are only included in bundles for pages that actually use them.
|
|
1404
1429
|
|
|
@@ -1424,9 +1449,9 @@ yarn add @intlayer/swc --save-dev
|
|
|
1424
1449
|
|
|
1425
1450
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
1426
1451
|
|
|
1427
|
-

|
|
1428
1453
|
|
|
1429
|
-

|
|
1430
1455
|
|
|
1431
1456
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
1432
1457
|
|
|
@@ -1474,6 +1499,7 @@ To go further, you can implement the [visual editor](https://github.com/aymericz
|
|
|
1474
1499
|
|
|
1475
1500
|
| Version | Date | Changes |
|
|
1476
1501
|
| ------- | ---------- | --------------------------------------------------------------- |
|
|
1502
|
+
| 5.6.6 | 2025-10-02 | Added docs for `getLocale` function on server actions |
|
|
1477
1503
|
| 5.6.2 | 2025-09-22 | Added docs for `multipleMiddlewares` helper |
|
|
1478
1504
|
| 5.6.0 | 2025-07-06 | Transform `withIntlayer()` function to a promise based function |
|
|
1479
1505
|
| 5.5.10 | 2025-06-29 | Init history |
|
|
@@ -60,7 +60,7 @@ yarn add intlayer next-intlayer
|
|
|
60
60
|
|
|
61
61
|
- **intlayer**
|
|
62
62
|
|
|
63
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
63
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
64
64
|
|
|
65
65
|
- **next-intlayer**
|
|
66
66
|
|
|
@@ -384,7 +384,7 @@ module.exports = pageContent;
|
|
|
384
384
|
|
|
385
385
|
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
386
386
|
|
|
387
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
387
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
388
388
|
|
|
389
389
|
### Step 6: Utilize Content in Your Code
|
|
390
390
|
|
|
@@ -1445,7 +1445,32 @@ const Link = ({ href, children, ...props }) => {
|
|
|
1445
1445
|
|
|
1446
1446
|
By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience while also benefitting from improved SEO and usability.
|
|
1447
1447
|
|
|
1448
|
-
### (Optional) Step 12:
|
|
1448
|
+
### (Optional) Step 12: Get the current locale in Server Actions
|
|
1449
|
+
|
|
1450
|
+
If you need the active locale inside a Server Action (e.g., to localize emails or run locale-aware logic), call `getLocale` from `next-intlayer/server`:
|
|
1451
|
+
|
|
1452
|
+
```tsx fileName="src/app/actions/getLocale.ts" codeFormat="typescript"
|
|
1453
|
+
"use server";
|
|
1454
|
+
|
|
1455
|
+
import { getLocale } from "next-intlayer/server";
|
|
1456
|
+
|
|
1457
|
+
export const myServerAction = async () => {
|
|
1458
|
+
const locale = await getLocale();
|
|
1459
|
+
|
|
1460
|
+
// Do something with the locale
|
|
1461
|
+
};
|
|
1462
|
+
```
|
|
1463
|
+
|
|
1464
|
+
> The `getLocale` function follows a cascading strategy to determine the user's locale:
|
|
1465
|
+
>
|
|
1466
|
+
> 1. First, it checks the request headers for a locale value that may have been set by the middleware
|
|
1467
|
+
> 2. If no locale is found in headers, it looks for a locale stored in cookies
|
|
1468
|
+
> 3. If no cookie is found, it attempts to detect the user's preferred language from their browser settings
|
|
1469
|
+
> 4. As a last resort, it falls back to the application's configured default locale
|
|
1470
|
+
>
|
|
1471
|
+
> This ensures the most appropriate locale is selected based on available context.
|
|
1472
|
+
|
|
1473
|
+
### (Optional) Step 13: Optmize your bundle size
|
|
1449
1474
|
|
|
1450
1475
|
When using `next-intlayer`, dictionaries are included in the bundle for every page by default. To optimize bundle size, Intlayer provides an optional SWC plugin that intelligently replace `useIntlayer` calls using macros. This ensures dictionaries are only included in bundles for pages that actually use them.
|
|
1451
1476
|
|
|
@@ -1487,9 +1512,9 @@ This limitation occurs because Turbopack cannot run webpack plugins in parallel
|
|
|
1487
1512
|
|
|
1488
1513
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
1489
1514
|
|
|
1490
|
-

|
|
1491
1516
|
|
|
1492
|
-

|
|
1493
1518
|
|
|
1494
1519
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
1495
1520
|
|
|
@@ -1537,6 +1562,7 @@ To go further, you can implement the [visual editor](https://github.com/aymericz
|
|
|
1537
1562
|
|
|
1538
1563
|
| Version | Date | Changes |
|
|
1539
1564
|
| ------- | ---------- | --------------------------------------------------------------- |
|
|
1565
|
+
| 5.6.6 | 2025-10-02 | Added docs for `getLocale` function on server actions |
|
|
1540
1566
|
| 5.6.2 | 2025-09-23 | Added docs for watch dictionaries changes on Turbopack |
|
|
1541
1567
|
| 5.6.2 | 2025-09-22 | Added docs for `multipleMiddlewares` helper |
|
|
1542
1568
|
| 5.6.0 | 2025-07-06 | Transform `withIntlayer()` function to a promise based function |
|
|
@@ -55,7 +55,7 @@ yarn add intlayer next-intlayer
|
|
|
55
55
|
|
|
56
56
|
- **intlayer**
|
|
57
57
|
|
|
58
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
58
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
59
59
|
|
|
60
60
|
- **next-intlayer**
|
|
61
61
|
|
|
@@ -426,7 +426,7 @@ module.exports = homeContent;
|
|
|
426
426
|
}
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
For more information on declaring content, refer to the [content declaration guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
429
|
+
For more information on declaring content, refer to the [content declaration guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
430
430
|
|
|
431
431
|
### Step 7: Utilize Content in Your Code
|
|
432
432
|
|
|
@@ -1427,9 +1427,9 @@ yarn add @intlayer/swc --save-dev
|
|
|
1427
1427
|
|
|
1428
1428
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
1429
1429
|
|
|
1430
|
-

|
|
1431
1431
|
|
|
1432
|
-

|
|
1433
1433
|
|
|
1434
1434
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
1435
1435
|
|
|
@@ -1472,7 +1472,7 @@ For more details on how to use the extension, refer to the [Intlayer VS Code Ext
|
|
|
1472
1472
|
## Additional Resources
|
|
1473
1473
|
|
|
1474
1474
|
- **Intlayer Documentation:** [GitHub Repository](https://github.com/aymericzip/intlayer)
|
|
1475
|
-
- **Dictionary Guide:** [Dictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
1475
|
+
- **Dictionary Guide:** [Dictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md)
|
|
1476
1476
|
- **Configuration Documentation:** [Configuration Guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md)
|
|
1477
1477
|
|
|
1478
1478
|
By following this guide, you can effectively integrate Intlayer into your Next.js application using the Page Router, enabling robust and scalable internationalization support for your web projects.
|
|
@@ -57,7 +57,7 @@ yarn add --save-dev nuxt-intlayer
|
|
|
57
57
|
|
|
58
58
|
- **intlayer**
|
|
59
59
|
|
|
60
|
-
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
60
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
61
61
|
|
|
62
62
|
- **vue-intlayer**
|
|
63
63
|
The package that integrates Intlayer with Vue application. It the composables for the Vue components.
|
|
@@ -341,7 +341,7 @@ module.exports = helloWorldContent;
|
|
|
341
341
|
|
|
342
342
|
> Your content declarations can be defined anywhere in your application as long as they are included in the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
343
343
|
|
|
344
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
344
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
345
345
|
|
|
346
346
|
### Step 5: Utilize Intlayer in Your Code
|
|
347
347
|
|
|
@@ -716,9 +716,9 @@ module.exports = aboutMetaContent;
|
|
|
716
716
|
|
|
717
717
|
Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
718
718
|
|
|
719
|
-

|
|
720
720
|
|
|
721
|
-

|
|
722
722
|
|
|
723
723
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
724
724
|
|