@intlayer/docs 6.1.6 → 7.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +14 -0
- 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 -1134
- 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 -1109
- 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 -70
- 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 +6 -6
- package/docs/ar/intlayer_with_astro.md +6 -8
- package/docs/ar/intlayer_with_create_react_app.md +6 -6
- package/docs/ar/intlayer_with_express.md +6 -6
- package/docs/ar/intlayer_with_lynx+react.md +6 -6
- package/docs/ar/intlayer_with_nestjs.md +6 -8
- package/docs/ar/intlayer_with_nextjs_14.md +2 -2
- package/docs/ar/intlayer_with_nextjs_15.md +7 -6
- package/docs/ar/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/ar/intlayer_with_nuxt.md +6 -6
- package/docs/ar/intlayer_with_react_native+expo.md +6 -6
- package/docs/ar/intlayer_with_react_router_v7.md +9 -9
- package/docs/ar/intlayer_with_tanstack.md +6 -8
- package/docs/ar/intlayer_with_vite+preact.md +6 -6
- package/docs/ar/intlayer_with_vite+react.md +7 -7
- 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 +6 -6
- 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 +6 -6
- package/docs/de/intlayer_with_astro.md +6 -8
- package/docs/de/intlayer_with_create_react_app.md +2 -2
- package/docs/de/intlayer_with_express.md +6 -6
- package/docs/de/intlayer_with_lynx+react.md +6 -6
- package/docs/de/intlayer_with_nestjs.md +6 -8
- package/docs/de/intlayer_with_nextjs_14.md +2 -2
- package/docs/de/intlayer_with_nextjs_15.md +7 -6
- package/docs/de/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/de/intlayer_with_nuxt.md +6 -6
- package/docs/de/intlayer_with_react_native+expo.md +6 -6
- package/docs/de/intlayer_with_react_router_v7.md +9 -9
- package/docs/de/intlayer_with_tanstack.md +6 -8
- package/docs/de/intlayer_with_vite+preact.md +6 -6
- package/docs/de/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +5 -7
- package/docs/en/index.md +4 -6
- package/docs/en/interest_of_intlayer.md +7 -7
- package/docs/en/intlayer_CMS.md +12 -12
- package/docs/en/intlayer_cli.md +96 -13
- package/docs/en/intlayer_visual_editor.md +14 -10
- package/docs/en/intlayer_with_angular.md +6 -8
- package/docs/en/intlayer_with_astro.md +6 -8
- package/docs/en/intlayer_with_create_react_app.md +6 -8
- package/docs/en/intlayer_with_express.md +6 -8
- package/docs/en/intlayer_with_lynx+react.md +6 -8
- package/docs/en/intlayer_with_nestjs.md +6 -8
- 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 +53 -27
- package/docs/en/intlayer_with_nextjs_15.md +68 -31
- package/docs/en/intlayer_with_nextjs_16.md +1586 -0
- package/docs/en/intlayer_with_nextjs_page_router.md +18 -10
- package/docs/en/intlayer_with_nuxt.md +6 -8
- package/docs/en/intlayer_with_react_native+expo.md +9 -9
- package/docs/en/intlayer_with_react_router_v7.md +9 -9
- package/docs/en/intlayer_with_tanstack.md +9 -9
- package/docs/en/intlayer_with_vite+preact.md +6 -8
- package/docs/en/intlayer_with_vite+react.md +56 -305
- package/docs/en/intlayer_with_vite+solid.md +6 -8
- package/docs/en/intlayer_with_vite+svelte.md +6 -8
- package/docs/en/intlayer_with_vite+vue.md +6 -8
- package/docs/en/introduction.md +4 -6
- 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 +4 -6
- package/docs/en/packages/next-intlayer/useIntlayer.md +4 -6
- 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 +4 -6
- package/docs/en/packages/react-intlayer/useI18n.md +4 -4
- package/docs/en/packages/react-intlayer/useIntlayer.md +4 -6
- 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 +6 -0
- package/docs/en/releases/v7.md +486 -0
- package/docs/en/roadmap.md +10 -8
- 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 +5 -5
- package/docs/en-GB/intlayer_with_astro.md +5 -7
- package/docs/en-GB/intlayer_with_create_react_app.md +6 -6
- package/docs/en-GB/intlayer_with_express.md +6 -6
- package/docs/en-GB/intlayer_with_lynx+react.md +5 -5
- package/docs/en-GB/intlayer_with_nestjs.md +5 -7
- package/docs/en-GB/intlayer_with_nextjs_14.md +6 -6
- package/docs/en-GB/intlayer_with_nextjs_15.md +6 -5
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +5 -5
- package/docs/en-GB/intlayer_with_nuxt.md +5 -5
- package/docs/en-GB/intlayer_with_react_native+expo.md +5 -5
- package/docs/en-GB/intlayer_with_react_router_v7.md +8 -8
- package/docs/en-GB/intlayer_with_tanstack.md +8 -8
- package/docs/en-GB/intlayer_with_vite+preact.md +5 -5
- package/docs/en-GB/intlayer_with_vite+react.md +6 -5
- 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 +5 -5
- 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 +4 -4
- 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 +4 -4
- 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 +6 -6
- package/docs/es/intlayer_with_astro.md +6 -8
- package/docs/es/intlayer_with_create_react_app.md +6 -6
- package/docs/es/intlayer_with_express.md +6 -6
- 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 +6 -6
- package/docs/es/intlayer_with_nextjs_15.md +7 -6
- 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 +6 -6
- package/docs/es/intlayer_with_react_router_v7.md +9 -9
- package/docs/es/intlayer_with_tanstack.md +6 -8
- package/docs/es/intlayer_with_vite+preact.md +6 -6
- package/docs/es/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +6 -6
- package/docs/fr/intlayer_with_astro.md +6 -8
- package/docs/fr/intlayer_with_create_react_app.md +6 -6
- package/docs/fr/intlayer_with_express.md +6 -6
- package/docs/fr/intlayer_with_lynx+react.md +6 -6
- package/docs/fr/intlayer_with_nestjs.md +6 -8
- package/docs/fr/intlayer_with_nextjs_14.md +2 -2
- 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 +6 -6
- package/docs/fr/intlayer_with_react_router_v7.md +9 -9
- package/docs/fr/intlayer_with_tanstack.md +6 -8
- package/docs/fr/intlayer_with_vite+preact.md +6 -6
- package/docs/fr/intlayer_with_vite+react.md +6 -6
- 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 +6 -6
- 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 +7 -7
- package/docs/hi/intlayer_visual_editor.md +5 -6
- package/docs/hi/intlayer_with_angular.md +6 -6
- package/docs/hi/intlayer_with_astro.md +6 -8
- package/docs/hi/intlayer_with_create_react_app.md +2 -2
- package/docs/hi/intlayer_with_express.md +6 -6
- package/docs/hi/intlayer_with_lynx+react.md +6 -6
- package/docs/hi/intlayer_with_nestjs.md +6 -8
- package/docs/hi/intlayer_with_nextjs_14.md +2 -2
- package/docs/hi/intlayer_with_nextjs_15.md +7 -6
- package/docs/hi/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/hi/intlayer_with_nuxt.md +6 -6
- package/docs/hi/intlayer_with_react_native+expo.md +6 -6
- package/docs/hi/intlayer_with_react_router_v7.md +9 -9
- package/docs/hi/intlayer_with_tanstack.md +9 -9
- package/docs/hi/intlayer_with_vite+preact.md +6 -6
- package/docs/hi/intlayer_with_vite+react.md +7 -6
- package/docs/hi/intlayer_with_vite+solid.md +6 -6
- package/docs/hi/intlayer_with_vite+svelte.md +6 -6
- package/docs/hi/intlayer_with_vite+vue.md +6 -6
- 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 +6 -6
- package/docs/it/intlayer_with_astro.md +6 -8
- package/docs/it/intlayer_with_create_react_app.md +6 -6
- package/docs/it/intlayer_with_express.md +6 -6
- package/docs/it/intlayer_with_lynx+react.md +6 -6
- package/docs/it/intlayer_with_nestjs.md +6 -8
- package/docs/it/intlayer_with_nextjs_14.md +2 -2
- package/docs/it/intlayer_with_nextjs_15.md +7 -6
- package/docs/it/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/it/intlayer_with_nuxt.md +6 -6
- package/docs/it/intlayer_with_react_native+expo.md +6 -6
- package/docs/it/intlayer_with_react_router_v7.md +9 -9
- package/docs/it/intlayer_with_tanstack.md +9 -9
- package/docs/it/intlayer_with_vite+preact.md +6 -6
- package/docs/it/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +6 -6
- package/docs/ja/intlayer_with_astro.md +6 -8
- package/docs/ja/intlayer_with_create_react_app.md +6 -6
- package/docs/ja/intlayer_with_express.md +6 -6
- package/docs/ja/intlayer_with_lynx+react.md +6 -6
- package/docs/ja/intlayer_with_nestjs.md +6 -8
- package/docs/ja/intlayer_with_nextjs_14.md +6 -6
- package/docs/ja/intlayer_with_nextjs_15.md +7 -6
- package/docs/ja/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/ja/intlayer_with_nuxt.md +6 -6
- package/docs/ja/intlayer_with_react_native+expo.md +6 -6
- package/docs/ja/intlayer_with_react_router_v7.md +9 -9
- package/docs/ja/intlayer_with_tanstack.md +6 -8
- package/docs/ja/intlayer_with_vite+preact.md +6 -6
- package/docs/ja/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +6 -6
- package/docs/ko/intlayer_with_astro.md +6 -8
- package/docs/ko/intlayer_with_create_react_app.md +6 -6
- package/docs/ko/intlayer_with_express.md +6 -6
- package/docs/ko/intlayer_with_lynx+react.md +6 -10
- package/docs/ko/intlayer_with_nestjs.md +6 -8
- package/docs/ko/intlayer_with_nextjs_14.md +6 -6
- package/docs/ko/intlayer_with_nextjs_15.md +7 -6
- package/docs/ko/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/ko/intlayer_with_nuxt.md +6 -6
- package/docs/ko/intlayer_with_react_native+expo.md +6 -6
- package/docs/ko/intlayer_with_react_router_v7.md +9 -9
- package/docs/ko/intlayer_with_tanstack.md +6 -8
- package/docs/ko/intlayer_with_vite+preact.md +6 -6
- package/docs/ko/intlayer_with_vite+react.md +8 -7
- 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 +6 -6
- 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 +6 -6
- package/docs/pt/intlayer_with_astro.md +6 -8
- package/docs/pt/intlayer_with_create_react_app.md +6 -6
- package/docs/pt/intlayer_with_express.md +6 -6
- package/docs/pt/intlayer_with_lynx+react.md +6 -6
- package/docs/pt/intlayer_with_nestjs.md +6 -8
- package/docs/pt/intlayer_with_nextjs_14.md +2 -2
- package/docs/pt/intlayer_with_nextjs_15.md +7 -6
- package/docs/pt/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/pt/intlayer_with_nuxt.md +6 -6
- package/docs/pt/intlayer_with_react_native+expo.md +6 -6
- package/docs/pt/intlayer_with_react_router_v7.md +6 -8
- package/docs/pt/intlayer_with_tanstack.md +6 -8
- package/docs/pt/intlayer_with_vite+preact.md +6 -6
- package/docs/pt/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +6 -6
- package/docs/ru/intlayer_with_astro.md +6 -8
- package/docs/ru/intlayer_with_create_react_app.md +6 -6
- package/docs/ru/intlayer_with_express.md +6 -6
- package/docs/ru/intlayer_with_lynx+react.md +6 -6
- package/docs/ru/intlayer_with_nestjs.md +6 -8
- package/docs/ru/intlayer_with_nextjs_14.md +2 -2
- package/docs/ru/intlayer_with_nextjs_15.md +7 -6
- package/docs/ru/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/ru/intlayer_with_nuxt.md +6 -6
- package/docs/ru/intlayer_with_react_native+expo.md +6 -6
- package/docs/ru/intlayer_with_react_router_v7.md +9 -9
- package/docs/ru/intlayer_with_tanstack.md +6 -8
- package/docs/ru/intlayer_with_vite+preact.md +6 -6
- package/docs/ru/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +5 -7
- package/docs/tr/index.md +4 -6
- package/docs/tr/interest_of_intlayer.md +7 -7
- package/docs/tr/intlayer_CMS.md +10 -8
- package/docs/tr/intlayer_cli.md +7 -7
- package/docs/tr/intlayer_visual_editor.md +5 -7
- package/docs/tr/intlayer_with_angular.md +6 -8
- package/docs/tr/intlayer_with_astro.md +6 -8
- package/docs/tr/intlayer_with_create_react_app.md +6 -8
- package/docs/tr/intlayer_with_express.md +6 -8
- package/docs/tr/intlayer_with_lynx+react.md +6 -8
- package/docs/tr/intlayer_with_nestjs.md +6 -8
- package/docs/tr/intlayer_with_nextjs_14.md +9 -9
- package/docs/tr/intlayer_with_nextjs_15.md +10 -9
- package/docs/tr/intlayer_with_nextjs_page_router.md +9 -9
- package/docs/tr/intlayer_with_nuxt.md +6 -8
- package/docs/tr/intlayer_with_react_native+expo.md +6 -8
- package/docs/tr/intlayer_with_react_router_v7.md +9 -9
- package/docs/tr/intlayer_with_tanstack.md +9 -9
- package/docs/tr/intlayer_with_vite+preact.md +6 -12
- package/docs/tr/intlayer_with_vite+react.md +6 -12
- package/docs/tr/intlayer_with_vite+solid.md +6 -12
- package/docs/tr/intlayer_with_vite+svelte.md +6 -12
- package/docs/tr/intlayer_with_vite+vue.md +6 -12
- package/docs/tr/introduction.md +4 -6
- 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 +4 -4
- 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 +10 -8
- 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 +6 -6
- package/docs/zh/intlayer_with_astro.md +6 -8
- package/docs/zh/intlayer_with_create_react_app.md +6 -6
- package/docs/zh/intlayer_with_express.md +6 -6
- package/docs/zh/intlayer_with_lynx+react.md +6 -6
- package/docs/zh/intlayer_with_nestjs.md +6 -8
- package/docs/zh/intlayer_with_nextjs_14.md +6 -6
- package/docs/zh/intlayer_with_nextjs_15.md +7 -6
- package/docs/zh/intlayer_with_nextjs_page_router.md +6 -6
- package/docs/zh/intlayer_with_nuxt.md +6 -6
- package/docs/zh/intlayer_with_react_native+expo.md +6 -6
- package/docs/zh/intlayer_with_react_router_v7.md +9 -9
- package/docs/zh/intlayer_with_tanstack.md +6 -8
- package/docs/zh/intlayer_with_vite+preact.md +6 -6
- package/docs/zh/intlayer_with_vite+react.md +7 -6
- 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 +6 -6
- 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 +523 -222
- 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
|
@@ -1396,6 +1396,20 @@ export const config = {
|
|
|
1396
1396
|
|
|
1397
1397
|
Intlayer provides built-in middleware handling through the `next-intlayer` package configuration.
|
|
1398
1398
|
|
|
1399
|
+
```ts fileName="src/middleware.ts"
|
|
1400
|
+
import { intlayerMiddleware } from 'next-intlayer/middleware';
|
|
1401
|
+
|
|
1402
|
+
export const middleware = intlayerMiddleware()
|
|
1403
|
+
|
|
1404
|
+
// applies this middleware only to files in the app directory
|
|
1405
|
+
export const config = {
|
|
1406
|
+
matcher:
|
|
1407
|
+
"/((?!api|_next|static|.*\\..*).*)",
|
|
1408
|
+
};
|
|
1409
|
+
```
|
|
1410
|
+
|
|
1411
|
+
The set up of the middleware centralized in the `intlayer.config.ts` file.
|
|
1412
|
+
|
|
1399
1413
|
</TabItem>
|
|
1400
1414
|
</Tab>
|
|
1401
1415
|
|
|
@@ -22,30 +22,30 @@
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
```ts fileName="i18n.config.ts"
|
|
25
|
-
export const locales = [
|
|
25
|
+
export const locales = ["en", "fr"] as const;
|
|
26
26
|
export type Locale = (typeof locales)[number];
|
|
27
27
|
|
|
28
|
-
export const defaultLocale: Locale =
|
|
28
|
+
export const defaultLocale: Locale = "en";
|
|
29
29
|
|
|
30
|
-
export const rtlLocales = [
|
|
30
|
+
export const rtlLocales = ["ar", "he", "fa", "ur"] as const;
|
|
31
31
|
export const isRtl = (locale: string) =>
|
|
32
32
|
(rtlLocales as readonly string[]).includes(locale);
|
|
33
33
|
|
|
34
34
|
export function localizedPath(locale: string, path: string) {
|
|
35
|
-
return locale === defaultLocale ? path :
|
|
35
|
+
return locale === defaultLocale ? path : "/" + locale + path;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const ORIGIN =
|
|
38
|
+
const ORIGIN = "https://example.com";
|
|
39
39
|
export function abs(locale: string, path: string) {
|
|
40
40
|
return ORIGIN + localizedPath(locale, path);
|
|
41
41
|
}
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
```ts fileName="src/app/i18n/server.ts"
|
|
45
|
-
import { createInstance } from
|
|
46
|
-
import { initReactI18next } from
|
|
47
|
-
import resourcesToBackend from
|
|
48
|
-
import { defaultLocale } from
|
|
45
|
+
import { createInstance } from "i18next";
|
|
46
|
+
import { initReactI18next } from "react-i18next/initReactI18next";
|
|
47
|
+
import resourcesToBackend from "i18next-resources-to-backend";
|
|
48
|
+
import { defaultLocale } from "@/i18n.config";
|
|
49
49
|
|
|
50
50
|
// Load JSON resources from src/locales/<locale>/<namespace>.json
|
|
51
51
|
const backend = resourcesToBackend(
|
|
@@ -55,7 +55,7 @@ const backend = resourcesToBackend(
|
|
|
55
55
|
|
|
56
56
|
export async function initI18next(
|
|
57
57
|
locale: string,
|
|
58
|
-
namespaces: string[] = [
|
|
58
|
+
namespaces: string[] = ["common"]
|
|
59
59
|
) {
|
|
60
60
|
const i18n = createInstance();
|
|
61
61
|
await i18n
|
|
@@ -65,7 +65,7 @@ export async function initI18next(
|
|
|
65
65
|
lng: locale,
|
|
66
66
|
fallbackLng: defaultLocale,
|
|
67
67
|
ns: namespaces,
|
|
68
|
-
defaultNS:
|
|
68
|
+
defaultNS: "common",
|
|
69
69
|
interpolation: { escapeValue: false },
|
|
70
70
|
react: { useSuspense: false },
|
|
71
71
|
});
|
|
@@ -74,14 +74,14 @@ export async function initI18next(
|
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
```tsx fileName="src/components/I18nProvider.tsx"
|
|
77
|
-
|
|
77
|
+
"use client";
|
|
78
78
|
|
|
79
|
-
import * as React from
|
|
80
|
-
import { I18nextProvider } from
|
|
81
|
-
import { createInstance } from
|
|
82
|
-
import { initReactI18next } from
|
|
83
|
-
import resourcesToBackend from
|
|
84
|
-
import { defaultLocale } from
|
|
79
|
+
import * as React from "react";
|
|
80
|
+
import { I18nextProvider } from "react-i18next";
|
|
81
|
+
import { createInstance } from "i18next";
|
|
82
|
+
import { initReactI18next } from "react-i18next/initReactI18next";
|
|
83
|
+
import resourcesToBackend from "i18next-resources-to-backend";
|
|
84
|
+
import { defaultLocale } from "@/i18n.config";
|
|
85
85
|
|
|
86
86
|
const backend = resourcesToBackend(
|
|
87
87
|
(locale: string, namespace: string) =>
|
|
@@ -97,7 +97,7 @@ type Props = {
|
|
|
97
97
|
|
|
98
98
|
export default function I18nProvider({
|
|
99
99
|
locale,
|
|
100
|
-
namespaces = [
|
|
100
|
+
namespaces = ["common"],
|
|
101
101
|
resources,
|
|
102
102
|
children,
|
|
103
103
|
}: Props) {
|
|
@@ -111,7 +111,7 @@ export default function I18nProvider({
|
|
|
111
111
|
fallbackLng: defaultLocale,
|
|
112
112
|
ns: namespaces,
|
|
113
113
|
resources: resources ? { [locale]: resources } : undefined,
|
|
114
|
-
defaultNS:
|
|
114
|
+
defaultNS: "common",
|
|
115
115
|
interpolation: { escapeValue: false },
|
|
116
116
|
react: { useSuspense: false },
|
|
117
117
|
});
|
|
@@ -124,8 +124,8 @@ export default function I18nProvider({
|
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
```tsx fileName="src/app/[locale]/layout.tsx"
|
|
127
|
-
import type { ReactNode } from
|
|
128
|
-
import { locales, defaultLocale, isRtl, type Locale } from
|
|
127
|
+
import type { ReactNode } from "react";
|
|
128
|
+
import { locales, defaultLocale, isRtl, type Locale } from "@/i18n.config";
|
|
129
129
|
|
|
130
130
|
export const dynamicParams = false;
|
|
131
131
|
|
|
@@ -144,7 +144,7 @@ export default function LocaleLayout({
|
|
|
144
144
|
? (params.locale as any)
|
|
145
145
|
: defaultLocale;
|
|
146
146
|
|
|
147
|
-
const dir = isRtl(locale) ?
|
|
147
|
+
const dir = isRtl(locale) ? "rtl" : "ltr";
|
|
148
148
|
|
|
149
149
|
return (
|
|
150
150
|
<html lang={locale} dir={dir}>
|
|
@@ -155,29 +155,26 @@ export default function LocaleLayout({
|
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
```tsx fileName="src/app/[locale]/about.tsx"
|
|
158
|
-
import I18nProvider from
|
|
159
|
-
import { initI18next } from
|
|
160
|
-
import type { Locale } from
|
|
161
|
-
import ClientComponent from
|
|
162
|
-
import ServerComponent from
|
|
163
|
-
|
|
164
|
-
// Force static rendering for the page
|
|
165
|
-
export const dynamic = 'force-static';
|
|
158
|
+
import I18nProvider from "@/components/I18nProvider";
|
|
159
|
+
import { initI18next } from "@/app/i18n/server";
|
|
160
|
+
import type { Locale } from "@/i18n.config";
|
|
161
|
+
import ClientComponent from "@/components/ClientComponent";
|
|
162
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
166
163
|
|
|
167
164
|
export default async function AboutPage({
|
|
168
165
|
params: { locale },
|
|
169
166
|
}: {
|
|
170
167
|
params: { locale: Locale };
|
|
171
168
|
}) {
|
|
172
|
-
const namespaces = [
|
|
169
|
+
const namespaces = ["common", "about"] as const;
|
|
173
170
|
|
|
174
171
|
const i18n = await initI18next(locale, [...namespaces]);
|
|
175
|
-
const tAbout = i18n.getFixedT(locale,
|
|
172
|
+
const tAbout = i18n.getFixedT(locale, "about");
|
|
176
173
|
|
|
177
174
|
return (
|
|
178
175
|
<I18nProvider locale={locale} namespaces={[...namespaces]}>
|
|
179
176
|
<main>
|
|
180
|
-
<h1>{tAbout(
|
|
177
|
+
<h1>{tAbout("title")}</h1>
|
|
181
178
|
|
|
182
179
|
<ClientComponent />
|
|
183
180
|
<ServerComponent t={tAbout} locale={locale} count={0} />
|
|
@@ -214,13 +211,13 @@ export default async function AboutPage({
|
|
|
214
211
|
**Client component (loads only the required namespace)**
|
|
215
212
|
|
|
216
213
|
```tsx fileName="src/components/ClientComponent.tsx"
|
|
217
|
-
|
|
214
|
+
"use client";
|
|
218
215
|
|
|
219
|
-
import React, { useState } from
|
|
220
|
-
import { useTranslation } from
|
|
216
|
+
import React, { useState } from "react";
|
|
217
|
+
import { useTranslation } from "react-i18next";
|
|
221
218
|
|
|
222
219
|
const ClientComponent = () => {
|
|
223
|
-
const { t, i18n } = useTranslation(
|
|
220
|
+
const { t, i18n } = useTranslation("about");
|
|
224
221
|
const [count, setCount] = useState(0);
|
|
225
222
|
|
|
226
223
|
const numberFormat = new Intl.NumberFormat(i18n.language);
|
|
@@ -229,10 +226,10 @@ const ClientComponent = () => {
|
|
|
229
226
|
<div>
|
|
230
227
|
<p>{numberFormat.format(count)}</p>
|
|
231
228
|
<button
|
|
232
|
-
aria-label={t(
|
|
229
|
+
aria-label={t("counter.label")}
|
|
233
230
|
onClick={() => setCount((c) => c + 1)}
|
|
234
231
|
>
|
|
235
|
-
{t(
|
|
232
|
+
{t("counter.increment")}
|
|
236
233
|
</button>
|
|
237
234
|
</div>
|
|
238
235
|
);
|
|
@@ -263,7 +260,7 @@ const ServerComponent = ({ t, locale, count }: ServerComponentProps) => {
|
|
|
263
260
|
return (
|
|
264
261
|
<div>
|
|
265
262
|
<p>{formatted}</p>
|
|
266
|
-
<button aria-label={t(
|
|
263
|
+
<button aria-label={t("counter.label")}>{t("counter.increment")}</button>
|
|
267
264
|
</div>
|
|
268
265
|
);
|
|
269
266
|
};
|
|
@@ -289,24 +286,24 @@ Here's a list of good practices regarding multilingual SEO.
|
|
|
289
286
|
Developers often forget to properly reference their pages across locales.
|
|
290
287
|
|
|
291
288
|
```ts fileName="i18n.config.ts"
|
|
292
|
-
export const locales = [
|
|
289
|
+
export const locales = ["en", "fr"] as const;
|
|
293
290
|
export type Locale = (typeof locales)[number];
|
|
294
|
-
export const defaultLocale: Locale =
|
|
295
|
-
export const rtlLocales = [
|
|
291
|
+
export const defaultLocale: Locale = "en";
|
|
292
|
+
export const rtlLocales = ["ar", "he", "fa", "ur"] as const;
|
|
296
293
|
export const isRtl = (locale: string) =>
|
|
297
294
|
(rtlLocales as readonly string[]).includes(locale);
|
|
298
295
|
export function localizedPath(locale: string, path: string) {
|
|
299
|
-
return locale === defaultLocale ? path :
|
|
296
|
+
return locale === defaultLocale ? path : "/" + locale + path;
|
|
300
297
|
}
|
|
301
|
-
const ORIGIN =
|
|
298
|
+
const ORIGIN = "https://example.com";
|
|
302
299
|
export function abs(locale: string, path: string) {
|
|
303
300
|
return ORIGIN + localizedPath(locale, path);
|
|
304
301
|
}
|
|
305
302
|
```
|
|
306
303
|
|
|
307
304
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
308
|
-
import type { Metadata } from
|
|
309
|
-
import { locales, defaultLocale, localizedPath } from
|
|
305
|
+
import type { Metadata } from "next";
|
|
306
|
+
import { locales, defaultLocale, localizedPath } from "@/i18n.config";
|
|
310
307
|
|
|
311
308
|
export async function generateMetadata({
|
|
312
309
|
params,
|
|
@@ -316,19 +313,19 @@ export async function generateMetadata({
|
|
|
316
313
|
const { locale } = params;
|
|
317
314
|
|
|
318
315
|
// Import the correct JSON bundle from src/locales
|
|
319
|
-
const messages = (await import(
|
|
316
|
+
const messages = (await import("@/locales/" + locale + "/about.json"))
|
|
320
317
|
.default;
|
|
321
318
|
|
|
322
319
|
const languages = Object.fromEntries(
|
|
323
|
-
locales.map((locale) => [locale, localizedPath(locale,
|
|
320
|
+
locales.map((locale) => [locale, localizedPath(locale, "/about")])
|
|
324
321
|
);
|
|
325
322
|
|
|
326
323
|
return {
|
|
327
324
|
title: messages.title,
|
|
328
325
|
description: messages.description,
|
|
329
326
|
alternates: {
|
|
330
|
-
canonical: localizedPath(locale,
|
|
331
|
-
languages: { ...languages,
|
|
327
|
+
canonical: localizedPath(locale, "/about"),
|
|
328
|
+
languages: { ...languages, "x-default": "/about" },
|
|
332
329
|
},
|
|
333
330
|
};
|
|
334
331
|
}
|
|
@@ -339,19 +336,19 @@ export default async function AboutPage() {
|
|
|
339
336
|
```
|
|
340
337
|
|
|
341
338
|
```ts fileName="src/app/sitemap.ts"
|
|
342
|
-
import type { MetadataRoute } from
|
|
343
|
-
import { locales, defaultLocale, abs } from
|
|
339
|
+
import type { MetadataRoute } from "next";
|
|
340
|
+
import { locales, defaultLocale, abs } from "@/i18n.config";
|
|
344
341
|
|
|
345
342
|
export default function sitemap(): MetadataRoute.Sitemap {
|
|
346
343
|
const languages = Object.fromEntries(
|
|
347
|
-
locales.map((locale) => [locale, abs(locale,
|
|
344
|
+
locales.map((locale) => [locale, abs(locale, "/about")])
|
|
348
345
|
);
|
|
349
346
|
|
|
350
347
|
return [
|
|
351
348
|
{
|
|
352
|
-
url: abs(defaultLocale,
|
|
349
|
+
url: abs(defaultLocale, "/about"),
|
|
353
350
|
lastModified: new Date(),
|
|
354
|
-
changeFrequency:
|
|
351
|
+
changeFrequency: "monthly",
|
|
355
352
|
priority: 0.7,
|
|
356
353
|
alternates: { languages },
|
|
357
354
|
},
|
|
@@ -360,10 +357,10 @@ export default function sitemap(): MetadataRoute.Sitemap {
|
|
|
360
357
|
```
|
|
361
358
|
|
|
362
359
|
```ts fileName="src/app/robots.ts"
|
|
363
|
-
import type { MetadataRoute } from
|
|
364
|
-
import { locales, defaultLocale, localizedPath } from
|
|
360
|
+
import type { MetadataRoute } from "next";
|
|
361
|
+
import { locales, defaultLocale, localizedPath } from "@/i18n.config";
|
|
365
362
|
|
|
366
|
-
const ORIGIN =
|
|
363
|
+
const ORIGIN = "https://example.com";
|
|
367
364
|
|
|
368
365
|
const expandAllLocales = (path: string) => [
|
|
369
366
|
localizedPath(defaultLocale, path),
|
|
@@ -374,14 +371,14 @@ const expandAllLocales = (path: string) => [
|
|
|
374
371
|
|
|
375
372
|
export default function robots(): MetadataRoute.Robots {
|
|
376
373
|
const disallow = [
|
|
377
|
-
...expandAllLocales(
|
|
378
|
-
...expandAllLocales(
|
|
374
|
+
...expandAllLocales("/dashboard"),
|
|
375
|
+
...expandAllLocales("/admin"),
|
|
379
376
|
];
|
|
380
377
|
|
|
381
378
|
return {
|
|
382
|
-
rules: { userAgent:
|
|
379
|
+
rules: { userAgent: "*", allow: ["/"], disallow },
|
|
383
380
|
host: ORIGIN,
|
|
384
|
-
sitemap: ORIGIN +
|
|
381
|
+
sitemap: ORIGIN + "/sitemap.xml",
|
|
385
382
|
};
|
|
386
383
|
}
|
|
387
384
|
```
|
|
@@ -393,8 +390,8 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
393
390
|
Add a middleware to handle locale detection and routing:
|
|
394
391
|
|
|
395
392
|
```ts fileName="src/middleware.ts"
|
|
396
|
-
import { NextResponse, type NextRequest } from
|
|
397
|
-
import { defaultLocale, locales } from
|
|
393
|
+
import { NextResponse, type NextRequest } from "next/server";
|
|
394
|
+
import { defaultLocale, locales } from "@/i18n.config";
|
|
398
395
|
|
|
399
396
|
const PUBLIC_FILE = /\.[^/]+$/; // exclude files with extensions
|
|
400
397
|
|
|
@@ -402,9 +399,9 @@ export function middleware(request: NextRequest) {
|
|
|
402
399
|
const { pathname } = request.nextUrl;
|
|
403
400
|
|
|
404
401
|
if (
|
|
405
|
-
pathname.startsWith(
|
|
406
|
-
pathname.startsWith(
|
|
407
|
-
pathname.startsWith(
|
|
402
|
+
pathname.startsWith("/_next") ||
|
|
403
|
+
pathname.startsWith("/api") ||
|
|
404
|
+
pathname.startsWith("/static") ||
|
|
408
405
|
PUBLIC_FILE.test(pathname)
|
|
409
406
|
) {
|
|
410
407
|
return;
|
|
@@ -412,12 +409,12 @@ export function middleware(request: NextRequest) {
|
|
|
412
409
|
|
|
413
410
|
const hasLocale = locales.some(
|
|
414
411
|
(locale) =>
|
|
415
|
-
pathname ===
|
|
412
|
+
pathname === "/" + locale || pathname.startsWith("/" + locale + "/")
|
|
416
413
|
);
|
|
417
414
|
if (!hasLocale) {
|
|
418
415
|
const locale = defaultLocale;
|
|
419
416
|
const url = request.nextUrl.clone();
|
|
420
|
-
url.pathname =
|
|
417
|
+
url.pathname = "/" + locale + (pathname === "/" ? "" : pathname);
|
|
421
418
|
return NextResponse.redirect(url);
|
|
422
419
|
}
|
|
423
420
|
}
|
|
@@ -425,7 +422,7 @@ export function middleware(request: NextRequest) {
|
|
|
425
422
|
export const config = {
|
|
426
423
|
matcher: [
|
|
427
424
|
// Match all paths except the ones starting with these and files with an extension
|
|
428
|
-
|
|
425
|
+
"/((?!api|_next|static|.*\\..*).*)",
|
|
429
426
|
],
|
|
430
427
|
};
|
|
431
428
|
```
|
|
@@ -29,11 +29,11 @@ As mentioned previously, you must optimize how each JSON file is imported into y
|
|
|
29
29
|
How the library handles content loading is important.
|
|
30
30
|
|
|
31
31
|
```tsx fileName="src/i18n.ts"
|
|
32
|
-
import { getRequestConfig } from
|
|
33
|
-
import { notFound } from
|
|
32
|
+
import { getRequestConfig } from "next-intl/server";
|
|
33
|
+
import { notFound } from "next/navigation";
|
|
34
34
|
|
|
35
|
-
export const locales = [
|
|
36
|
-
export const defaultLocale =
|
|
35
|
+
export const locales = ["en", "fr", "es"] as const;
|
|
36
|
+
export const defaultLocale = "en" as const;
|
|
37
37
|
|
|
38
38
|
async function loadMessages(locale: string) {
|
|
39
39
|
// Load only the namespaces your layout/pages need
|
|
@@ -55,14 +55,12 @@ export default getRequestConfig(async ({ locale }) => {
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
```tsx fileName="src/app/[locale]/layout.tsx"
|
|
58
|
-
import type { ReactNode } from
|
|
59
|
-
import { locales } from
|
|
58
|
+
import type { ReactNode } from "react";
|
|
59
|
+
import { locales } from "@/i18n";
|
|
60
60
|
import {
|
|
61
61
|
getLocaleDirection,
|
|
62
62
|
unstable_setRequestLocale,
|
|
63
|
-
} from
|
|
64
|
-
|
|
65
|
-
export const dynamic = 'force-static';
|
|
63
|
+
} from "next-intl/server";
|
|
66
64
|
|
|
67
65
|
export function generateStaticParams() {
|
|
68
66
|
return locales.map((locale) => ({ locale }));
|
|
@@ -91,13 +89,11 @@ export default function LocaleLayout({
|
|
|
91
89
|
```
|
|
92
90
|
|
|
93
91
|
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
94
|
-
import { getTranslations, getMessages, getFormatter } from
|
|
95
|
-
import { NextIntlClientProvider } from
|
|
96
|
-
import pick from
|
|
97
|
-
import ServerComponent from
|
|
98
|
-
import ClientComponentExample from
|
|
99
|
-
|
|
100
|
-
export const dynamic = 'force-static';
|
|
92
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
93
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
94
|
+
import pick from "lodash/pick";
|
|
95
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
96
|
+
import ClientComponentExample from "@/components/ClientComponentExample";
|
|
101
97
|
|
|
102
98
|
export default async function AboutPage({
|
|
103
99
|
params,
|
|
@@ -108,11 +104,11 @@ export default async function AboutPage({
|
|
|
108
104
|
|
|
109
105
|
// Messages are loaded server-side. Push only what's needed to the client.
|
|
110
106
|
const messages = await getMessages();
|
|
111
|
-
const clientMessages = pick(messages, [
|
|
107
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
112
108
|
|
|
113
109
|
// Strictly server-side translations/formatting
|
|
114
|
-
const tAbout = await getTranslations(
|
|
115
|
-
const tCounter = await getTranslations(
|
|
110
|
+
const tAbout = await getTranslations("about");
|
|
111
|
+
const tCounter = await getTranslations("about.counter");
|
|
116
112
|
const format = await getFormatter();
|
|
117
113
|
|
|
118
114
|
const initialFormattedCount = format.number(0);
|
|
@@ -120,12 +116,12 @@ export default async function AboutPage({
|
|
|
120
116
|
return (
|
|
121
117
|
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
122
118
|
<main>
|
|
123
|
-
<h1>{tAbout(
|
|
119
|
+
<h1>{tAbout("title")}</h1>
|
|
124
120
|
<ClientComponentExample />
|
|
125
121
|
<ServerComponent
|
|
126
122
|
formattedCount={initialFormattedCount}
|
|
127
|
-
label={tCounter(
|
|
128
|
-
increment={tCounter(
|
|
123
|
+
label={tCounter("label")}
|
|
124
|
+
increment={tCounter("increment")}
|
|
129
125
|
/>
|
|
130
126
|
</main>
|
|
131
127
|
</NextIntlClientProvider>
|
|
@@ -160,14 +156,14 @@ Let's take an example of a client component rendering a counter.
|
|
|
160
156
|
**Client component**
|
|
161
157
|
|
|
162
158
|
```tsx fileName="src/components/ClientComponentExample.tsx"
|
|
163
|
-
|
|
159
|
+
"use client";
|
|
164
160
|
|
|
165
|
-
import React, { useState } from
|
|
166
|
-
import { useTranslations, useFormatter } from
|
|
161
|
+
import React, { useState } from "react";
|
|
162
|
+
import { useTranslations, useFormatter } from "next-intl";
|
|
167
163
|
|
|
168
164
|
const ClientComponentExample = () => {
|
|
169
165
|
// Scope directly to the nested object
|
|
170
|
-
const t = useTranslations(
|
|
166
|
+
const t = useTranslations("about.counter");
|
|
171
167
|
const format = useFormatter();
|
|
172
168
|
const [count, setCount] = useState(0);
|
|
173
169
|
|
|
@@ -175,10 +171,10 @@ const ClientComponentExample = () => {
|
|
|
175
171
|
<div>
|
|
176
172
|
<p>{format.number(count)}</p>
|
|
177
173
|
<button
|
|
178
|
-
aria-label={t(
|
|
174
|
+
aria-label={t("label")}
|
|
179
175
|
onClick={() => setCount((count) => count + 1)}
|
|
180
176
|
>
|
|
181
|
-
{t(
|
|
177
|
+
{t("increment")}
|
|
182
178
|
</button>
|
|
183
179
|
</div>
|
|
184
180
|
);
|
|
@@ -205,7 +201,7 @@ const ServerComponent = ({ t, count, formatter }: ServerComponentProps) => {
|
|
|
205
201
|
return (
|
|
206
202
|
<div>
|
|
207
203
|
<p>{formatted}</p>
|
|
208
|
-
<button aria-label={t(
|
|
204
|
+
<button aria-label={t("label")}>{t("increment")}</button>
|
|
209
205
|
</div>
|
|
210
206
|
);
|
|
211
207
|
};
|
|
@@ -220,12 +216,12 @@ const ServerComponent = ({ t, count, formatter }: ServerComponentProps) => {
|
|
|
220
216
|
> - `const formatter = await getFormatter().then((formatter) => formatter.number());`
|
|
221
217
|
|
|
222
218
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
223
|
-
import type { Metadata } from
|
|
224
|
-
import { locales, defaultLocale } from
|
|
225
|
-
import { getTranslations } from
|
|
219
|
+
import type { Metadata } from "next";
|
|
220
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
221
|
+
import { getTranslations } from "next-intl/server";
|
|
226
222
|
|
|
227
223
|
function localizedPath(locale: string, path: string) {
|
|
228
|
-
return locale === defaultLocale ? path :
|
|
224
|
+
return locale === defaultLocale ? path : "/" + locale + path;
|
|
229
225
|
}
|
|
230
226
|
|
|
231
227
|
export async function generateMetadata({
|
|
@@ -234,19 +230,19 @@ export async function generateMetadata({
|
|
|
234
230
|
params: { locale: string };
|
|
235
231
|
}): Promise<Metadata> {
|
|
236
232
|
const { locale } = params;
|
|
237
|
-
const t = await getTranslations({ locale, namespace:
|
|
233
|
+
const t = await getTranslations({ locale, namespace: "about" });
|
|
238
234
|
|
|
239
|
-
const url =
|
|
235
|
+
const url = "/about";
|
|
240
236
|
const languages = Object.fromEntries(
|
|
241
237
|
locales.map((locale) => [locale, localizedPath(locale, url)])
|
|
242
238
|
);
|
|
243
239
|
|
|
244
240
|
return {
|
|
245
|
-
title: t(
|
|
246
|
-
description: t(
|
|
241
|
+
title: t("title"),
|
|
242
|
+
description: t("description"),
|
|
247
243
|
alternates: {
|
|
248
244
|
canonical: localizedPath(locale, url),
|
|
249
|
-
languages: { ...languages,
|
|
245
|
+
languages: { ...languages, "x-default": url },
|
|
250
246
|
},
|
|
251
247
|
};
|
|
252
248
|
}
|
|
@@ -255,24 +251,24 @@ export async function generateMetadata({
|
|
|
255
251
|
```
|
|
256
252
|
|
|
257
253
|
```tsx fileName="src/app/sitemap.ts"
|
|
258
|
-
import type { MetadataRoute } from
|
|
259
|
-
import { locales, defaultLocale } from
|
|
254
|
+
import type { MetadataRoute } from "next";
|
|
255
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
260
256
|
|
|
261
|
-
const origin =
|
|
257
|
+
const origin = "https://example.com";
|
|
262
258
|
|
|
263
259
|
const formatterLocalizedPath = (locale: string, path: string) =>
|
|
264
|
-
locale === defaultLocale ? origin + path : origin +
|
|
260
|
+
locale === defaultLocale ? origin + path : origin + "/" + locale + path;
|
|
265
261
|
|
|
266
262
|
export default function sitemap(): MetadataRoute.Sitemap {
|
|
267
263
|
const aboutLanguages = Object.fromEntries(
|
|
268
|
-
locales.map((l) => [l, formatterLocalizedPath(l,
|
|
264
|
+
locales.map((l) => [l, formatterLocalizedPath(l, "/about")])
|
|
269
265
|
);
|
|
270
266
|
|
|
271
267
|
return [
|
|
272
268
|
{
|
|
273
|
-
url: formatterLocalizedPath(defaultLocale,
|
|
269
|
+
url: formatterLocalizedPath(defaultLocale, "/about"),
|
|
274
270
|
lastModified: new Date(),
|
|
275
|
-
changeFrequency:
|
|
271
|
+
changeFrequency: "monthly",
|
|
276
272
|
priority: 0.7,
|
|
277
273
|
alternates: { languages: aboutLanguages },
|
|
278
274
|
},
|
|
@@ -281,27 +277,27 @@ export default function sitemap(): MetadataRoute.Sitemap {
|
|
|
281
277
|
```
|
|
282
278
|
|
|
283
279
|
```tsx fileName="src/app/robots.ts"
|
|
284
|
-
import type { MetadataRoute } from
|
|
285
|
-
import { locales, defaultLocale } from
|
|
280
|
+
import type { MetadataRoute } from "next";
|
|
281
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
286
282
|
|
|
287
|
-
const origin =
|
|
283
|
+
const origin = "https://example.com";
|
|
288
284
|
const withAllLocales = (path: string) => [
|
|
289
285
|
path,
|
|
290
286
|
...locales
|
|
291
287
|
.filter((locale) => locale !== defaultLocale)
|
|
292
|
-
.map((locale) =>
|
|
288
|
+
.map((locale) => "/" + locale + path),
|
|
293
289
|
];
|
|
294
290
|
|
|
295
291
|
export default function robots(): MetadataRoute.Robots {
|
|
296
292
|
const disallow = [
|
|
297
|
-
...withAllLocales(
|
|
298
|
-
...withAllLocales(
|
|
293
|
+
...withAllLocales("/dashboard"),
|
|
294
|
+
...withAllLocales("/admin"),
|
|
299
295
|
];
|
|
300
296
|
|
|
301
297
|
return {
|
|
302
|
-
rules: { userAgent:
|
|
298
|
+
rules: { userAgent: "*", allow: ["/"], disallow },
|
|
303
299
|
host: origin,
|
|
304
|
-
sitemap: origin +
|
|
300
|
+
sitemap: origin + "/sitemap.xml",
|
|
305
301
|
};
|
|
306
302
|
}
|
|
307
303
|
```
|
|
@@ -311,8 +307,8 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
311
307
|
Add a middleware to handle locale detection and routing:
|
|
312
308
|
|
|
313
309
|
```ts fileName="src/middleware.ts"
|
|
314
|
-
import createMiddleware from
|
|
315
|
-
import { locales, defaultLocale } from
|
|
310
|
+
import createMiddleware from "next-intl/middleware";
|
|
311
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
316
312
|
|
|
317
313
|
export default createMiddleware({
|
|
318
314
|
locales: [...locales],
|
|
@@ -322,7 +318,7 @@ export default createMiddleware({
|
|
|
322
318
|
|
|
323
319
|
export const config = {
|
|
324
320
|
// Skip API, Next internals and static assets
|
|
325
|
-
matcher: [
|
|
321
|
+
matcher: ["/((?!api|_next|.*\\..*).*)"],
|
|
326
322
|
};
|
|
327
323
|
```
|
|
328
324
|
|
|
@@ -1401,6 +1401,20 @@ export const config = {
|
|
|
1401
1401
|
|
|
1402
1402
|
Intlayer provides built-in middleware handling through the `next-intlayer` package configuration.
|
|
1403
1403
|
|
|
1404
|
+
```ts fileName="src/middleware.ts"
|
|
1405
|
+
import { intlayerMiddleware } from 'next-intlayer/middleware';
|
|
1406
|
+
|
|
1407
|
+
export const middleware = intlayerMiddleware()
|
|
1408
|
+
|
|
1409
|
+
// applies this middleware only to files in the app directory
|
|
1410
|
+
export const config = {
|
|
1411
|
+
matcher:
|
|
1412
|
+
"/((?!api|_next|static|.*\\..*).*)",
|
|
1413
|
+
};
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1416
|
+
The set up of the middleware centralized in the `intlayer.config.ts` file.
|
|
1417
|
+
|
|
1404
1418
|
</TabItem>
|
|
1405
1419
|
</Tab>
|
|
1406
1420
|
|