@intlayer/docs 6.1.6-canary.0 → 7.0.0-canary.0
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 +14 -0
- package/blog/en/{intlayer_with_next-i18next.mdx → _intlayer_with_next-i18next.md} +69 -72
- package/blog/en/{intlayer_with_next-intl.mdx → _intlayer_with_next-intl.md} +52 -56
- package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +85 -80
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/blog.cjs +20 -45
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +60 -136
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs +20 -45
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs +20 -45
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +438 -407
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +1407 -1118
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +286 -254
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +58 -78
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/index.cjs +33 -29
- package/dist/cjs/legal.cjs +20 -45
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs +7 -17
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +45 -102
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs +7 -17
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs +7 -17
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +433 -382
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +1402 -1093
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +281 -229
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +53 -53
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/index.mjs +6 -5
- package/dist/esm/legal.mjs +7 -17
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/blog.d.ts +17 -12
- package/dist/types/blog.d.ts.map +1 -1
- package/dist/types/common.d.ts +30 -25
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/doc.d.ts +17 -12
- package/dist/types/doc.d.ts.map +1 -1
- package/dist/types/frequentQuestions.d.ts +17 -12
- package/dist/types/frequentQuestions.d.ts.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +28 -24
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +79 -69
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +20 -15
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts +8 -4
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/legal.d.ts +17 -12
- package/dist/types/legal.d.ts.map +1 -1
- package/docs/ar/CI_CD.md +4 -6
- package/docs/ar/autoFill.md +10 -8
- package/docs/ar/configuration.md +16 -10
- package/docs/ar/dictionary/content_file.md +7 -7
- package/docs/ar/dictionary/enumeration.md +4 -4
- package/docs/ar/dictionary/file.md +4 -4
- package/docs/ar/dictionary/function_fetching.md +4 -4
- package/docs/ar/dictionary/gender.md +4 -6
- package/docs/ar/dictionary/insertion.md +4 -4
- package/docs/ar/dictionary/translation.md +4 -4
- package/docs/ar/formatters.md +19 -33
- package/docs/ar/how_works_intlayer.md +5 -5
- package/docs/ar/index.md +4 -4
- package/docs/ar/interest_of_intlayer.md +7 -7
- package/docs/ar/intlayer_CMS.md +10 -8
- package/docs/ar/intlayer_cli.md +7 -7
- package/docs/ar/intlayer_visual_editor.md +5 -5
- package/docs/ar/intlayer_with_angular.md +8 -8
- package/docs/ar/intlayer_with_astro.md +244 -0
- package/docs/ar/intlayer_with_create_react_app.md +9 -8
- package/docs/ar/intlayer_with_express.md +8 -8
- package/docs/ar/intlayer_with_lynx+react.md +6 -6
- package/docs/ar/intlayer_with_nestjs.md +8 -10
- package/docs/ar/intlayer_with_nextjs_14.md +4 -4
- package/docs/ar/intlayer_with_nextjs_15.md +9 -8
- package/docs/ar/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/ar/intlayer_with_nuxt.md +8 -8
- package/docs/ar/intlayer_with_react_native+expo.md +17 -26
- package/docs/ar/intlayer_with_react_router_v7.md +199 -245
- package/docs/ar/intlayer_with_tanstack.md +203 -279
- package/docs/ar/intlayer_with_vite+preact.md +15 -15
- package/docs/ar/intlayer_with_vite+react.md +14 -14
- package/docs/ar/intlayer_with_vite+solid.md +6 -6
- package/docs/ar/intlayer_with_vite+svelte.md +6 -6
- package/docs/ar/intlayer_with_vite+vue.md +15 -15
- package/docs/ar/introduction.md +4 -4
- package/docs/ar/locale_mapper.md +4 -6
- package/docs/ar/mcp_server.md +13 -9
- package/docs/ar/packages/express-intlayer/t.md +4 -4
- package/docs/ar/packages/intlayer/getConfiguration.md +4 -4
- package/docs/ar/packages/intlayer/getEnumeration.md +4 -4
- package/docs/ar/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/ar/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/ar/packages/intlayer/getLocaleName.md +4 -4
- package/docs/ar/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/ar/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/ar/packages/intlayer/getTranslation.md +4 -4
- package/docs/ar/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/ar/packages/next-intlayer/t.md +4 -4
- package/docs/ar/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/ar/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/ar/packages/next-intlayer/useLocale.md +4 -4
- package/docs/ar/packages/react-intlayer/t.md +4 -4
- package/docs/ar/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/ar/packages/react-intlayer/useLocale.md +4 -4
- package/docs/ar/per_locale_file.md +4 -4
- package/docs/ar/roadmap.md +7 -5
- package/docs/ar/testing.md +4 -7
- package/docs/ar/vs_code_extension.md +13 -9
- package/docs/de/CI_CD.md +4 -6
- package/docs/de/autoFill.md +10 -8
- package/docs/de/configuration.md +16 -10
- package/docs/de/dictionary/content_file.md +7 -7
- package/docs/de/dictionary/enumeration.md +4 -4
- package/docs/de/dictionary/file.md +4 -4
- package/docs/de/dictionary/function_fetching.md +4 -4
- package/docs/de/dictionary/gender.md +4 -6
- package/docs/de/dictionary/insertion.md +4 -4
- package/docs/de/dictionary/translation.md +4 -4
- package/docs/de/formatters.md +25 -57
- package/docs/de/how_works_intlayer.md +5 -7
- package/docs/de/index.md +4 -4
- package/docs/de/interest_of_intlayer.md +7 -7
- package/docs/de/intlayer_CMS.md +10 -8
- package/docs/de/intlayer_cli.md +7 -7
- package/docs/de/intlayer_visual_editor.md +5 -6
- package/docs/de/intlayer_with_angular.md +8 -8
- package/docs/de/intlayer_with_astro.md +244 -0
- package/docs/de/intlayer_with_create_react_app.md +4 -4
- package/docs/de/intlayer_with_express.md +8 -8
- package/docs/de/intlayer_with_lynx+react.md +6 -6
- package/docs/de/intlayer_with_nestjs.md +8 -10
- package/docs/de/intlayer_with_nextjs_14.md +4 -4
- package/docs/de/intlayer_with_nextjs_15.md +9 -8
- package/docs/de/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/de/intlayer_with_nuxt.md +8 -8
- package/docs/de/intlayer_with_react_native+expo.md +17 -26
- package/docs/de/intlayer_with_react_router_v7.md +197 -246
- package/docs/de/intlayer_with_tanstack.md +198 -272
- package/docs/de/intlayer_with_vite+preact.md +15 -15
- package/docs/de/intlayer_with_vite+react.md +16 -15
- package/docs/de/intlayer_with_vite+solid.md +6 -6
- package/docs/de/intlayer_with_vite+svelte.md +6 -6
- package/docs/de/intlayer_with_vite+vue.md +17 -17
- package/docs/de/introduction.md +4 -4
- package/docs/de/locale_mapper.md +4 -6
- package/docs/de/mcp_server.md +13 -9
- package/docs/de/packages/express-intlayer/t.md +4 -4
- package/docs/de/packages/intlayer/getConfiguration.md +4 -4
- package/docs/de/packages/intlayer/getEnumeration.md +4 -4
- package/docs/de/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/de/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/de/packages/intlayer/getLocaleName.md +4 -4
- package/docs/de/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/de/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/de/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/de/packages/intlayer/getTranslation.md +4 -4
- package/docs/de/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/de/packages/next-intlayer/t.md +4 -4
- package/docs/de/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/de/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/de/packages/next-intlayer/useLocale.md +4 -4
- package/docs/de/packages/react-intlayer/t.md +4 -4
- package/docs/de/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/de/packages/react-intlayer/useI18n.md +4 -4
- package/docs/de/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/de/packages/react-intlayer/useLocale.md +4 -4
- package/docs/de/per_locale_file.md +4 -4
- package/docs/de/roadmap.md +7 -5
- package/docs/de/testing.md +4 -7
- package/docs/de/vs_code_extension.md +13 -9
- package/docs/en/CI_CD.md +4 -6
- package/docs/en/autoFill.md +75 -28
- package/docs/en/configuration.md +214 -56
- package/docs/en/dictionary/condition.md +4 -6
- package/docs/en/dictionary/content_file.md +25 -17
- package/docs/en/dictionary/enumeration.md +4 -6
- package/docs/en/dictionary/file.md +16 -8
- package/docs/en/dictionary/function_fetching.md +4 -6
- package/docs/en/dictionary/gender.md +4 -6
- package/docs/en/dictionary/insertion.md +4 -6
- package/docs/en/dictionary/markdown.md +4 -6
- package/docs/en/dictionary/nesting.md +4 -6
- package/docs/en/dictionary/translation.md +4 -6
- package/docs/en/formatters.md +23 -50
- package/docs/en/how_works_intlayer.md +6 -8
- package/docs/en/index.md +5 -7
- package/docs/en/interest_of_intlayer.md +7 -7
- package/docs/en/intlayer_CMS.md +12 -12
- package/docs/en/intlayer_cli.md +97 -14
- package/docs/en/intlayer_visual_editor.md +14 -10
- package/docs/en/intlayer_with_angular.md +10 -12
- package/docs/en/intlayer_with_astro.md +244 -0
- package/docs/en/intlayer_with_create_react_app.md +10 -12
- package/docs/en/intlayer_with_express.md +9 -11
- package/docs/en/intlayer_with_lynx+react.md +7 -9
- package/docs/en/intlayer_with_nestjs.md +8 -10
- package/docs/en/intlayer_with_next-i18next.md +627 -0
- package/docs/en/intlayer_with_next-intl.md +446 -0
- package/docs/en/intlayer_with_nextjs_14.md +66 -31
- package/docs/en/intlayer_with_nextjs_15.md +81 -35
- package/docs/en/intlayer_with_nextjs_16.md +1586 -0
- package/docs/en/intlayer_with_nextjs_page_router.md +23 -15
- package/docs/en/intlayer_with_nuxt.md +10 -12
- package/docs/en/intlayer_with_react_native+expo.md +49 -27
- package/docs/en/intlayer_with_react_router_v7.md +169 -216
- package/docs/en/intlayer_with_tanstack.md +174 -249
- package/docs/en/intlayer_with_vite+preact.md +18 -20
- package/docs/en/intlayer_with_vite+react.md +68 -317
- package/docs/en/intlayer_with_vite+solid.md +8 -10
- package/docs/en/intlayer_with_vite+svelte.md +8 -10
- package/docs/en/intlayer_with_vite+vue.md +18 -20
- package/docs/en/introduction.md +5 -7
- package/docs/en/locale_mapper.md +4 -6
- package/docs/en/mcp_server.md +13 -9
- package/docs/en/packages/express-intlayer/t.md +4 -6
- package/docs/en/packages/intlayer/getConfiguration.md +4 -6
- package/docs/en/packages/intlayer/getEnumeration.md +4 -6
- package/docs/en/packages/intlayer/getHTMLTextDir.md +4 -6
- package/docs/en/packages/intlayer/getLocaleLang.md +4 -6
- package/docs/en/packages/intlayer/getLocaleName.md +4 -6
- package/docs/en/packages/intlayer/getLocalizedUrl.md +4 -6
- package/docs/en/packages/intlayer/getMultilingualUrls.md +4 -6
- package/docs/en/packages/intlayer/getPathWithoutLocale.md +4 -6
- package/docs/en/packages/intlayer/getTranslation.md +4 -6
- package/docs/en/packages/intlayer/getTranslationContent.md +4 -6
- package/docs/en/packages/next-intlayer/t.md +4 -6
- package/docs/en/packages/next-intlayer/useDictionary.md +5 -7
- package/docs/en/packages/next-intlayer/useIntlayer.md +5 -7
- package/docs/en/packages/next-intlayer/useLocale.md +41 -8
- package/docs/en/packages/react-intlayer/t.md +4 -6
- package/docs/en/packages/react-intlayer/useDictionary.md +5 -7
- package/docs/en/packages/react-intlayer/useI18n.md +5 -5
- package/docs/en/packages/react-intlayer/useIntlayer.md +5 -7
- package/docs/en/packages/react-intlayer/useLocale.md +4 -6
- package/docs/en/per_locale_file.md +4 -6
- package/docs/en/plugins/sync-json.md +244 -0
- package/docs/en/releases/v6.md +7 -0
- package/docs/en/releases/v7.md +486 -0
- package/docs/en/roadmap.md +11 -9
- package/docs/en/testing.md +13 -11
- package/docs/en/vs_code_extension.md +13 -9
- package/docs/en-GB/CI_CD.md +4 -6
- package/docs/en-GB/autoFill.md +10 -8
- package/docs/en-GB/configuration.md +16 -10
- package/docs/en-GB/dictionary/condition.md +4 -4
- package/docs/en-GB/dictionary/content_file.md +7 -7
- package/docs/en-GB/dictionary/enumeration.md +4 -4
- package/docs/en-GB/dictionary/file.md +4 -4
- package/docs/en-GB/dictionary/gender.md +4 -6
- package/docs/en-GB/dictionary/insertion.md +4 -4
- package/docs/en-GB/dictionary/markdown.md +4 -4
- package/docs/en-GB/dictionary/nesting.md +4 -4
- package/docs/en-GB/dictionary/translation.md +4 -4
- package/docs/en-GB/formatters.md +19 -33
- package/docs/en-GB/how_works_intlayer.md +5 -5
- package/docs/en-GB/index.md +4 -4
- package/docs/en-GB/interest_of_intlayer.md +7 -7
- package/docs/en-GB/intlayer_CMS.md +15 -13
- package/docs/en-GB/intlayer_cli.md +7 -7
- package/docs/en-GB/intlayer_visual_editor.md +5 -6
- package/docs/en-GB/intlayer_with_angular.md +8 -8
- package/docs/en-GB/intlayer_with_astro.md +244 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +11 -10
- package/docs/en-GB/intlayer_with_express.md +8 -8
- package/docs/en-GB/intlayer_with_lynx+react.md +5 -5
- package/docs/en-GB/intlayer_with_nestjs.md +7 -9
- package/docs/en-GB/intlayer_with_nextjs_14.md +10 -10
- package/docs/en-GB/intlayer_with_nextjs_15.md +8 -7
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +7 -7
- package/docs/en-GB/intlayer_with_nuxt.md +7 -7
- package/docs/en-GB/intlayer_with_react_native+expo.md +16 -25
- package/docs/en-GB/intlayer_with_react_router_v7.md +175 -224
- package/docs/en-GB/intlayer_with_tanstack.md +181 -255
- package/docs/en-GB/intlayer_with_vite+preact.md +14 -14
- package/docs/en-GB/intlayer_with_vite+react.md +15 -14
- package/docs/en-GB/intlayer_with_vite+solid.md +5 -5
- package/docs/en-GB/intlayer_with_vite+svelte.md +5 -5
- package/docs/en-GB/intlayer_with_vite+vue.md +16 -16
- package/docs/en-GB/introduction.md +4 -4
- package/docs/en-GB/locale_mapper.md +4 -6
- package/docs/en-GB/mcp_server.md +13 -9
- package/docs/en-GB/packages/express-intlayer/t.md +4 -4
- package/docs/en-GB/packages/intlayer/getConfiguration.md +4 -4
- package/docs/en-GB/packages/intlayer/getEnumeration.md +4 -4
- package/docs/en-GB/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/en-GB/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/en-GB/packages/intlayer/getLocaleName.md +4 -4
- package/docs/en-GB/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/en-GB/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/en-GB/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/en-GB/packages/intlayer/getTranslation.md +4 -4
- package/docs/en-GB/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/en-GB/packages/next-intlayer/t.md +4 -4
- package/docs/en-GB/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/en-GB/packages/next-intlayer/useIntlayer.md +5 -5
- package/docs/en-GB/packages/next-intlayer/useLocale.md +4 -4
- package/docs/en-GB/packages/react-intlayer/t.md +4 -4
- package/docs/en-GB/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/en-GB/packages/react-intlayer/useI18n.md +4 -4
- package/docs/en-GB/packages/react-intlayer/useIntlayer.md +5 -5
- package/docs/en-GB/packages/react-intlayer/useLocale.md +4 -4
- package/docs/en-GB/per_locale_file.md +4 -4
- package/docs/en-GB/roadmap.md +7 -5
- package/docs/en-GB/testing.md +4 -7
- package/docs/en-GB/vs_code_extension.md +13 -9
- package/docs/es/CI_CD.md +4 -6
- package/docs/es/autoFill.md +10 -8
- package/docs/es/configuration.md +16 -10
- package/docs/es/dictionary/content_file.md +7 -7
- package/docs/es/dictionary/enumeration.md +4 -4
- package/docs/es/dictionary/file.md +4 -4
- package/docs/es/dictionary/function_fetching.md +4 -4
- package/docs/es/dictionary/gender.md +4 -6
- package/docs/es/dictionary/insertion.md +4 -4
- package/docs/es/dictionary/translation.md +4 -4
- package/docs/es/formatters.md +25 -57
- package/docs/es/how_works_intlayer.md +5 -5
- package/docs/es/index.md +4 -4
- package/docs/es/interest_of_intlayer.md +7 -7
- package/docs/es/intlayer_CMS.md +10 -8
- package/docs/es/intlayer_cli.md +7 -7
- package/docs/es/intlayer_visual_editor.md +5 -7
- package/docs/es/intlayer_with_angular.md +8 -8
- package/docs/es/intlayer_with_astro.md +244 -0
- package/docs/es/intlayer_with_create_react_app.md +9 -8
- package/docs/es/intlayer_with_express.md +8 -8
- package/docs/es/intlayer_with_lynx+react.md +6 -6
- package/docs/es/intlayer_with_nestjs.md +6 -8
- package/docs/es/intlayer_with_nextjs_14.md +8 -8
- package/docs/es/intlayer_with_nextjs_15.md +9 -8
- package/docs/es/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/es/intlayer_with_nuxt.md +6 -6
- package/docs/es/intlayer_with_react_native+expo.md +17 -26
- package/docs/es/intlayer_with_react_router_v7.md +191 -235
- package/docs/es/intlayer_with_tanstack.md +208 -280
- package/docs/es/intlayer_with_vite+preact.md +13 -13
- package/docs/es/intlayer_with_vite+react.md +14 -13
- package/docs/es/intlayer_with_vite+solid.md +6 -6
- package/docs/es/intlayer_with_vite+svelte.md +6 -6
- package/docs/es/intlayer_with_vite+vue.md +15 -15
- package/docs/es/introduction.md +4 -4
- package/docs/es/locale_mapper.md +4 -6
- package/docs/es/mcp_server.md +13 -9
- package/docs/es/packages/express-intlayer/t.md +4 -4
- package/docs/es/packages/intlayer/getConfiguration.md +4 -4
- package/docs/es/packages/intlayer/getEnumeration.md +4 -4
- package/docs/es/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/es/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/es/packages/intlayer/getLocaleName.md +4 -4
- package/docs/es/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/es/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/es/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/es/packages/intlayer/getTranslation.md +4 -4
- package/docs/es/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/es/packages/next-intlayer/index.md +4 -4
- package/docs/es/packages/next-intlayer/t.md +4 -4
- package/docs/es/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/es/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/es/packages/next-intlayer/useLocale.md +4 -4
- package/docs/es/packages/react-intlayer/index.md +4 -4
- package/docs/es/packages/react-intlayer/t.md +4 -4
- package/docs/es/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/es/packages/react-intlayer/useI18n.md +4 -4
- package/docs/es/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/es/packages/react-intlayer/useLocale.md +4 -4
- package/docs/es/per_locale_file.md +4 -4
- package/docs/es/roadmap.md +7 -5
- package/docs/es/testing.md +4 -7
- package/docs/es/vs_code_extension.md +13 -9
- package/docs/fr/CI_CD.md +4 -4
- package/docs/fr/autoFill.md +10 -8
- package/docs/fr/configuration.md +19 -22
- package/docs/fr/dictionary/content_file.md +7 -7
- package/docs/fr/dictionary/enumeration.md +4 -4
- package/docs/fr/dictionary/file.md +4 -4
- package/docs/fr/dictionary/function_fetching.md +4 -4
- package/docs/fr/dictionary/gender.md +4 -6
- package/docs/fr/dictionary/insertion.md +4 -4
- package/docs/fr/dictionary/translation.md +4 -4
- package/docs/fr/formatters.md +25 -57
- package/docs/fr/how_works_intlayer.md +5 -5
- package/docs/fr/index.md +4 -4
- package/docs/fr/interest_of_intlayer.md +7 -7
- package/docs/fr/intlayer_CMS.md +10 -8
- package/docs/fr/intlayer_cli.md +7 -7
- package/docs/fr/intlayer_visual_editor.md +5 -6
- package/docs/fr/intlayer_with_angular.md +8 -8
- package/docs/fr/intlayer_with_astro.md +244 -0
- package/docs/fr/intlayer_with_create_react_app.md +9 -8
- package/docs/fr/intlayer_with_express.md +8 -8
- package/docs/fr/intlayer_with_lynx+react.md +6 -6
- package/docs/fr/intlayer_with_nestjs.md +8 -10
- package/docs/fr/intlayer_with_nextjs_14.md +4 -4
- package/docs/fr/intlayer_with_nextjs_15.md +7 -6
- package/docs/fr/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/fr/intlayer_with_nuxt.md +6 -6
- package/docs/fr/intlayer_with_react_native+expo.md +17 -26
- package/docs/fr/intlayer_with_react_router_v7.md +192 -252
- package/docs/fr/intlayer_with_tanstack.md +197 -272
- package/docs/fr/intlayer_with_vite+preact.md +13 -13
- package/docs/fr/intlayer_with_vite+react.md +13 -13
- package/docs/fr/intlayer_with_vite+solid.md +6 -6
- package/docs/fr/intlayer_with_vite+svelte.md +6 -6
- package/docs/fr/intlayer_with_vite+vue.md +15 -15
- package/docs/fr/introduction.md +4 -4
- package/docs/fr/locale_mapper.md +4 -6
- package/docs/fr/mcp_server.md +13 -9
- package/docs/fr/packages/express-intlayer/t.md +4 -4
- package/docs/fr/packages/intlayer/getConfiguration.md +4 -4
- package/docs/fr/packages/intlayer/getEnumeration.md +4 -4
- package/docs/fr/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/fr/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/fr/packages/intlayer/getLocaleName.md +4 -4
- package/docs/fr/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/fr/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/fr/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/fr/packages/intlayer/getTranslation.md +4 -4
- package/docs/fr/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/fr/packages/next-intlayer/t.md +4 -4
- package/docs/fr/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/fr/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/fr/packages/next-intlayer/useLocale.md +4 -4
- package/docs/fr/packages/react-intlayer/index.md +4 -4
- package/docs/fr/packages/react-intlayer/t.md +4 -4
- package/docs/fr/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/fr/packages/react-intlayer/useI18n.md +4 -4
- package/docs/fr/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/fr/packages/react-intlayer/useLocale.md +4 -4
- package/docs/fr/per_locale_file.md +4 -4
- package/docs/fr/roadmap.md +7 -5
- package/docs/fr/testing.md +4 -7
- package/docs/fr/vs_code_extension.md +13 -9
- package/docs/hi/CI_CD.md +4 -6
- package/docs/hi/autoFill.md +10 -8
- package/docs/hi/configuration.md +16 -10
- package/docs/hi/dictionary/content_file.md +7 -7
- package/docs/hi/dictionary/enumeration.md +4 -4
- package/docs/hi/dictionary/file.md +4 -4
- package/docs/hi/dictionary/function_fetching.md +4 -4
- package/docs/hi/dictionary/gender.md +4 -6
- package/docs/hi/dictionary/insertion.md +4 -4
- package/docs/hi/dictionary/translation.md +4 -4
- package/docs/hi/formatters.md +19 -33
- package/docs/hi/how_works_intlayer.md +5 -5
- package/docs/hi/index.md +4 -4
- package/docs/hi/interest_of_intlayer.md +7 -7
- package/docs/hi/intlayer_CMS.md +10 -8
- package/docs/hi/intlayer_cli.md +8 -11
- package/docs/hi/intlayer_visual_editor.md +5 -6
- package/docs/hi/intlayer_with_angular.md +8 -8
- package/docs/hi/intlayer_with_astro.md +244 -0
- package/docs/hi/intlayer_with_create_react_app.md +4 -4
- package/docs/hi/intlayer_with_express.md +8 -8
- package/docs/hi/intlayer_with_lynx+react.md +6 -6
- package/docs/hi/intlayer_with_nestjs.md +8 -10
- package/docs/hi/intlayer_with_nextjs_14.md +4 -4
- package/docs/hi/intlayer_with_nextjs_15.md +9 -8
- package/docs/hi/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/hi/intlayer_with_nuxt.md +8 -8
- package/docs/hi/intlayer_with_react_native+expo.md +17 -26
- package/docs/hi/intlayer_with_react_router_v7.md +204 -248
- package/docs/hi/intlayer_with_tanstack.md +215 -290
- package/docs/hi/intlayer_with_vite+preact.md +15 -15
- package/docs/hi/intlayer_with_vite+react.md +16 -15
- package/docs/hi/intlayer_with_vite+solid.md +7 -7
- package/docs/hi/intlayer_with_vite+svelte.md +6 -6
- package/docs/hi/intlayer_with_vite+vue.md +17 -17
- package/docs/hi/introduction.md +4 -4
- package/docs/hi/locale_mapper.md +4 -6
- package/docs/hi/mcp_server.md +13 -9
- package/docs/hi/packages/express-intlayer/t.md +4 -4
- package/docs/hi/packages/intlayer/getConfiguration.md +4 -4
- package/docs/hi/packages/intlayer/getEnumeration.md +4 -4
- package/docs/hi/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/hi/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/hi/packages/intlayer/getLocaleName.md +4 -4
- package/docs/hi/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/hi/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/hi/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/hi/packages/intlayer/getTranslation.md +4 -4
- package/docs/hi/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/hi/packages/intlayer/index.md +4 -4
- package/docs/hi/packages/next-intlayer/t.md +4 -4
- package/docs/hi/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/hi/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/hi/packages/next-intlayer/useLocale.md +4 -4
- package/docs/hi/packages/react-intlayer/t.md +4 -4
- package/docs/hi/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/hi/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/hi/packages/react-intlayer/useLocale.md +4 -4
- package/docs/hi/per_locale_file.md +4 -4
- package/docs/hi/roadmap.md +7 -5
- package/docs/hi/testing.md +4 -7
- package/docs/hi/vs_code_extension.md +13 -9
- package/docs/it/CI_CD.md +4 -6
- package/docs/it/autoFill.md +10 -8
- package/docs/it/configuration.md +16 -10
- package/docs/it/dictionary/content_file.md +7 -7
- package/docs/it/dictionary/enumeration.md +4 -4
- package/docs/it/dictionary/file.md +4 -4
- package/docs/it/dictionary/function_fetching.md +4 -4
- package/docs/it/dictionary/gender.md +4 -6
- package/docs/it/dictionary/insertion.md +4 -4
- package/docs/it/dictionary/translation.md +4 -4
- package/docs/it/formatters.md +19 -55
- package/docs/it/how_works_intlayer.md +5 -5
- package/docs/it/index.md +4 -4
- package/docs/it/interest_of_intlayer.md +7 -7
- package/docs/it/intlayer_CMS.md +10 -8
- package/docs/it/intlayer_cli.md +7 -7
- package/docs/it/intlayer_visual_editor.md +5 -6
- package/docs/it/intlayer_with_angular.md +8 -8
- package/docs/it/intlayer_with_astro.md +244 -0
- package/docs/it/intlayer_with_create_react_app.md +9 -8
- package/docs/it/intlayer_with_express.md +8 -8
- package/docs/it/intlayer_with_lynx+react.md +6 -6
- package/docs/it/intlayer_with_nestjs.md +8 -10
- package/docs/it/intlayer_with_nextjs_14.md +4 -4
- package/docs/it/intlayer_with_nextjs_15.md +9 -8
- package/docs/it/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/it/intlayer_with_nuxt.md +8 -8
- package/docs/it/intlayer_with_react_native+expo.md +17 -27
- package/docs/it/intlayer_with_react_router_v7.md +198 -245
- package/docs/it/intlayer_with_tanstack.md +207 -271
- package/docs/it/intlayer_with_vite+preact.md +15 -15
- package/docs/it/intlayer_with_vite+react.md +20 -17
- package/docs/it/intlayer_with_vite+solid.md +6 -6
- package/docs/it/intlayer_with_vite+svelte.md +6 -6
- package/docs/it/intlayer_with_vite+vue.md +17 -17
- package/docs/it/introduction.md +4 -4
- package/docs/it/locale_mapper.md +4 -6
- package/docs/it/mcp_server.md +13 -9
- package/docs/it/packages/express-intlayer/t.md +4 -4
- package/docs/it/packages/intlayer/getConfiguration.md +4 -4
- package/docs/it/packages/intlayer/getEnumeration.md +4 -4
- package/docs/it/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/it/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/it/packages/intlayer/getLocaleName.md +4 -4
- package/docs/it/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/it/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/it/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/it/packages/intlayer/getTranslation.md +4 -4
- package/docs/it/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/it/packages/next-intlayer/t.md +4 -4
- package/docs/it/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/it/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/it/packages/next-intlayer/useLocale.md +4 -4
- package/docs/it/packages/react-intlayer/t.md +4 -4
- package/docs/it/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/it/packages/react-intlayer/useI18n.md +4 -4
- package/docs/it/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/it/packages/react-intlayer/useLocale.md +4 -4
- package/docs/it/per_locale_file.md +4 -4
- package/docs/it/roadmap.md +7 -5
- package/docs/it/testing.md +4 -7
- package/docs/it/vs_code_extension.md +13 -9
- package/docs/ja/CI_CD.md +4 -6
- package/docs/ja/autoFill.md +10 -8
- package/docs/ja/configuration.md +19 -22
- package/docs/ja/dictionary/content_file.md +7 -7
- package/docs/ja/dictionary/enumeration.md +4 -4
- package/docs/ja/dictionary/file.md +5 -5
- package/docs/ja/dictionary/function_fetching.md +4 -4
- package/docs/ja/dictionary/gender.md +4 -6
- package/docs/ja/dictionary/insertion.md +4 -4
- package/docs/ja/dictionary/translation.md +4 -4
- package/docs/ja/formatters.md +25 -57
- package/docs/ja/how_works_intlayer.md +5 -5
- package/docs/ja/index.md +4 -4
- package/docs/ja/interest_of_intlayer.md +7 -7
- package/docs/ja/intlayer_CMS.md +10 -9
- package/docs/ja/intlayer_cli.md +7 -7
- package/docs/ja/intlayer_visual_editor.md +5 -6
- package/docs/ja/intlayer_with_angular.md +8 -8
- package/docs/ja/intlayer_with_astro.md +244 -0
- package/docs/ja/intlayer_with_create_react_app.md +9 -8
- package/docs/ja/intlayer_with_express.md +8 -8
- package/docs/ja/intlayer_with_lynx+react.md +6 -6
- package/docs/ja/intlayer_with_nestjs.md +8 -10
- package/docs/ja/intlayer_with_nextjs_14.md +8 -8
- package/docs/ja/intlayer_with_nextjs_15.md +9 -8
- package/docs/ja/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/ja/intlayer_with_nuxt.md +8 -8
- package/docs/ja/intlayer_with_react_native+expo.md +24 -35
- package/docs/ja/intlayer_with_react_router_v7.md +207 -253
- package/docs/ja/intlayer_with_tanstack.md +220 -290
- package/docs/ja/intlayer_with_vite+preact.md +15 -15
- package/docs/ja/intlayer_with_vite+react.md +18 -17
- package/docs/ja/intlayer_with_vite+solid.md +6 -6
- package/docs/ja/intlayer_with_vite+svelte.md +6 -6
- package/docs/ja/intlayer_with_vite+vue.md +17 -17
- package/docs/ja/introduction.md +4 -4
- package/docs/ja/locale_mapper.md +4 -6
- package/docs/ja/mcp_server.md +13 -9
- package/docs/ja/packages/express-intlayer/t.md +4 -4
- package/docs/ja/packages/intlayer/getConfiguration.md +4 -4
- package/docs/ja/packages/intlayer/getEnumeration.md +4 -4
- package/docs/ja/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/ja/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/ja/packages/intlayer/getLocaleName.md +4 -4
- package/docs/ja/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/ja/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/ja/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/ja/packages/intlayer/getTranslation.md +4 -4
- package/docs/ja/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/ja/packages/next-intlayer/t.md +4 -4
- package/docs/ja/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/ja/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/ja/packages/next-intlayer/useLocale.md +4 -4
- package/docs/ja/packages/react-intlayer/t.md +4 -4
- package/docs/ja/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/ja/packages/react-intlayer/useI18n.md +4 -4
- package/docs/ja/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/ja/packages/react-intlayer/useLocale.md +4 -4
- package/docs/ja/per_locale_file.md +4 -4
- package/docs/ja/roadmap.md +7 -5
- package/docs/ja/testing.md +4 -7
- package/docs/ja/vs_code_extension.md +13 -9
- package/docs/ko/CI_CD.md +4 -6
- package/docs/ko/autoFill.md +10 -8
- package/docs/ko/configuration.md +19 -22
- package/docs/ko/dictionary/content_file.md +7 -7
- package/docs/ko/dictionary/enumeration.md +4 -4
- package/docs/ko/dictionary/file.md +4 -4
- package/docs/ko/dictionary/function_fetching.md +4 -4
- package/docs/ko/dictionary/gender.md +4 -6
- package/docs/ko/dictionary/insertion.md +4 -4
- package/docs/ko/dictionary/translation.md +4 -4
- package/docs/ko/formatters.md +19 -33
- package/docs/ko/how_works_intlayer.md +5 -5
- package/docs/ko/index.md +4 -4
- package/docs/ko/interest_of_intlayer.md +7 -7
- package/docs/ko/intlayer_CMS.md +10 -8
- package/docs/ko/intlayer_cli.md +7 -7
- package/docs/ko/intlayer_visual_editor.md +5 -6
- package/docs/ko/intlayer_with_angular.md +8 -8
- package/docs/ko/intlayer_with_astro.md +244 -0
- package/docs/ko/intlayer_with_create_react_app.md +9 -8
- package/docs/ko/intlayer_with_express.md +8 -8
- package/docs/ko/intlayer_with_lynx+react.md +6 -10
- package/docs/ko/intlayer_with_nestjs.md +8 -10
- package/docs/ko/intlayer_with_nextjs_14.md +8 -8
- package/docs/ko/intlayer_with_nextjs_15.md +9 -8
- package/docs/ko/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/ko/intlayer_with_nuxt.md +8 -8
- package/docs/ko/intlayer_with_react_native+expo.md +25 -34
- package/docs/ko/intlayer_with_react_router_v7.md +195 -249
- package/docs/ko/intlayer_with_tanstack.md +202 -274
- package/docs/ko/intlayer_with_vite+preact.md +15 -15
- package/docs/ko/intlayer_with_vite+react.md +17 -16
- package/docs/ko/intlayer_with_vite+solid.md +6 -6
- package/docs/ko/intlayer_with_vite+svelte.md +6 -6
- package/docs/ko/intlayer_with_vite+vue.md +17 -17
- package/docs/ko/introduction.md +4 -4
- package/docs/ko/locale_mapper.md +4 -6
- package/docs/ko/mcp_server.md +13 -9
- package/docs/ko/packages/express-intlayer/t.md +4 -4
- package/docs/ko/packages/intlayer/getConfiguration.md +4 -4
- package/docs/ko/packages/intlayer/getEnumeration.md +4 -4
- package/docs/ko/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/ko/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/ko/packages/intlayer/getLocaleName.md +4 -4
- package/docs/ko/packages/intlayer/getLocalizedUrl.md +7 -16
- package/docs/ko/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/ko/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/ko/packages/intlayer/getTranslation.md +4 -4
- package/docs/ko/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/ko/packages/next-intlayer/t.md +4 -4
- package/docs/ko/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/ko/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/ko/packages/next-intlayer/useLocale.md +4 -4
- package/docs/ko/packages/react-intlayer/t.md +4 -4
- package/docs/ko/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/ko/packages/react-intlayer/useI18n.md +4 -4
- package/docs/ko/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/ko/packages/react-intlayer/useLocale.md +4 -4
- package/docs/ko/per_locale_file.md +4 -4
- package/docs/ko/roadmap.md +7 -5
- package/docs/ko/testing.md +4 -7
- package/docs/ko/vs_code_extension.md +13 -9
- package/docs/pt/CI_CD.md +4 -6
- package/docs/pt/autoFill.md +10 -8
- package/docs/pt/configuration.md +16 -22
- package/docs/pt/dictionary/content_file.md +7 -7
- package/docs/pt/dictionary/enumeration.md +4 -4
- package/docs/pt/dictionary/file.md +4 -4
- package/docs/pt/dictionary/function_fetching.md +4 -4
- package/docs/pt/dictionary/gender.md +4 -6
- package/docs/pt/dictionary/insertion.md +4 -4
- package/docs/pt/dictionary/translation.md +4 -4
- package/docs/pt/formatters.md +19 -33
- package/docs/pt/how_works_intlayer.md +5 -5
- package/docs/pt/index.md +4 -4
- package/docs/pt/interest_of_intlayer.md +7 -7
- package/docs/pt/intlayer_CMS.md +10 -8
- package/docs/pt/intlayer_cli.md +7 -7
- package/docs/pt/intlayer_visual_editor.md +5 -6
- package/docs/pt/intlayer_with_angular.md +8 -8
- package/docs/pt/intlayer_with_astro.md +244 -0
- package/docs/pt/intlayer_with_create_react_app.md +9 -8
- package/docs/pt/intlayer_with_express.md +8 -8
- package/docs/pt/intlayer_with_lynx+react.md +6 -6
- package/docs/pt/intlayer_with_nestjs.md +8 -10
- package/docs/pt/intlayer_with_nextjs_14.md +4 -4
- package/docs/pt/intlayer_with_nextjs_15.md +9 -8
- package/docs/pt/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/pt/intlayer_with_nuxt.md +8 -8
- package/docs/pt/intlayer_with_react_native+expo.md +17 -26
- package/docs/pt/intlayer_with_react_router_v7.md +10 -18
- package/docs/pt/intlayer_with_tanstack.md +189 -266
- package/docs/pt/intlayer_with_vite+preact.md +15 -15
- package/docs/pt/intlayer_with_vite+react.md +16 -15
- package/docs/pt/intlayer_with_vite+solid.md +6 -6
- package/docs/pt/intlayer_with_vite+svelte.md +6 -6
- package/docs/pt/intlayer_with_vite+vue.md +15 -15
- package/docs/pt/introduction.md +4 -5
- package/docs/pt/locale_mapper.md +4 -6
- package/docs/pt/mcp_server.md +13 -9
- package/docs/pt/packages/express-intlayer/t.md +4 -4
- package/docs/pt/packages/intlayer/getConfiguration.md +4 -4
- package/docs/pt/packages/intlayer/getEnumeration.md +4 -4
- package/docs/pt/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/pt/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/pt/packages/intlayer/getLocaleName.md +4 -4
- package/docs/pt/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/pt/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/pt/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/pt/packages/intlayer/getTranslation.md +4 -4
- package/docs/pt/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/pt/packages/next-intlayer/t.md +4 -4
- package/docs/pt/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/pt/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/pt/packages/next-intlayer/useLocale.md +4 -4
- package/docs/pt/packages/react-intlayer/t.md +4 -4
- package/docs/pt/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/pt/packages/react-intlayer/useI18n.md +4 -4
- package/docs/pt/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/pt/packages/react-intlayer/useLocale.md +4 -4
- package/docs/pt/per_locale_file.md +4 -4
- package/docs/pt/roadmap.md +7 -5
- package/docs/pt/testing.md +4 -7
- package/docs/pt/vs_code_extension.md +13 -9
- package/docs/ru/CI_CD.md +4 -6
- package/docs/ru/autoFill.md +10 -8
- package/docs/ru/configuration.md +16 -10
- package/docs/ru/dictionary/content_file.md +7 -7
- package/docs/ru/dictionary/enumeration.md +4 -4
- package/docs/ru/dictionary/file.md +4 -4
- package/docs/ru/dictionary/function_fetching.md +4 -4
- package/docs/ru/dictionary/gender.md +4 -6
- package/docs/ru/dictionary/insertion.md +4 -4
- package/docs/ru/dictionary/translation.md +4 -4
- package/docs/ru/formatters.md +20 -77
- package/docs/ru/how_works_intlayer.md +5 -5
- package/docs/ru/index.md +4 -4
- package/docs/ru/interest_of_intlayer.md +7 -7
- package/docs/ru/intlayer_CMS.md +10 -8
- package/docs/ru/intlayer_cli.md +7 -7
- package/docs/ru/intlayer_visual_editor.md +5 -5
- package/docs/ru/intlayer_with_angular.md +8 -8
- package/docs/ru/intlayer_with_astro.md +244 -0
- package/docs/ru/intlayer_with_create_react_app.md +9 -8
- package/docs/ru/intlayer_with_express.md +8 -8
- package/docs/ru/intlayer_with_lynx+react.md +6 -6
- package/docs/ru/intlayer_with_nestjs.md +8 -10
- package/docs/ru/intlayer_with_nextjs_14.md +4 -4
- package/docs/ru/intlayer_with_nextjs_15.md +9 -8
- package/docs/ru/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/ru/intlayer_with_nuxt.md +8 -8
- package/docs/ru/intlayer_with_react_native+expo.md +17 -26
- package/docs/ru/intlayer_with_react_router_v7.md +197 -243
- package/docs/ru/intlayer_with_tanstack.md +203 -277
- package/docs/ru/intlayer_with_vite+preact.md +15 -15
- package/docs/ru/intlayer_with_vite+react.md +16 -15
- package/docs/ru/intlayer_with_vite+solid.md +6 -6
- package/docs/ru/intlayer_with_vite+svelte.md +6 -6
- package/docs/ru/intlayer_with_vite+vue.md +17 -17
- package/docs/ru/introduction.md +4 -4
- package/docs/ru/locale_mapper.md +4 -6
- package/docs/ru/mcp_server.md +13 -9
- package/docs/ru/packages/express-intlayer/t.md +4 -4
- package/docs/ru/packages/intlayer/getConfiguration.md +4 -4
- package/docs/ru/packages/intlayer/getEnumeration.md +4 -4
- package/docs/ru/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/ru/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/ru/packages/intlayer/getLocaleName.md +4 -4
- package/docs/ru/packages/intlayer/getLocalizedUrl.md +4 -4
- package/docs/ru/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/ru/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/ru/packages/intlayer/getTranslation.md +4 -4
- package/docs/ru/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/ru/packages/next-intlayer/t.md +4 -4
- package/docs/ru/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/ru/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/ru/packages/next-intlayer/useLocale.md +4 -4
- package/docs/ru/packages/react-intlayer/t.md +4 -4
- package/docs/ru/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/ru/packages/react-intlayer/useI18n.md +4 -4
- package/docs/ru/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/ru/packages/react-intlayer/useLocale.md +4 -4
- package/docs/ru/per_locale_file.md +4 -4
- package/docs/ru/roadmap.md +7 -5
- package/docs/ru/testing.md +4 -7
- package/docs/ru/vs_code_extension.md +13 -9
- package/docs/tr/CI_CD.md +4 -6
- package/docs/tr/autoFill.md +10 -8
- package/docs/tr/configuration.md +19 -22
- package/docs/tr/dictionary/condition.md +4 -10
- package/docs/tr/dictionary/content_file.md +7 -7
- package/docs/tr/dictionary/enumeration.md +4 -10
- package/docs/tr/dictionary/file.md +4 -10
- package/docs/tr/dictionary/function_fetching.md +4 -10
- package/docs/tr/dictionary/gender.md +4 -10
- package/docs/tr/dictionary/insertion.md +4 -10
- package/docs/tr/dictionary/markdown.md +4 -10
- package/docs/tr/dictionary/nesting.md +4 -10
- package/docs/tr/dictionary/translation.md +4 -10
- package/docs/tr/formatters.md +19 -33
- package/docs/tr/how_works_intlayer.md +6 -8
- package/docs/tr/index.md +5 -7
- package/docs/tr/interest_of_intlayer.md +7 -7
- package/docs/tr/intlayer_CMS.md +10 -8
- package/docs/tr/intlayer_cli.md +8 -8
- package/docs/tr/intlayer_visual_editor.md +5 -7
- package/docs/tr/intlayer_with_angular.md +10 -12
- package/docs/tr/intlayer_with_astro.md +244 -0
- package/docs/tr/intlayer_with_create_react_app.md +10 -12
- package/docs/tr/intlayer_with_express.md +9 -11
- package/docs/tr/intlayer_with_lynx+react.md +7 -9
- package/docs/tr/intlayer_with_nestjs.md +8 -10
- package/docs/tr/intlayer_with_nextjs_14.md +11 -11
- package/docs/tr/intlayer_with_nextjs_15.md +14 -13
- package/docs/tr/intlayer_with_nextjs_page_router.md +14 -14
- package/docs/tr/intlayer_with_nuxt.md +10 -12
- package/docs/tr/intlayer_with_react_native+expo.md +18 -29
- package/docs/tr/intlayer_with_react_router_v7.md +225 -270
- package/docs/tr/intlayer_with_tanstack.md +401 -304
- package/docs/tr/intlayer_with_vite+preact.md +18 -24
- package/docs/tr/intlayer_with_vite+react.md +18 -24
- package/docs/tr/intlayer_with_vite+solid.md +8 -14
- package/docs/tr/intlayer_with_vite+svelte.md +8 -14
- package/docs/tr/intlayer_with_vite+vue.md +18 -24
- package/docs/tr/introduction.md +5 -7
- package/docs/tr/locale_mapper.md +4 -6
- package/docs/tr/mcp_server.md +13 -9
- package/docs/tr/packages/express-intlayer/t.md +4 -6
- package/docs/tr/packages/intlayer/getConfiguration.md +4 -10
- package/docs/tr/packages/intlayer/getEnumeration.md +4 -10
- package/docs/tr/packages/intlayer/getHTMLTextDir.md +4 -10
- package/docs/tr/packages/intlayer/getLocaleLang.md +4 -10
- package/docs/tr/packages/intlayer/getLocaleName.md +4 -10
- package/docs/tr/packages/intlayer/getLocalizedUrl.md +4 -10
- package/docs/tr/packages/intlayer/getMultilingualUrls.md +4 -10
- package/docs/tr/packages/intlayer/getPathWithoutLocale.md +4 -10
- package/docs/tr/packages/intlayer/getTranslation.md +4 -10
- package/docs/tr/packages/intlayer/getTranslationContent.md +4 -10
- package/docs/tr/packages/next-intlayer/t.md +4 -6
- package/docs/tr/packages/next-intlayer/useDictionary.md +4 -6
- package/docs/tr/packages/next-intlayer/useIntlayer.md +4 -6
- package/docs/tr/packages/next-intlayer/useLocale.md +4 -6
- package/docs/tr/packages/react-intlayer/t.md +4 -6
- package/docs/tr/packages/react-intlayer/useDictionary.md +10 -273
- package/docs/tr/packages/react-intlayer/useI18n.md +5 -5
- package/docs/tr/packages/react-intlayer/useIntlayer.md +4 -6
- package/docs/tr/packages/react-intlayer/useLocale.md +4 -6
- package/docs/tr/per_locale_file.md +4 -6
- package/docs/tr/roadmap.md +11 -9
- package/docs/tr/testing.md +4 -7
- package/docs/tr/vs_code_extension.md +13 -9
- package/docs/zh/CI_CD.md +4 -6
- package/docs/zh/autoFill.md +10 -8
- package/docs/zh/configuration.md +19 -22
- package/docs/zh/dictionary/content_file.md +7 -7
- package/docs/zh/dictionary/enumeration.md +4 -4
- package/docs/zh/dictionary/file.md +4 -4
- package/docs/zh/dictionary/function_fetching.md +4 -4
- package/docs/zh/dictionary/gender.md +4 -6
- package/docs/zh/dictionary/insertion.md +4 -4
- package/docs/zh/dictionary/translation.md +4 -4
- package/docs/zh/formatters.md +19 -55
- package/docs/zh/how_works_intlayer.md +5 -5
- package/docs/zh/index.md +4 -4
- package/docs/zh/interest_of_intlayer.md +7 -7
- package/docs/zh/intlayer_CMS.md +10 -9
- package/docs/zh/intlayer_cli.md +7 -7
- package/docs/zh/intlayer_visual_editor.md +5 -6
- package/docs/zh/intlayer_with_angular.md +8 -8
- package/docs/zh/intlayer_with_astro.md +244 -0
- package/docs/zh/intlayer_with_create_react_app.md +9 -8
- package/docs/zh/intlayer_with_express.md +8 -8
- package/docs/zh/intlayer_with_lynx+react.md +6 -6
- package/docs/zh/intlayer_with_nestjs.md +8 -10
- package/docs/zh/intlayer_with_nextjs_14.md +8 -8
- package/docs/zh/intlayer_with_nextjs_15.md +9 -8
- package/docs/zh/intlayer_with_nextjs_page_router.md +8 -8
- package/docs/zh/intlayer_with_nuxt.md +8 -8
- package/docs/zh/intlayer_with_react_native+expo.md +25 -34
- package/docs/zh/intlayer_with_react_router_v7.md +204 -252
- package/docs/zh/intlayer_with_tanstack.md +211 -288
- package/docs/zh/intlayer_with_vite+preact.md +15 -15
- package/docs/zh/intlayer_with_vite+react.md +16 -15
- package/docs/zh/intlayer_with_vite+solid.md +6 -6
- package/docs/zh/intlayer_with_vite+svelte.md +6 -6
- package/docs/zh/intlayer_with_vite+vue.md +15 -15
- package/docs/zh/introduction.md +4 -4
- package/docs/zh/locale_mapper.md +4 -6
- package/docs/zh/mcp_server.md +13 -9
- package/docs/zh/packages/express-intlayer/t.md +4 -4
- package/docs/zh/packages/intlayer/getConfiguration.md +4 -4
- package/docs/zh/packages/intlayer/getEnumeration.md +4 -4
- package/docs/zh/packages/intlayer/getHTMLTextDir.md +4 -4
- package/docs/zh/packages/intlayer/getLocaleLang.md +4 -4
- package/docs/zh/packages/intlayer/getLocaleName.md +4 -4
- package/docs/zh/packages/intlayer/getLocalizedUrl.md +7 -16
- package/docs/zh/packages/intlayer/getMultilingualUrls.md +4 -4
- package/docs/zh/packages/intlayer/getPathWithoutLocale.md +4 -4
- package/docs/zh/packages/intlayer/getTranslation.md +4 -4
- package/docs/zh/packages/intlayer/getTranslationContent.md +4 -4
- package/docs/zh/packages/next-intlayer/t.md +4 -4
- package/docs/zh/packages/next-intlayer/useDictionary.md +4 -4
- package/docs/zh/packages/next-intlayer/useIntlayer.md +4 -4
- package/docs/zh/packages/next-intlayer/useLocale.md +4 -4
- package/docs/zh/packages/react-intlayer/t.md +4 -4
- package/docs/zh/packages/react-intlayer/useDictionary.md +4 -4
- package/docs/zh/packages/react-intlayer/useI18n.md +4 -4
- package/docs/zh/packages/react-intlayer/useIntlayer.md +4 -4
- package/docs/zh/packages/react-intlayer/useLocale.md +4 -4
- package/docs/zh/per_locale_file.md +4 -4
- package/docs/zh/roadmap.md +7 -5
- package/docs/zh/testing.md +4 -7
- package/docs/zh/vs_code_extension.md +13 -9
- package/frequent_questions/ar/bun_set_up.md +54 -0
- package/frequent_questions/de/bun_set_up.md +54 -0
- package/frequent_questions/en/bun_set_up.md +54 -0
- package/frequent_questions/en-GB/bun_set_up.md +54 -0
- package/frequent_questions/es/bun_set_up.md +54 -0
- package/frequent_questions/fr/bun_set_up.md +54 -0
- package/frequent_questions/hi/bun_set_up.md +55 -0
- package/frequent_questions/it/bun_set_up.md +55 -0
- package/frequent_questions/ja/bun_set_up.md +54 -0
- package/frequent_questions/ko/bun_set_up.md +54 -0
- package/frequent_questions/pt/bun_set_up.md +55 -0
- package/frequent_questions/ru/bun_set_up.md +55 -0
- package/frequent_questions/tr/bun_set_up.md +55 -0
- package/frequent_questions/zh/bun_set_up.md +54 -0
- package/package.json +42 -47
- package/src/blog.ts +16 -8
- package/src/common.ts +7 -8
- package/src/doc.ts +18 -8
- package/src/frequentQuestions.ts +23 -8
- package/src/generated/blog.entry.ts +152 -84
- package/src/generated/docs.entry.ts +536 -219
- package/src/generated/frequentQuestions.entry.ts +122 -56
- package/src/generated/legal.entry.ts +32 -24
- package/src/legal.ts +16 -8
- package/LICENSE +0 -202
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/docs/de/packages/@intlayer/api/index.md +0 -56
- package/docs/de/packages/@intlayer/chokidar/index.md +0 -56
- package/docs/de/packages/@intlayer/cli/index.md +0 -45
- package/docs/de/packages/@intlayer/config/index.md +0 -140
- package/docs/de/packages/@intlayer/core/index.md +0 -49
- package/docs/de/packages/@intlayer/design-system/index.md +0 -45
- package/docs/de/packages/@intlayer/dictionary-entry/index.md +0 -45
- package/docs/de/packages/@intlayer/editor/index.md +0 -45
- package/docs/de/packages/@intlayer/editor-react/index.md +0 -45
- package/docs/de/packages/@intlayer/webpack/index.md +0 -59
- package/docs/de/packages/angular-intlayer/index.md +0 -53
- package/docs/de/packages/express-intlayer/index.md +0 -284
- package/docs/de/packages/intlayer/index.md +0 -500
- package/docs/de/packages/intlayer-cli/index.md +0 -65
- package/docs/de/packages/intlayer-editor/index.md +0 -137
- package/docs/de/packages/lynx-intlayer/index.md +0 -83
- package/docs/de/packages/next-intlayer/index.md +0 -285
- package/docs/de/packages/nuxt-intlayer/index.md +0 -53
- package/docs/de/packages/preact-intlayer/index.md +0 -53
- package/docs/de/packages/react-intlayer/index.md +0 -280
- package/docs/de/packages/react-native-intlayer/index.md +0 -83
- package/docs/de/packages/react-scripts-intlayer/index.md +0 -80
- package/docs/de/packages/solid-intlayer/index.md +0 -54
- package/docs/de/packages/svelte-intlayer/index.md +0 -53
- package/docs/de/packages/vite-intlayer/index.md +0 -76
- package/docs/de/packages/vue-intlayer/index.md +0 -53
- package/docs/es/packages/angular-intlayer/index.md +0 -53
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-10-05
|
|
3
|
+
updatedAt: 2025-10-05
|
|
4
|
+
title: How to translate your Next.js 15 using next-intl – i18n guide 2025
|
|
5
|
+
description: Discover how to make your Next.js 15 App Router website multilingual. Follow the documentation to internationalize (i18n) and translate it.
|
|
6
|
+
keywords:
|
|
7
|
+
- Internationalization
|
|
8
|
+
- Documentation
|
|
9
|
+
- Intlayer
|
|
10
|
+
- Next.js 15
|
|
11
|
+
- next-intl
|
|
12
|
+
- JavaScript
|
|
13
|
+
- React
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- next-intl
|
|
17
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-next-intl-template
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Translate your Next.js 15 using next-intl website using Intlayer | Internationalization (i18n)
|
|
21
|
+
|
|
22
|
+
This guide walks you through next-intl best practices in a Next.js 15 (App Router) app, and shows how to layer Intlayer on top for robust translation management and automation.
|
|
23
|
+
|
|
24
|
+
See the comparison in [next-i18next vs next-intl vs Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/next-i18next_vs_next-intl_vs_intlayer.md).
|
|
25
|
+
|
|
26
|
+
- For juniors: follow step-by-step sections to get a working multilingual app.
|
|
27
|
+
- For mid-level devs: pay attention to payload optimization and server/client separation.
|
|
28
|
+
- For seniors: note static generation, middleware, SEO integration, and automation hooks.
|
|
29
|
+
|
|
30
|
+
What we’ll cover:
|
|
31
|
+
|
|
32
|
+
- Setup and file structure
|
|
33
|
+
- Optimizing how messages are loaded
|
|
34
|
+
- Client and server component usage
|
|
35
|
+
- Metadata, sitemap, robots for SEO
|
|
36
|
+
- Middleware for locale routing
|
|
37
|
+
- Adding Intlayer on top (CLI and automation)
|
|
38
|
+
|
|
39
|
+
## Set up your application using next-intl
|
|
40
|
+
|
|
41
|
+
Install the next-intl dependencies:
|
|
42
|
+
|
|
43
|
+
```bash packageManager="npm"
|
|
44
|
+
npm install next-intl
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash packageManager="pnpm"
|
|
48
|
+
pnpm add next-intl
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash packageManager="yarn"
|
|
52
|
+
yarn add next-intl
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
.
|
|
57
|
+
├── locales
|
|
58
|
+
│ ├── en
|
|
59
|
+
│ │ ├── common.json
|
|
60
|
+
│ │ └── about.json
|
|
61
|
+
│ ├── fr
|
|
62
|
+
│ │ ├── common.json
|
|
63
|
+
│ │ └── about.json
|
|
64
|
+
│ └── es
|
|
65
|
+
│ ├── common.json
|
|
66
|
+
│ └── about.json
|
|
67
|
+
└── src
|
|
68
|
+
├── i18n.ts
|
|
69
|
+
├── middleware.ts
|
|
70
|
+
├── app
|
|
71
|
+
│ └── [locale]
|
|
72
|
+
│ ├── layout.tsx
|
|
73
|
+
│ └── about
|
|
74
|
+
│ └── page.tsx
|
|
75
|
+
└── components
|
|
76
|
+
├── ClientComponentExample.tsx
|
|
77
|
+
└── ServerComponent.tsx
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Setup and Loading Content
|
|
81
|
+
|
|
82
|
+
Load only the namespaces your routes need and validate locales early. Keep server components synchronous when possible and push only the required messages to the client.
|
|
83
|
+
|
|
84
|
+
```tsx fileName="src/i18n.ts"
|
|
85
|
+
import { getRequestConfig } from "next-intl/server";
|
|
86
|
+
import { notFound } from "next/navigation";
|
|
87
|
+
|
|
88
|
+
export const locales = ["en", "fr", "es"] as const;
|
|
89
|
+
export const defaultLocale = "en" as const;
|
|
90
|
+
|
|
91
|
+
async function loadMessages(locale: string) {
|
|
92
|
+
// Load only the namespaces your layout/pages need
|
|
93
|
+
const [common, about] = await Promise.all([
|
|
94
|
+
import(`../locales/${locale}/common.json`).then((m) => m.default),
|
|
95
|
+
import(`../locales/${locale}/about.json`).then((m) => m.default),
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
return { common, about } as const;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export default getRequestConfig(async ({ locale }) => {
|
|
102
|
+
if (!locales.includes(locale as any)) notFound();
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
messages: await loadMessages(locale),
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```tsx fileName="src/app/[locale]/layout.tsx"
|
|
111
|
+
import type { ReactNode } from "react";
|
|
112
|
+
import { locales } from "@/i18n";
|
|
113
|
+
import {
|
|
114
|
+
getLocaleDirection,
|
|
115
|
+
unstable_setRequestLocale,
|
|
116
|
+
} from "next-intl/server";
|
|
117
|
+
|
|
118
|
+
export const dynamic = "force-static";
|
|
119
|
+
|
|
120
|
+
export function generateStaticParams() {
|
|
121
|
+
return locales.map((locale) => ({ locale }));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export default async function LocaleLayout({
|
|
125
|
+
children,
|
|
126
|
+
params,
|
|
127
|
+
}: {
|
|
128
|
+
children: ReactNode;
|
|
129
|
+
params: { locale: string };
|
|
130
|
+
}) {
|
|
131
|
+
const { locale } = params;
|
|
132
|
+
|
|
133
|
+
// Set the active request locale for this server render (RSC)
|
|
134
|
+
unstable_setRequestLocale(locale);
|
|
135
|
+
|
|
136
|
+
const dir = getLocaleDirection(locale);
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<html lang={locale} dir={dir}>
|
|
140
|
+
<body>{children}</body>
|
|
141
|
+
</html>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
147
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
148
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
149
|
+
import pick from "lodash/pick";
|
|
150
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
151
|
+
import ClientComponentExample from "@/components/ClientComponentExample";
|
|
152
|
+
|
|
153
|
+
export const dynamic = "force-static";
|
|
154
|
+
|
|
155
|
+
export default async function AboutPage({
|
|
156
|
+
params,
|
|
157
|
+
}: {
|
|
158
|
+
params: { locale: string };
|
|
159
|
+
}) {
|
|
160
|
+
const { locale } = params;
|
|
161
|
+
|
|
162
|
+
// Messages are loaded server-side. Push only what's needed to the client.
|
|
163
|
+
const messages = await getMessages();
|
|
164
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
165
|
+
|
|
166
|
+
// Strictly server-side translations/formatting
|
|
167
|
+
const tAbout = await getTranslations("about");
|
|
168
|
+
const tCounter = await getTranslations("about.counter");
|
|
169
|
+
const format = await getFormatter();
|
|
170
|
+
|
|
171
|
+
const initialFormattedCount = format.number(0);
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
175
|
+
<main>
|
|
176
|
+
<h1>{tAbout("title")}</h1>
|
|
177
|
+
<ClientComponentExample />
|
|
178
|
+
<ServerComponent
|
|
179
|
+
formattedCount={initialFormattedCount}
|
|
180
|
+
label={tCounter("label")}
|
|
181
|
+
increment={tCounter("increment")}
|
|
182
|
+
/>
|
|
183
|
+
</main>
|
|
184
|
+
</NextIntlClientProvider>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Usage in a client component
|
|
190
|
+
|
|
191
|
+
Let's take an example of a client component rendering a counter.
|
|
192
|
+
|
|
193
|
+
**Translations (shape reused; load them into next-intl messages as you prefer)**
|
|
194
|
+
|
|
195
|
+
```json fileName="locales/en/about.json"
|
|
196
|
+
{
|
|
197
|
+
"counter": {
|
|
198
|
+
"label": "Counter",
|
|
199
|
+
"increment": "Increment"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```json fileName="locales/fr/about.json"
|
|
205
|
+
{
|
|
206
|
+
"counter": {
|
|
207
|
+
"label": "Compteur",
|
|
208
|
+
"increment": "Incrémenter"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Client component**
|
|
214
|
+
|
|
215
|
+
```tsx fileName="src/components/ClientComponentExample.tsx"
|
|
216
|
+
"use client";
|
|
217
|
+
|
|
218
|
+
import React, { useState } from "react";
|
|
219
|
+
import { useTranslations, useFormatter } from "next-intl";
|
|
220
|
+
|
|
221
|
+
const ClientComponentExample = () => {
|
|
222
|
+
// Scope directly to the nested object
|
|
223
|
+
const t = useTranslations("about.counter");
|
|
224
|
+
const format = useFormatter();
|
|
225
|
+
const [count, setCount] = useState(0);
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<div>
|
|
229
|
+
<p>{format.number(count)}</p>
|
|
230
|
+
<button
|
|
231
|
+
aria-label={t("label")}
|
|
232
|
+
onClick={() => setCount((count) => count + 1)}
|
|
233
|
+
>
|
|
234
|
+
{t("increment")}
|
|
235
|
+
</button>
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
> Don't forget to add "about" message on the page client message
|
|
242
|
+
> (only include the namespaces your client actually needs).
|
|
243
|
+
|
|
244
|
+
### Usage in a server component
|
|
245
|
+
|
|
246
|
+
This UI component is a server component and can be rendered under a client component (page → client → server). Keep it synchronous by passing precomputed strings.
|
|
247
|
+
|
|
248
|
+
```tsx fileName="src/components/ServerComponent.tsx"
|
|
249
|
+
type ServerComponentProps = {
|
|
250
|
+
formattedCount: string;
|
|
251
|
+
label: string;
|
|
252
|
+
increment: string;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
const ServerComponent = ({
|
|
256
|
+
formattedCount,
|
|
257
|
+
label,
|
|
258
|
+
increment,
|
|
259
|
+
}: ServerComponentProps) => {
|
|
260
|
+
return (
|
|
261
|
+
<div>
|
|
262
|
+
<p>{formattedCount}</p>
|
|
263
|
+
<button aria-label={label}>{increment}</button>
|
|
264
|
+
</div>
|
|
265
|
+
);
|
|
266
|
+
};
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Notes:
|
|
270
|
+
|
|
271
|
+
- Compute `formattedCount` server-side (e.g., `const initialFormattedCount = format.number(0)`).
|
|
272
|
+
- Avoid passing functions or non-serializable objects into server components.
|
|
273
|
+
|
|
274
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
275
|
+
import type { Metadata } from "next";
|
|
276
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
277
|
+
import { getTranslations } from "next-intl/server";
|
|
278
|
+
|
|
279
|
+
function localizedPath(locale: string, path: string) {
|
|
280
|
+
return locale === defaultLocale ? path : "/" + locale + path;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export async function generateMetadata({
|
|
284
|
+
params,
|
|
285
|
+
}: {
|
|
286
|
+
params: { locale: string };
|
|
287
|
+
}): Promise<Metadata> {
|
|
288
|
+
const { locale } = params;
|
|
289
|
+
const t = await getTranslations({ locale, namespace: "about" });
|
|
290
|
+
|
|
291
|
+
const url = "/about";
|
|
292
|
+
const languages = Object.fromEntries(
|
|
293
|
+
locales.map((locale) => [locale, localizedPath(locale, url)])
|
|
294
|
+
);
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
title: t("title"),
|
|
298
|
+
description: t("description"),
|
|
299
|
+
alternates: {
|
|
300
|
+
canonical: localizedPath(locale, url),
|
|
301
|
+
languages: { ...languages, "x-default": url },
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// ... Rest of the page code
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
```tsx fileName="src/app/sitemap.ts"
|
|
310
|
+
import type { MetadataRoute } from "next";
|
|
311
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
312
|
+
|
|
313
|
+
const origin = "https://example.com";
|
|
314
|
+
|
|
315
|
+
const formatterLocalizedPath = (locale: string, path: string) =>
|
|
316
|
+
locale === defaultLocale ? origin + path : origin + "/" + locale + path;
|
|
317
|
+
|
|
318
|
+
export default function sitemap(): MetadataRoute.Sitemap {
|
|
319
|
+
const aboutLanguages = Object.fromEntries(
|
|
320
|
+
locales.map((l) => [l, formatterLocalizedPath(l, "/about")])
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
return [
|
|
324
|
+
{
|
|
325
|
+
url: formatterLocalizedPath(defaultLocale, "/about"),
|
|
326
|
+
lastModified: new Date(),
|
|
327
|
+
changeFrequency: "monthly",
|
|
328
|
+
priority: 0.7,
|
|
329
|
+
alternates: { languages: aboutLanguages },
|
|
330
|
+
},
|
|
331
|
+
];
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
```tsx fileName="src/app/robots.ts"
|
|
336
|
+
import type { MetadataRoute } from "next";
|
|
337
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
338
|
+
|
|
339
|
+
const origin = "https://example.com";
|
|
340
|
+
const withAllLocales = (path: string) => [
|
|
341
|
+
path,
|
|
342
|
+
...locales
|
|
343
|
+
.filter((locale) => locale !== defaultLocale)
|
|
344
|
+
.map((locale) => "/" + locale + path),
|
|
345
|
+
];
|
|
346
|
+
|
|
347
|
+
export default function robots(): MetadataRoute.Robots {
|
|
348
|
+
const disallow = [
|
|
349
|
+
...withAllLocales("/dashboard"),
|
|
350
|
+
...withAllLocales("/admin"),
|
|
351
|
+
];
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
rules: { userAgent: "*", allow: ["/"], disallow },
|
|
355
|
+
host: origin,
|
|
356
|
+
sitemap: origin + "/sitemap.xml",
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Middleware for locale routing
|
|
362
|
+
|
|
363
|
+
Add a middleware to handle locale detection and routing:
|
|
364
|
+
|
|
365
|
+
```ts fileName="src/middleware.ts"
|
|
366
|
+
import createMiddleware from "next-intl/middleware";
|
|
367
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
368
|
+
|
|
369
|
+
export default createMiddleware({
|
|
370
|
+
locales: [...locales],
|
|
371
|
+
defaultLocale,
|
|
372
|
+
localeDetection: true,
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
export const config = {
|
|
376
|
+
// Skip API, Next internals and static assets
|
|
377
|
+
matcher: ["/((?!api|_next|.*\\..*).*)"],
|
|
378
|
+
};
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Best practices
|
|
382
|
+
|
|
383
|
+
- **Set html `lang` and `dir`**: In `src/app/[locale]/layout.tsx`, compute `dir` via `getLocaleDirection(locale)` and set `<html lang={locale} dir={dir}>`.
|
|
384
|
+
- **Split messages by namespace**: Organize JSON per locale and namespace (e.g., `common.json`, `about.json`).
|
|
385
|
+
- **Minimize client payload**: On pages, send only required namespaces to `NextIntlClientProvider` (e.g., `pick(messages, ['common', 'about'])`).
|
|
386
|
+
- **Prefer static pages**: Export `export const dynamic = 'force-static'` and generate static params for all `locales`.
|
|
387
|
+
- **Synchronous server components**: Pass precomputed strings (translated labels, formatted numbers) rather than async calls or non-serializable functions.
|
|
388
|
+
|
|
389
|
+
## Implement Intlayer on top of next-intl
|
|
390
|
+
|
|
391
|
+
Install the intlayer dependencies:
|
|
392
|
+
|
|
393
|
+
```bash packageManager="npm"
|
|
394
|
+
npm install intlayer @intlayer/sync-json-plugin -D
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
```bash packageManager="yarn"
|
|
398
|
+
yarn add intlayer @intlayer/sync-json-plugin -D
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
```bash packageManager="pnpm"
|
|
402
|
+
pnpm add intlayer @intlayer/sync-json-plugin -D
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Create the intlayer configuration file:
|
|
406
|
+
|
|
407
|
+
```tsx fileName="intlayer.config.ts"
|
|
408
|
+
import { type IntlayerConfig, Locales } from "intlayer";
|
|
409
|
+
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
410
|
+
|
|
411
|
+
const config: IntlayerConfig = {
|
|
412
|
+
internationalization: {
|
|
413
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
414
|
+
defaultLocale: Locales.ENGLISH,
|
|
415
|
+
},
|
|
416
|
+
ai: {
|
|
417
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
418
|
+
},
|
|
419
|
+
plugins: [
|
|
420
|
+
// Keep your per-namespace folder structure in sync with Intlayer
|
|
421
|
+
syncJSON({
|
|
422
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
423
|
+
}),
|
|
424
|
+
],
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export default config;
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Add `package.json` scripts:
|
|
431
|
+
|
|
432
|
+
```json fileName="package.json"
|
|
433
|
+
{
|
|
434
|
+
"scripts": {
|
|
435
|
+
"i18n:fill": "intlayer fill",
|
|
436
|
+
"i18n:test": "intlayer test"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Notes:
|
|
442
|
+
|
|
443
|
+
- `intlayer fill`: uses your AI provider to fill missing translations based on your configured locales.
|
|
444
|
+
- `intlayer test`: checks for missing/invalid translations (use it in CI).
|
|
445
|
+
|
|
446
|
+
You can configure arguments and providers; see [Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-12-06
|
|
3
3
|
updatedAt: 2025-09-22
|
|
4
|
-
title:
|
|
4
|
+
title: How to translate your Next.js 14 and App Router – i18n guide 2025
|
|
5
5
|
description: Discover how to make your Next.js 14 App Router website multilingual. Follow the documentation to internationalize (i18n) and translate it.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internationalization
|
|
@@ -16,9 +16,25 @@ slugs:
|
|
|
16
16
|
- nextjs
|
|
17
17
|
- 14
|
|
18
18
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-14-template
|
|
19
|
+
history:
|
|
20
|
+
- version: 6.2.0
|
|
21
|
+
date: 2025-10-09
|
|
22
|
+
changes: Added docs for `useLocale` hook with `onLocaleChange` option
|
|
23
|
+
- version: 5.6.6
|
|
24
|
+
date: 2025-10-02
|
|
25
|
+
changes: Added docs for `getLocale` function on server actions
|
|
26
|
+
- version: 5.6.2
|
|
27
|
+
date: 2025-09-22
|
|
28
|
+
changes: Added docs for `multipleMiddlewares` helper
|
|
29
|
+
- version: 5.6.0
|
|
30
|
+
date: 2025-07-06
|
|
31
|
+
changes: Transform `withIntlayer()` function to a promise based function
|
|
32
|
+
- version: 5.5.10
|
|
33
|
+
date: 2025-06-29
|
|
34
|
+
changes: Init history
|
|
19
35
|
---
|
|
20
36
|
|
|
21
|
-
#
|
|
37
|
+
# Translate your Next.js 14 and App Router website using Intlayer | Internationalization (i18n)
|
|
22
38
|
|
|
23
39
|
See [Application Template](https://github.com/aymericzip/intlayer-next-14-template) on GitHub.
|
|
24
40
|
|
|
@@ -58,7 +74,7 @@ yarn add intlayer next-intlayer
|
|
|
58
74
|
|
|
59
75
|
- **intlayer**
|
|
60
76
|
|
|
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/
|
|
77
|
+
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
78
|
|
|
63
79
|
- **next-intlayer**
|
|
64
80
|
|
|
@@ -141,7 +157,14 @@ export default withIntlayer(nextConfig);
|
|
|
141
157
|
|
|
142
158
|
> The `withIntlayer()` Next.js plugin is used to integrate Intlayer with Next.js. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the [Webpack](https://webpack.js.org/) or [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack) environments. Additionally, it provides aliases to optimize performance and ensures compatibility with server components.
|
|
143
159
|
|
|
144
|
-
> The `withIntlayer()`
|
|
160
|
+
> The `withIntlayer()` function is a promise function. If you want to use it with other plugins, you can await it. Example:
|
|
161
|
+
>
|
|
162
|
+
> ```tsx
|
|
163
|
+
> const nextConfig = await withIntlayer(nextConfig);
|
|
164
|
+
> const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
|
|
165
|
+
>
|
|
166
|
+
> export default nextConfigWithOtherPlugins;
|
|
167
|
+
> ```
|
|
145
168
|
|
|
146
169
|
### Step 4: Configure Middleware for Locale Detection
|
|
147
170
|
|
|
@@ -203,7 +226,10 @@ Remove everything from `RootLayout` and replace it with the following code:
|
|
|
203
226
|
import type { PropsWithChildren, FC } from "react";
|
|
204
227
|
import "./globals.css";
|
|
205
228
|
|
|
206
|
-
const RootLayout: FC<PropsWithChildren> = ({ children }) =>
|
|
229
|
+
const RootLayout: FC<PropsWithChildren> = ({ children }) => (
|
|
230
|
+
// You can still wrap the children with other providers, Like `next-themes`, `react-query`, `framer-motion`, etc.
|
|
231
|
+
<>{children}</>
|
|
232
|
+
);
|
|
207
233
|
|
|
208
234
|
export default RootLayout;
|
|
209
235
|
```
|
|
@@ -211,7 +237,10 @@ export default RootLayout;
|
|
|
211
237
|
```jsx fileName="src/app/layout.mjx" codeFormat="esm"
|
|
212
238
|
import "./globals.css";
|
|
213
239
|
|
|
214
|
-
const RootLayout = ({ children }) =>
|
|
240
|
+
const RootLayout = ({ children }) => (
|
|
241
|
+
// You can still wrap the children with other providers, Like `next-themes`, `react-query`, `framer-motion`, etc.
|
|
242
|
+
<>{children}</>
|
|
243
|
+
);
|
|
215
244
|
|
|
216
245
|
export default RootLayout;
|
|
217
246
|
```
|
|
@@ -219,7 +248,10 @@ export default RootLayout;
|
|
|
219
248
|
```jsx fileName="src/app/layout.csx" codeFormat="commonjs"
|
|
220
249
|
require("./globals.css");
|
|
221
250
|
|
|
222
|
-
const RootLayout = ({ children }) =>
|
|
251
|
+
const RootLayout = ({ children }) => (
|
|
252
|
+
// You can still wrap the children with other providers, Like `next-themes`, `react-query`, `framer-motion`, etc.
|
|
253
|
+
<>{children}</>
|
|
254
|
+
);
|
|
223
255
|
|
|
224
256
|
module.exports = {
|
|
225
257
|
default: RootLayout,
|
|
@@ -414,7 +446,7 @@ module.exports = pageContent;
|
|
|
414
446
|
|
|
415
447
|
> 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
448
|
|
|
417
|
-
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/
|
|
449
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
|
|
418
450
|
|
|
419
451
|
### Step 7: Utilize Content in Your Code
|
|
420
452
|
|
|
@@ -1078,8 +1110,8 @@ import { type FC } from "react";
|
|
|
1078
1110
|
import Link from "next/link";
|
|
1079
1111
|
|
|
1080
1112
|
const LocaleSwitcher: FC = () => {
|
|
1081
|
-
const { locale, pathWithoutLocale, availableLocales } =
|
|
1082
|
-
|
|
1113
|
+
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1114
|
+
useLocale();
|
|
1083
1115
|
|
|
1084
1116
|
return (
|
|
1085
1117
|
<div>
|
|
@@ -1091,7 +1123,8 @@ const LocaleSwitcher: FC = () => {
|
|
|
1091
1123
|
hrefLang={localeItem}
|
|
1092
1124
|
key={localeItem}
|
|
1093
1125
|
aria-current={locale === localeItem ? "page" : undefined}
|
|
1094
|
-
onClick={() =>
|
|
1126
|
+
onClick={() => setLocale(localeItem)}
|
|
1127
|
+
replace // Will ensure that the "go back" browser button will redirect to the previous page
|
|
1095
1128
|
>
|
|
1096
1129
|
<span>
|
|
1097
1130
|
{/* Locale - e.g. FR */}
|
|
@@ -1130,8 +1163,8 @@ import { useLocale } from "next-intlayer";
|
|
|
1130
1163
|
import Link from "next/link";
|
|
1131
1164
|
|
|
1132
1165
|
const LocaleSwitcher = () => {
|
|
1133
|
-
const { locale, pathWithoutLocale, availableLocales } =
|
|
1134
|
-
|
|
1166
|
+
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1167
|
+
useLocale();
|
|
1135
1168
|
|
|
1136
1169
|
return (
|
|
1137
1170
|
<div>
|
|
@@ -1143,7 +1176,8 @@ const LocaleSwitcher = () => {
|
|
|
1143
1176
|
hrefLang={localeItem}
|
|
1144
1177
|
key={localeItem}
|
|
1145
1178
|
aria-current={locale === localeItem ? "page" : undefined}
|
|
1146
|
-
onClick={() =>
|
|
1179
|
+
onClick={() => setLocale(localeItem)}
|
|
1180
|
+
replace // Will ensure that the "go back" browser button will redirect to the previous page
|
|
1147
1181
|
>
|
|
1148
1182
|
<span>
|
|
1149
1183
|
{/* Locale - e.g. FR */}
|
|
@@ -1182,8 +1216,8 @@ const { useLocale } = require("next-intlayer");
|
|
|
1182
1216
|
const Link = require("next/link");
|
|
1183
1217
|
|
|
1184
1218
|
const LocaleSwitcher = () => {
|
|
1185
|
-
const { locale, pathWithoutLocale, availableLocales } =
|
|
1186
|
-
|
|
1219
|
+
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1220
|
+
useLocale();
|
|
1187
1221
|
|
|
1188
1222
|
return (
|
|
1189
1223
|
<div>
|
|
@@ -1195,7 +1229,8 @@ const LocaleSwitcher = () => {
|
|
|
1195
1229
|
hrefLang={localeItem}
|
|
1196
1230
|
key={localeItem}
|
|
1197
1231
|
aria-current={locale === localeItem ? "page" : undefined}
|
|
1198
|
-
onClick={() =>
|
|
1232
|
+
onClick={() => setLocale(localeItem)}
|
|
1233
|
+
replace // Will ensure that the "go back" browser button will redirect to the previous page
|
|
1199
1234
|
>
|
|
1200
1235
|
<span>
|
|
1201
1236
|
{/* Locale - e.g. FR */}
|
|
@@ -1221,11 +1256,11 @@ const LocaleSwitcher = () => {
|
|
|
1221
1256
|
};
|
|
1222
1257
|
```
|
|
1223
1258
|
|
|
1224
|
-
> An alternative way is to use the `setLocale` function provided by the `useLocale` hook. This function will not allow prefetching the page
|
|
1259
|
+
> An alternative way is to use the `setLocale` function provided by the `useLocale` hook. This function will not allow prefetching the page. See the [`useLocale` hook documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/next-intlayer/useLocale.md) for more details.
|
|
1225
1260
|
|
|
1226
|
-
>
|
|
1261
|
+
> You can also set a function in the `onLocaleChange` option to trigger a custom function when the locale changes.
|
|
1227
1262
|
|
|
1228
|
-
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
1263
|
+
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
1229
1264
|
"use client";
|
|
1230
1265
|
|
|
1231
1266
|
import { useRouter } from "next/navigation";
|
|
@@ -1414,6 +1449,15 @@ export const myServerAction = async () => {
|
|
|
1414
1449
|
};
|
|
1415
1450
|
```
|
|
1416
1451
|
|
|
1452
|
+
> The `getLocale` function follows a cascading strategy to determine the user's locale:
|
|
1453
|
+
>
|
|
1454
|
+
> 1. First, it checks the request headers for a locale value that may have been set by the middleware
|
|
1455
|
+
> 2. If no locale is found in headers, it looks for a locale stored in cookies
|
|
1456
|
+
> 3. If no cookie is found, it attempts to detect the user's preferred language from their browser settings
|
|
1457
|
+
> 4. As a last resort, it falls back to the application's configured default locale
|
|
1458
|
+
>
|
|
1459
|
+
> This ensures the most appropriate locale is selected based on available context.
|
|
1460
|
+
|
|
1417
1461
|
### (Optional) Step 13: Optmize your bundle size
|
|
1418
1462
|
|
|
1419
1463
|
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.
|
|
@@ -1440,9 +1484,9 @@ yarn add @intlayer/swc --save-dev
|
|
|
1440
1484
|
|
|
1441
1485
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
1442
1486
|
|
|
1443
|
-

|
|
1444
1488
|
|
|
1445
|
-

|
|
1446
1490
|
|
|
1447
1491
|
Ensure your TypeScript configuration includes the autogenerated types.
|
|
1448
1492
|
|
|
@@ -1485,12 +1529,3 @@ For more details on how to use the extension, refer to the [Intlayer VS Code Ext
|
|
|
1485
1529
|
### Go Further
|
|
1486
1530
|
|
|
1487
1531
|
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).
|
|
1488
|
-
|
|
1489
|
-
## Doc History
|
|
1490
|
-
|
|
1491
|
-
| Version | Date | Changes |
|
|
1492
|
-
| ------- | ---------- | --------------------------------------------------------------- |
|
|
1493
|
-
| 5.6.6 | 2025-10-02 | Added docs for `getLocale` function on server actions |
|
|
1494
|
-
| 5.6.2 | 2025-09-22 | Added docs for `multipleMiddlewares` helper |
|
|
1495
|
-
| 5.6.0 | 2025-07-06 | Transform `withIntlayer()` function to a promise based function |
|
|
1496
|
-
| 5.5.10 | 2025-06-29 | Init history |
|