@intlayer/docs 7.0.7 → 7.0.8
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/i18n_using_next-i18next.md +1068 -0
- package/blog/ar/i18n_using_next-intl.md +768 -0
- package/blog/ar/intlayer_with_react-intl.md +0 -4
- package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +5 -4
- package/blog/de/i18n_using_next-i18next.md +1107 -0
- package/blog/de/i18n_using_next-intl.md +760 -0
- package/blog/de/intlayer_with_react-intl.md +0 -4
- package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/en/i18n_using_next-i18next.md +1073 -0
- package/blog/en/i18n_using_next-intl.md +757 -0
- package/blog/en/intlayer_with_i18next.md +71 -8
- package/blog/en/intlayer_with_next-i18next.md +71 -8
- package/blog/en/intlayer_with_next-intl.md +71 -8
- package/blog/en/intlayer_with_react-i18next.md +69 -8
- package/blog/en/intlayer_with_react-intl.md +68 -9
- package/blog/en/intlayer_with_vue-i18n.md +68 -7
- package/blog/en/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/en/vue-i18n_vs_intlayer.md +2 -0
- package/blog/en-GB/i18n_using_next-i18next.md +1074 -0
- package/blog/en-GB/i18n_using_next-intl.md +757 -0
- package/blog/en-GB/intlayer_with_i18next.md +15 -6
- package/blog/en-GB/intlayer_with_next-i18next.md +16 -6
- package/blog/en-GB/intlayer_with_next-intl.md +16 -6
- package/blog/en-GB/intlayer_with_react-i18next.md +16 -7
- package/blog/en-GB/intlayer_with_react-intl.md +14 -9
- package/blog/en-GB/intlayer_with_vue-i18n.md +16 -7
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/en-GB/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/en-GB/vue-i18n_vs_intlayer.md +2 -0
- package/blog/es/i18n_using_next-i18next.md +1066 -0
- package/blog/es/i18n_using_next-intl.md +757 -0
- package/blog/es/intlayer_with_react-intl.md +0 -4
- package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/fr/i18n_using_next-i18next.md +1078 -0
- package/blog/fr/i18n_using_next-intl.md +759 -0
- package/blog/fr/intlayer_with_react-intl.md +0 -4
- package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/hi/i18n_using_next-i18next.md +1068 -0
- package/blog/hi/i18n_using_next-intl.md +758 -0
- package/blog/hi/intlayer_with_react-intl.md +0 -4
- package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/id/i18n_using_next-i18next.md +1078 -0
- package/blog/id/i18n_using_next-intl.md +757 -0
- package/blog/id/index.md +69 -0
- package/blog/id/internationalization_and_SEO.md +364 -0
- package/blog/id/intlayer_with_react-intl.md +0 -4
- package/blog/id/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/id/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/id/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/id/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/id/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/id/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/id/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/id/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/id/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/id/next-i18next_vs_next-intl_vs_intlayer.md +1500 -0
- package/blog/id/nextjs-multilingual-seo-comparison.md +361 -0
- package/blog/id/rag_powered_documentation_assistant.md +288 -0
- package/blog/id/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/id/vue-i18n_vs_intlayer.md +278 -0
- package/blog/id/what_is_internationalization.md +166 -0
- package/blog/it/i18n_using_next-i18next.md +1078 -0
- package/blog/it/i18n_using_next-intl.md +758 -0
- package/blog/it/intlayer_with_react-intl.md +0 -4
- package/blog/it/react-i18next_vs_react-intl_vs_intlayer.md +4 -0
- package/blog/it/vue-i18n_vs_intlayer.md +2 -0
- package/blog/ja/i18n_using_next-i18next.md +1078 -0
- package/blog/ja/i18n_using_next-intl.md +758 -0
- package/blog/ja/intlayer_with_react-intl.md +0 -4
- package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/ko/i18n_using_next-i18next.md +1075 -0
- package/blog/ko/i18n_using_next-intl.md +759 -0
- package/blog/ko/intlayer_with_react-intl.md +0 -4
- package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/pl/i18n_using_next-i18next.md +1078 -0
- package/blog/pl/i18n_using_next-intl.md +758 -0
- package/blog/pl/index.md +69 -0
- package/blog/pl/internationalization_and_SEO.md +363 -0
- package/blog/pl/intlayer_with_react-intl.md +0 -4
- package/blog/pl/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/pl/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/pl/list_i18n_technologies/CMS/wordpress.md +196 -0
- package/blog/pl/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/pl/list_i18n_technologies/frameworks/flutter.md +151 -0
- package/blog/pl/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/pl/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/pl/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/pl/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/pl/next-i18next_vs_next-intl_vs_intlayer.md +1501 -0
- package/blog/pl/nextjs-multilingual-seo-comparison.md +362 -0
- package/blog/pl/rag_powered_documentation_assistant.md +288 -0
- package/blog/pl/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/pl/vue-i18n_vs_intlayer.md +278 -0
- package/blog/pl/what_is_internationalization.md +167 -0
- package/blog/pt/i18n_using_next-i18next.md +1067 -0
- package/blog/pt/i18n_using_next-intl.md +760 -0
- package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/ru/i18n_using_next-i18next.md +1106 -0
- package/blog/ru/i18n_using_next-intl.md +759 -0
- package/blog/ru/intlayer_with_react-intl.md +0 -4
- package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/tr/i18n_using_next-i18next.md +1078 -0
- package/blog/tr/i18n_using_next-intl.md +760 -0
- package/blog/tr/intlayer_with_react-intl.md +0 -4
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/tr/vue-i18n_vs_intlayer.md +2 -0
- package/blog/vi/i18n_using_next-i18next.md +1080 -0
- package/blog/vi/i18n_using_next-intl.md +758 -0
- package/blog/vi/index.md +69 -0
- package/blog/vi/internationalization_and_SEO.md +363 -0
- package/blog/vi/intlayer_with_react-intl.md +0 -4
- package/blog/vi/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/vi/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/vi/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/vi/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/vi/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/vi/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/vi/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/vi/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/vi/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/vi/next-i18next_vs_next-intl_vs_intlayer.md +1520 -0
- package/blog/vi/nextjs-multilingual-seo-comparison.md +362 -0
- package/blog/vi/rag_powered_documentation_assistant.md +288 -0
- package/blog/vi/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/vi/vue-i18n_vs_intlayer.md +278 -0
- package/blog/vi/what_is_internationalization.md +168 -0
- package/blog/zh/i18n_using_next-i18next.md +1105 -0
- package/blog/zh/i18n_using_next-intl.md +758 -0
- package/blog/zh/intlayer_with_react-intl.md +0 -4
- package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/zh/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/dist/cjs/common.cjs +0 -4
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +38 -6
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +0 -6
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +0 -6
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +0 -6
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +38 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +2 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/docs/ar/component_i18n.md +1 -1
- package/docs/ar/configuration.md +6 -0
- package/docs/ar/intlayer_cli.md +8 -3
- package/docs/ar/intlayer_with_next-i18next.md +619 -0
- package/docs/ar/intlayer_with_next-intl.md +446 -0
- package/docs/ar/intlayer_with_nextjs_16.md +21 -0
- package/docs/ar/intlayer_with_tanstack.md +4 -0
- package/docs/ar/intlayer_with_vite+react.md +4 -0
- package/docs/de/component_i18n.md +1 -1
- package/docs/de/configuration.md +6 -0
- package/docs/de/intlayer_cli.md +8 -3
- package/docs/de/intlayer_with_next-i18next.md +627 -0
- package/docs/de/intlayer_with_next-intl.md +451 -0
- package/docs/de/intlayer_with_nextjs_16.md +21 -0
- package/docs/de/intlayer_with_tanstack.md +4 -0
- package/docs/de/intlayer_with_vite+react.md +4 -0
- package/docs/en/component_i18n.md +1 -1
- package/docs/en/intlayer_cli.md +8 -1
- package/docs/en/intlayer_with_astro.md +10 -2
- package/docs/en/intlayer_with_create_react_app.md +8 -0
- package/docs/en/intlayer_with_lynx+react.md +8 -0
- package/docs/en/intlayer_with_nestjs.md +10 -0
- package/docs/en/intlayer_with_nextjs_14.md +10 -2
- package/docs/en/intlayer_with_nextjs_15.md +21 -4
- package/docs/en/intlayer_with_nextjs_16.md +17 -0
- package/docs/en/intlayer_with_nuxt.md +8 -0
- package/docs/en/intlayer_with_react_native+expo.md +10 -2
- package/docs/en/intlayer_with_react_router_v7.md +8 -0
- package/docs/en/intlayer_with_tanstack.md +10 -0
- package/docs/en/intlayer_with_vite+preact.md +10 -2
- package/docs/en/intlayer_with_vite+react.md +21 -4
- package/docs/en/intlayer_with_vite+vue.md +10 -2
- package/docs/en-GB/component_i18n.md +1 -1
- package/docs/en-GB/configuration.md +6 -0
- package/docs/en-GB/intlayer_cli.md +8 -3
- package/docs/en-GB/intlayer_with_angular.md +4 -4
- package/docs/en-GB/intlayer_with_express.md +4 -4
- package/docs/en-GB/intlayer_with_lynx+react.md +12 -12
- package/{blog/en/_intlayer_with_next-i18next.md → docs/en-GB/intlayer_with_next-i18next.md} +241 -42
- package/{blog/en/_intlayer_with_next-intl.md → docs/en-GB/intlayer_with_next-intl.md} +144 -29
- package/docs/en-GB/intlayer_with_nextjs_16.md +21 -0
- package/docs/en-GB/intlayer_with_tanstack.md +5 -1
- package/docs/en-GB/intlayer_with_vite+react.md +4 -0
- package/docs/en-GB/packages/next-intlayer/t.md +2 -2
- package/docs/es/component_i18n.md +1 -1
- package/docs/es/configuration.md +6 -0
- package/docs/es/intlayer_cli.md +8 -3
- package/docs/es/intlayer_with_next-i18next.md +628 -0
- package/docs/es/intlayer_with_next-intl.md +446 -0
- package/docs/es/intlayer_with_nextjs_16.md +21 -0
- package/docs/es/intlayer_with_tanstack.md +4 -0
- package/docs/es/intlayer_with_vite+react.md +4 -0
- package/docs/fr/configuration.md +6 -0
- package/docs/fr/intlayer_cli.md +8 -3
- package/docs/fr/intlayer_with_next-i18next.md +628 -0
- package/docs/fr/intlayer_with_next-intl.md +446 -0
- package/docs/fr/intlayer_with_nextjs_16.md +23 -2
- package/docs/fr/intlayer_with_tanstack.md +4 -0
- package/docs/fr/intlayer_with_vite+react.md +4 -0
- package/docs/hi/component_i18n.md +1 -1
- package/docs/hi/configuration.md +6 -0
- package/docs/hi/intlayer_cli.md +8 -0
- package/docs/hi/intlayer_with_next-i18next.md +628 -0
- package/docs/hi/intlayer_with_next-intl.md +446 -0
- package/docs/hi/intlayer_with_nextjs_16.md +21 -0
- package/docs/hi/intlayer_with_tanstack.md +4 -0
- package/docs/hi/intlayer_with_vite+react.md +4 -0
- package/docs/id/CI_CD.md +198 -0
- package/docs/id/autoFill.md +284 -0
- package/docs/id/component_i18n.md +186 -0
- package/docs/id/configuration.md +710 -0
- package/docs/id/dictionary/condition.md +231 -0
- package/docs/id/dictionary/content_file.md +1092 -0
- package/docs/id/dictionary/enumeration.md +245 -0
- package/docs/id/dictionary/file.md +237 -0
- package/docs/id/dictionary/function_fetching.md +214 -0
- package/docs/id/dictionary/gender.md +273 -0
- package/docs/id/dictionary/insertion.md +192 -0
- package/docs/id/dictionary/markdown.md +381 -0
- package/docs/id/dictionary/nesting.md +273 -0
- package/docs/id/dictionary/translation.md +310 -0
- package/docs/id/formatters.md +596 -0
- package/docs/id/how_works_intlayer.md +256 -0
- package/docs/id/index.md +176 -0
- package/docs/id/interest_of_intlayer.md +293 -0
- package/docs/id/intlayer_CMS.md +549 -0
- package/docs/id/intlayer_cli.md +850 -0
- package/docs/id/intlayer_visual_editor.md +288 -0
- package/docs/id/intlayer_with_angular.md +694 -0
- package/docs/id/intlayer_with_astro.md +252 -0
- package/docs/id/intlayer_with_create_react_app.md +1233 -0
- package/docs/id/intlayer_with_express.md +411 -0
- package/docs/id/intlayer_with_lynx+react.md +518 -0
- package/docs/id/intlayer_with_nestjs.md +272 -0
- package/docs/id/intlayer_with_next-i18next.md +628 -0
- package/docs/id/intlayer_with_next-intl.md +446 -0
- package/docs/id/intlayer_with_nextjs_14.md +1617 -0
- package/docs/id/intlayer_with_nextjs_15.md +1698 -0
- package/docs/id/intlayer_with_nextjs_16.md +21 -0
- package/docs/id/intlayer_with_nextjs_page_router.md +1478 -0
- package/docs/id/intlayer_with_nuxt.md +808 -0
- package/docs/id/intlayer_with_react_native+expo.md +699 -0
- package/docs/id/intlayer_with_react_router_v7.md +496 -0
- package/docs/id/intlayer_with_tanstack.md +564 -0
- package/docs/id/intlayer_with_vite+preact.md +1737 -0
- package/docs/id/intlayer_with_vite+react.md +1413 -0
- package/docs/id/intlayer_with_vite+solid.md +289 -0
- package/docs/id/intlayer_with_vite+svelte.md +289 -0
- package/docs/id/intlayer_with_vite+vue.md +1088 -0
- package/docs/id/introduction.md +218 -0
- package/docs/id/locale_mapper.md +242 -0
- package/docs/id/mcp_server.md +211 -0
- package/docs/id/packages/express-intlayer/t.md +458 -0
- package/docs/id/packages/intlayer/getConfiguration.md +145 -0
- package/docs/id/packages/intlayer/getEnumeration.md +159 -0
- package/docs/id/packages/intlayer/getHTMLTextDir.md +122 -0
- package/docs/id/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/id/packages/intlayer/getLocaleName.md +119 -0
- package/docs/id/packages/intlayer/getLocalizedUrl.md +309 -0
- package/docs/id/packages/intlayer/getMultilingualUrls.md +223 -0
- package/docs/id/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/id/packages/intlayer/getTranslation.md +190 -0
- package/docs/id/packages/intlayer/getTranslationContent.md +188 -0
- package/docs/id/packages/next-intlayer/t.md +352 -0
- package/docs/id/packages/next-intlayer/useDictionary.md +271 -0
- package/docs/id/packages/next-intlayer/useIntlayer.md +264 -0
- package/docs/id/packages/next-intlayer/useLocale.md +166 -0
- package/docs/id/packages/react-intlayer/t.md +303 -0
- package/docs/id/packages/react-intlayer/useDictionary.md +287 -0
- package/docs/id/packages/react-intlayer/useI18n.md +267 -0
- package/docs/id/packages/react-intlayer/useIntlayer.md +254 -0
- package/docs/id/packages/react-intlayer/useLocale.md +210 -0
- package/docs/id/per_locale_file.md +323 -0
- package/docs/id/readme.md +261 -0
- package/docs/id/releases/v6.md +305 -0
- package/docs/id/roadmap.md +362 -0
- package/docs/id/testing.md +202 -0
- package/docs/id/vs_code_extension.md +126 -0
- package/docs/it/component_i18n.md +1 -1
- package/docs/it/configuration.md +6 -0
- package/docs/it/intlayer_cli.md +8 -3
- package/docs/it/intlayer_with_next-i18next.md +628 -0
- package/docs/it/intlayer_with_next-intl.md +446 -0
- package/docs/it/intlayer_with_nextjs_16.md +21 -0
- package/docs/it/intlayer_with_tanstack.md +4 -0
- package/docs/it/intlayer_with_vite+react.md +4 -0
- package/docs/ja/component_i18n.md +1 -1
- package/docs/ja/configuration.md +6 -0
- package/docs/ja/intlayer_cli.md +8 -3
- package/docs/ja/intlayer_with_next-i18next.md +627 -0
- package/docs/ja/intlayer_with_next-intl.md +446 -0
- package/docs/ja/intlayer_with_nextjs_16.md +21 -0
- package/docs/ja/intlayer_with_tanstack.md +4 -0
- package/docs/ja/intlayer_with_vite+react.md +4 -0
- package/docs/ko/configuration.md +6 -0
- package/docs/ko/intlayer_cli.md +8 -3
- package/docs/ko/intlayer_with_next-i18next.md +627 -0
- package/docs/ko/intlayer_with_next-intl.md +446 -0
- package/docs/ko/intlayer_with_nextjs_16.md +21 -0
- package/docs/ko/intlayer_with_tanstack.md +4 -0
- package/docs/ko/intlayer_with_vite+react.md +4 -0
- package/docs/pl/CI_CD.md +198 -0
- package/docs/pl/autoFill.md +284 -0
- package/docs/pl/component_i18n.md +186 -0
- package/docs/pl/configuration.md +710 -0
- package/docs/pl/dictionary/condition.md +232 -0
- package/docs/pl/dictionary/content_file.md +1130 -0
- package/docs/pl/dictionary/enumeration.md +245 -0
- package/docs/pl/dictionary/file.md +234 -0
- package/docs/pl/dictionary/function_fetching.md +214 -0
- package/docs/pl/dictionary/gender.md +276 -0
- package/docs/pl/dictionary/insertion.md +188 -0
- package/docs/pl/dictionary/markdown.md +408 -0
- package/docs/pl/dictionary/nesting.md +273 -0
- package/docs/pl/dictionary/translation.md +310 -0
- package/docs/pl/formatters.md +596 -0
- package/docs/pl/how_works_intlayer.md +256 -0
- package/docs/pl/index.md +176 -0
- package/docs/pl/interest_of_intlayer.md +291 -0
- package/docs/pl/intlayer_CMS.md +549 -0
- package/docs/pl/intlayer_cli.md +857 -0
- package/docs/pl/intlayer_visual_editor.md +288 -0
- package/docs/pl/intlayer_with_angular.md +690 -0
- package/docs/pl/intlayer_with_astro.md +280 -0
- package/docs/pl/intlayer_with_create_react_app.md +1235 -0
- package/docs/pl/intlayer_with_express.md +411 -0
- package/docs/pl/intlayer_with_lynx+react.md +518 -0
- package/docs/pl/intlayer_with_nestjs.md +272 -0
- package/docs/pl/intlayer_with_next-i18next.md +628 -0
- package/docs/pl/intlayer_with_next-intl.md +446 -0
- package/docs/pl/intlayer_with_nextjs_14.md +1594 -0
- package/docs/pl/intlayer_with_nextjs_15.md +1701 -0
- package/docs/pl/intlayer_with_nextjs_16.md +21 -0
- package/docs/pl/intlayer_with_nextjs_page_router.md +1513 -0
- package/docs/pl/intlayer_with_nuxt.md +885 -0
- package/docs/pl/intlayer_with_react_native+expo.md +698 -0
- package/docs/pl/intlayer_with_react_router_v7.md +503 -0
- package/docs/pl/intlayer_with_tanstack.md +562 -0
- package/docs/pl/intlayer_with_vite+preact.md +1736 -0
- package/docs/pl/intlayer_with_vite+react.md +1438 -0
- package/docs/pl/intlayer_with_vite+solid.md +290 -0
- package/docs/pl/intlayer_with_vite+svelte.md +289 -0
- package/docs/pl/intlayer_with_vite+vue.md +1116 -0
- package/docs/pl/introduction.md +209 -0
- package/docs/pl/locale_mapper.md +242 -0
- package/docs/pl/mcp_server.md +211 -0
- package/docs/pl/packages/express-intlayer/t.md +458 -0
- package/docs/pl/packages/intlayer/getConfiguration.md +146 -0
- package/docs/pl/packages/intlayer/getEnumeration.md +160 -0
- package/docs/pl/packages/intlayer/getHTMLTextDir.md +121 -0
- package/docs/pl/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/pl/packages/intlayer/getLocaleName.md +118 -0
- package/docs/pl/packages/intlayer/getLocalizedUrl.md +300 -0
- package/docs/pl/packages/intlayer/getMultilingualUrls.md +221 -0
- package/docs/pl/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/pl/packages/intlayer/getTranslation.md +190 -0
- package/docs/pl/packages/intlayer/getTranslationContent.md +189 -0
- package/docs/pl/packages/next-intlayer/t.md +353 -0
- package/docs/pl/packages/next-intlayer/useDictionary.md +270 -0
- package/docs/pl/packages/next-intlayer/useIntlayer.md +263 -0
- package/docs/pl/packages/next-intlayer/useLocale.md +166 -0
- package/docs/pl/packages/react-intlayer/t.md +303 -0
- package/docs/pl/packages/react-intlayer/useDictionary.md +289 -0
- package/docs/pl/packages/react-intlayer/useI18n.md +249 -0
- package/docs/pl/packages/react-intlayer/useIntlayer.md +256 -0
- package/docs/pl/packages/react-intlayer/useLocale.md +210 -0
- package/docs/pl/per_locale_file.md +321 -0
- package/docs/pl/readme.md +261 -0
- package/docs/pl/releases/v6.md +305 -0
- package/docs/pl/roadmap.md +362 -0
- package/docs/pl/testing.md +202 -0
- package/docs/pl/vs_code_extension.md +126 -0
- package/docs/pt/component_i18n.md +1 -1
- package/docs/pt/configuration.md +6 -0
- package/docs/pt/intlayer_cli.md +8 -3
- package/docs/pt/intlayer_with_next-i18next.md +627 -0
- package/docs/pt/intlayer_with_next-intl.md +446 -0
- package/docs/pt/intlayer_with_nextjs_16.md +21 -0
- package/docs/pt/intlayer_with_tanstack.md +4 -0
- package/docs/pt/intlayer_with_vite+react.md +4 -0
- package/docs/ru/component_i18n.md +1 -1
- package/docs/ru/configuration.md +6 -0
- package/docs/ru/intlayer_cli.md +301 -22
- package/docs/ru/intlayer_with_next-i18next.md +629 -0
- package/docs/ru/intlayer_with_next-intl.md +448 -0
- package/docs/ru/intlayer_with_nextjs_16.md +21 -0
- package/docs/ru/intlayer_with_tanstack.md +4 -0
- package/docs/ru/intlayer_with_vite+react.md +4 -0
- package/docs/tr/component_i18n.md +1 -1
- package/docs/tr/configuration.md +6 -0
- package/docs/tr/intlayer_cli.md +8 -0
- package/docs/tr/intlayer_with_next-i18next.md +627 -0
- package/docs/tr/intlayer_with_next-intl.md +446 -0
- package/docs/tr/intlayer_with_nextjs_16.md +21 -0
- package/docs/tr/intlayer_with_tanstack.md +4 -0
- package/docs/tr/intlayer_with_vite+react.md +4 -0
- package/docs/vi/CI_CD.md +198 -0
- package/docs/vi/autoFill.md +284 -0
- package/docs/vi/component_i18n.md +186 -0
- package/docs/vi/configuration.md +710 -0
- package/docs/vi/dictionary/condition.md +237 -0
- package/docs/vi/dictionary/content_file.md +1115 -0
- package/docs/vi/dictionary/enumeration.md +255 -0
- package/docs/vi/dictionary/file.md +234 -0
- package/docs/vi/dictionary/function_fetching.md +212 -0
- package/docs/vi/dictionary/gender.md +275 -0
- package/docs/vi/dictionary/insertion.md +191 -0
- package/docs/vi/dictionary/markdown.md +381 -0
- package/docs/vi/dictionary/nesting.md +273 -0
- package/docs/vi/dictionary/translation.md +309 -0
- package/docs/vi/formatters.md +595 -0
- package/docs/vi/how_works_intlayer.md +256 -0
- package/docs/vi/index.md +174 -0
- package/docs/vi/interest_of_intlayer.md +292 -0
- package/docs/vi/intlayer_CMS.md +549 -0
- package/docs/vi/intlayer_cli.md +850 -0
- package/docs/vi/intlayer_visual_editor.md +288 -0
- package/docs/vi/intlayer_with_angular.md +692 -0
- package/docs/vi/intlayer_with_astro.md +252 -0
- package/docs/vi/intlayer_with_create_react_app.md +1230 -0
- package/docs/vi/intlayer_with_express.md +409 -0
- package/docs/vi/intlayer_with_lynx+react.md +520 -0
- package/docs/vi/intlayer_with_nestjs.md +272 -0
- package/docs/vi/intlayer_with_next-i18next.md +628 -0
- package/docs/vi/intlayer_with_next-intl.md +446 -0
- package/docs/vi/intlayer_with_nextjs_14.md +1584 -0
- package/docs/vi/intlayer_with_nextjs_15.md +1738 -0
- package/docs/vi/intlayer_with_nextjs_16.md +21 -0
- package/docs/vi/intlayer_with_nextjs_page_router.md +1504 -0
- package/docs/vi/intlayer_with_nuxt.md +821 -0
- package/docs/vi/intlayer_with_react_native+expo.md +700 -0
- package/docs/vi/intlayer_with_react_router_v7.md +498 -0
- package/docs/vi/intlayer_with_tanstack.md +562 -0
- package/docs/vi/intlayer_with_vite+preact.md +1722 -0
- package/docs/vi/intlayer_with_vite+react.md +1407 -0
- package/docs/vi/intlayer_with_vite+solid.md +287 -0
- package/docs/vi/intlayer_with_vite+svelte.md +289 -0
- package/docs/vi/intlayer_with_vite+vue.md +1071 -0
- package/docs/vi/introduction.md +215 -0
- package/docs/vi/locale_mapper.md +242 -0
- package/docs/vi/mcp_server.md +211 -0
- package/docs/vi/packages/express-intlayer/t.md +457 -0
- package/docs/vi/packages/intlayer/getConfiguration.md +145 -0
- package/docs/vi/packages/intlayer/getEnumeration.md +162 -0
- package/docs/vi/packages/intlayer/getHTMLTextDir.md +121 -0
- package/docs/vi/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/vi/packages/intlayer/getLocaleName.md +129 -0
- package/docs/vi/packages/intlayer/getLocalizedUrl.md +309 -0
- package/docs/vi/packages/intlayer/getMultilingualUrls.md +221 -0
- package/docs/vi/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/vi/packages/intlayer/getTranslation.md +201 -0
- package/docs/vi/packages/intlayer/getTranslationContent.md +188 -0
- package/docs/vi/packages/next-intlayer/t.md +352 -0
- package/docs/vi/packages/next-intlayer/useDictionary.md +273 -0
- package/docs/vi/packages/next-intlayer/useIntlayer.md +264 -0
- package/docs/vi/packages/next-intlayer/useLocale.md +166 -0
- package/docs/vi/packages/react-intlayer/t.md +304 -0
- package/docs/vi/packages/react-intlayer/useDictionary.md +288 -0
- package/docs/vi/packages/react-intlayer/useI18n.md +295 -0
- package/docs/vi/packages/react-intlayer/useIntlayer.md +256 -0
- package/docs/vi/packages/react-intlayer/useLocale.md +210 -0
- package/docs/vi/per_locale_file.md +326 -0
- package/docs/vi/readme.md +261 -0
- package/docs/vi/releases/v6.md +305 -0
- package/docs/vi/roadmap.md +346 -0
- package/docs/vi/testing.md +202 -0
- package/docs/vi/vs_code_extension.md +126 -0
- package/docs/zh/configuration.md +6 -0
- package/docs/zh/intlayer_cli.md +8 -3
- package/docs/zh/intlayer_with_next-i18next.md +628 -0
- package/docs/zh/intlayer_with_next-intl.md +448 -0
- package/docs/zh/intlayer_with_nextjs_16.md +21 -0
- package/docs/zh/intlayer_with_tanstack.md +4 -0
- package/docs/zh/intlayer_with_vite+react.md +4 -0
- package/frequent_questions/ar/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ar/array_as_content_declaration.md +1 -2
- package/frequent_questions/ar/build_dictionaries.md +1 -2
- package/frequent_questions/ar/build_error_CI_CD.md +1 -2
- package/frequent_questions/ar/bun_set_up.md +1 -2
- package/frequent_questions/ar/customized_locale_list.md +1 -2
- package/frequent_questions/ar/domain_routing.md +1 -2
- package/frequent_questions/ar/esbuild_error.md +1 -2
- package/frequent_questions/ar/get_locale_cookie.md +1 -2
- package/frequent_questions/ar/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ar/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ar/static_rendering.md +1 -3
- package/frequent_questions/ar/translated_path_url.md +1 -2
- package/frequent_questions/ar/unknown_command.md +1 -2
- package/frequent_questions/de/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/de/array_as_content_declaration.md +1 -2
- package/frequent_questions/de/build_dictionaries.md +1 -2
- package/frequent_questions/de/build_error_CI_CD.md +1 -2
- package/frequent_questions/de/bun_set_up.md +1 -2
- package/frequent_questions/de/customized_locale_list.md +1 -2
- package/frequent_questions/de/domain_routing.md +1 -2
- package/frequent_questions/de/esbuild_error.md +1 -2
- package/frequent_questions/de/get_locale_cookie.md +1 -2
- package/frequent_questions/de/intlayer_command_undefined.md +1 -2
- package/frequent_questions/de/locale_incorect_in_url.md +1 -2
- package/frequent_questions/de/static_rendering.md +1 -3
- package/frequent_questions/de/translated_path_url.md +1 -2
- package/frequent_questions/de/unknown_command.md +1 -2
- package/frequent_questions/en/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/en/array_as_content_declaration.md +1 -2
- package/frequent_questions/en/build_dictionaries.md +1 -2
- package/frequent_questions/en/build_error_CI_CD.md +1 -2
- package/frequent_questions/en/bun_set_up.md +1 -2
- package/frequent_questions/en/customized_locale_list.md +1 -2
- package/frequent_questions/en/domain_routing.md +1 -2
- package/frequent_questions/en/esbuild_error.md +1 -2
- package/frequent_questions/en/get_locale_cookie.md +1 -2
- package/frequent_questions/en/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en/locale_incorect_in_url.md +1 -2
- package/frequent_questions/en/static_rendering.md +1 -3
- package/frequent_questions/en/translated_path_url.md +1 -2
- package/frequent_questions/en/unknown_command.md +1 -2
- package/frequent_questions/en-GB/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/en-GB/array_as_content_declaration.md +1 -2
- package/frequent_questions/en-GB/build_dictionaries.md +1 -2
- package/frequent_questions/en-GB/build_error_CI_CD.md +1 -2
- package/frequent_questions/en-GB/bun_set_up.md +1 -2
- package/frequent_questions/en-GB/customized_locale_list.md +1 -2
- package/frequent_questions/en-GB/domain_routing.md +1 -2
- package/frequent_questions/en-GB/esbuild_error.md +1 -2
- package/frequent_questions/en-GB/get_locale_cookie.md +1 -2
- package/frequent_questions/en-GB/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en-GB/locale_incorect_in_url.md +1 -2
- package/frequent_questions/en-GB/static_rendering.md +1 -3
- package/frequent_questions/en-GB/translated_path_url.md +1 -2
- package/frequent_questions/en-GB/unknown_command.md +1 -2
- package/frequent_questions/es/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/es/array_as_content_declaration.md +1 -2
- package/frequent_questions/es/build_dictionaries.md +1 -2
- package/frequent_questions/es/build_error_CI_CD.md +1 -2
- package/frequent_questions/es/bun_set_up.md +1 -2
- package/frequent_questions/es/customized_locale_list.md +1 -2
- package/frequent_questions/es/domain_routing.md +1 -2
- package/frequent_questions/es/esbuild_error.md +1 -2
- package/frequent_questions/es/get_locale_cookie.md +1 -2
- package/frequent_questions/es/intlayer_command_undefined.md +1 -2
- package/frequent_questions/es/locale_incorect_in_url.md +1 -2
- package/frequent_questions/es/static_rendering.md +1 -3
- package/frequent_questions/es/translated_path_url.md +1 -2
- package/frequent_questions/es/unknown_command.md +1 -2
- package/frequent_questions/fr/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/fr/array_as_content_declaration.md +1 -2
- package/frequent_questions/fr/build_dictionaries.md +1 -2
- package/frequent_questions/fr/build_error_CI_CD.md +1 -2
- package/frequent_questions/fr/bun_set_up.md +1 -2
- package/frequent_questions/fr/customized_locale_list.md +1 -2
- package/frequent_questions/fr/domain_routing.md +1 -2
- package/frequent_questions/fr/esbuild_error.md +1 -2
- package/frequent_questions/fr/get_locale_cookie.md +1 -2
- package/frequent_questions/fr/intlayer_command_undefined.md +1 -2
- package/frequent_questions/fr/locale_incorect_in_url.md +1 -2
- package/frequent_questions/fr/static_rendering.md +1 -3
- package/frequent_questions/fr/translated_path_url.md +1 -2
- package/frequent_questions/fr/unknown_command.md +1 -2
- package/frequent_questions/hi/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/hi/array_as_content_declaration.md +1 -2
- package/frequent_questions/hi/build_dictionaries.md +1 -2
- package/frequent_questions/hi/build_error_CI_CD.md +1 -2
- package/frequent_questions/hi/bun_set_up.md +1 -2
- package/frequent_questions/hi/customized_locale_list.md +1 -2
- package/frequent_questions/hi/domain_routing.md +1 -2
- package/frequent_questions/hi/esbuild_error.md +1 -2
- package/frequent_questions/hi/get_locale_cookie.md +1 -2
- package/frequent_questions/hi/intlayer_command_undefined.md +1 -2
- package/frequent_questions/hi/locale_incorect_in_url.md +1 -2
- package/frequent_questions/hi/static_rendering.md +1 -3
- package/frequent_questions/hi/translated_path_url.md +1 -2
- package/frequent_questions/hi/unknown_command.md +1 -2
- package/frequent_questions/id/SSR_Next_no_[locale].md +104 -0
- package/frequent_questions/id/array_as_content_declaration.md +71 -0
- package/frequent_questions/id/build_dictionaries.md +58 -0
- package/frequent_questions/id/build_error_CI_CD.md +74 -0
- package/frequent_questions/id/bun_set_up.md +53 -0
- package/frequent_questions/id/customized_locale_list.md +64 -0
- package/frequent_questions/id/domain_routing.md +113 -0
- package/frequent_questions/id/esbuild_error.md +29 -0
- package/frequent_questions/id/get_locale_cookie.md +142 -0
- package/frequent_questions/id/intlayer_command_undefined.md +155 -0
- package/frequent_questions/id/locale_incorect_in_url.md +73 -0
- package/frequent_questions/id/static_rendering.md +44 -0
- package/frequent_questions/id/translated_path_url.md +55 -0
- package/frequent_questions/id/unknown_command.md +97 -0
- package/frequent_questions/it/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/it/array_as_content_declaration.md +1 -2
- package/frequent_questions/it/build_dictionaries.md +1 -2
- package/frequent_questions/it/build_error_CI_CD.md +1 -2
- package/frequent_questions/it/bun_set_up.md +1 -2
- package/frequent_questions/it/customized_locale_list.md +1 -2
- package/frequent_questions/it/domain_routing.md +1 -2
- package/frequent_questions/it/esbuild_error.md +1 -2
- package/frequent_questions/it/get_locale_cookie.md +1 -2
- package/frequent_questions/it/intlayer_command_undefined.md +1 -2
- package/frequent_questions/it/locale_incorect_in_url.md +1 -2
- package/frequent_questions/it/static_rendering.md +1 -3
- package/frequent_questions/it/translated_path_url.md +1 -2
- package/frequent_questions/it/unknown_command.md +1 -2
- package/frequent_questions/ja/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ja/array_as_content_declaration.md +1 -2
- package/frequent_questions/ja/build_dictionaries.md +1 -2
- package/frequent_questions/ja/build_error_CI_CD.md +1 -2
- package/frequent_questions/ja/bun_set_up.md +1 -2
- package/frequent_questions/ja/customized_locale_list.md +1 -2
- package/frequent_questions/ja/domain_routing.md +1 -2
- package/frequent_questions/ja/esbuild_error.md +1 -2
- package/frequent_questions/ja/get_locale_cookie.md +1 -2
- package/frequent_questions/ja/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ja/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ja/static_rendering.md +1 -3
- package/frequent_questions/ja/translated_path_url.md +1 -2
- package/frequent_questions/ja/unknown_command.md +1 -2
- package/frequent_questions/ko/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ko/array_as_content_declaration.md +1 -2
- package/frequent_questions/ko/build_dictionaries.md +1 -2
- package/frequent_questions/ko/build_error_CI_CD.md +1 -2
- package/frequent_questions/ko/bun_set_up.md +1 -2
- package/frequent_questions/ko/customized_locale_list.md +1 -2
- package/frequent_questions/ko/domain_routing.md +1 -2
- package/frequent_questions/ko/esbuild_error.md +1 -2
- package/frequent_questions/ko/get_locale_cookie.md +1 -2
- package/frequent_questions/ko/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ko/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ko/static_rendering.md +1 -3
- package/frequent_questions/ko/translated_path_url.md +1 -2
- package/frequent_questions/ko/unknown_command.md +1 -2
- package/frequent_questions/pl/SSR_Next_no_[locale].md +104 -0
- package/frequent_questions/pl/array_as_content_declaration.md +71 -0
- package/frequent_questions/pl/build_dictionaries.md +58 -0
- package/frequent_questions/pl/build_error_CI_CD.md +74 -0
- package/frequent_questions/pl/bun_set_up.md +54 -0
- package/frequent_questions/pl/customized_locale_list.md +64 -0
- package/frequent_questions/pl/domain_routing.md +113 -0
- package/frequent_questions/pl/esbuild_error.md +29 -0
- package/frequent_questions/pl/get_locale_cookie.md +142 -0
- package/frequent_questions/pl/intlayer_command_undefined.md +155 -0
- package/frequent_questions/pl/locale_incorect_in_url.md +73 -0
- package/frequent_questions/pl/static_rendering.md +44 -0
- package/frequent_questions/pl/translated_path_url.md +55 -0
- package/frequent_questions/pl/unknown_command.md +97 -0
- package/frequent_questions/pt/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/pt/array_as_content_declaration.md +1 -2
- package/frequent_questions/pt/build_dictionaries.md +1 -2
- package/frequent_questions/pt/build_error_CI_CD.md +1 -2
- package/frequent_questions/pt/bun_set_up.md +1 -2
- package/frequent_questions/pt/customized_locale_list.md +1 -2
- package/frequent_questions/pt/domain_routing.md +1 -2
- package/frequent_questions/pt/esbuild_error.md +1 -2
- package/frequent_questions/pt/get_locale_cookie.md +1 -2
- package/frequent_questions/pt/intlayer_command_undefined.md +1 -2
- package/frequent_questions/pt/locale_incorect_in_url.md +1 -2
- package/frequent_questions/pt/static_rendering.md +1 -3
- package/frequent_questions/pt/translated_path_url.md +1 -2
- package/frequent_questions/pt/unknown_command.md +1 -2
- package/frequent_questions/ru/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ru/array_as_content_declaration.md +1 -2
- package/frequent_questions/ru/build_dictionaries.md +1 -2
- package/frequent_questions/ru/build_error_CI_CD.md +1 -2
- package/frequent_questions/ru/bun_set_up.md +1 -2
- package/frequent_questions/ru/customized_locale_list.md +1 -2
- package/frequent_questions/ru/domain_routing.md +1 -2
- package/frequent_questions/ru/esbuild_error.md +1 -2
- package/frequent_questions/ru/get_locale_cookie.md +1 -2
- package/frequent_questions/ru/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ru/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ru/static_rendering.md +1 -2
- package/frequent_questions/ru/translated_path_url.md +1 -2
- package/frequent_questions/ru/unknown_command.md +1 -2
- package/frequent_questions/tr/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/tr/array_as_content_declaration.md +1 -2
- package/frequent_questions/tr/build_dictionaries.md +1 -2
- package/frequent_questions/tr/build_error_CI_CD.md +1 -2
- package/frequent_questions/tr/bun_set_up.md +1 -2
- package/frequent_questions/tr/customized_locale_list.md +1 -2
- package/frequent_questions/tr/domain_routing.md +1 -2
- package/frequent_questions/tr/esbuild_error.md +1 -2
- package/frequent_questions/tr/get_locale_cookie.md +1 -2
- package/frequent_questions/tr/intlayer_command_undefined.md +1 -2
- package/frequent_questions/tr/locale_incorect_in_url.md +1 -2
- package/frequent_questions/tr/static_rendering.md +1 -2
- package/frequent_questions/tr/translated_path_url.md +1 -2
- package/frequent_questions/tr/unknown_command.md +1 -2
- package/frequent_questions/vi/SSR_Next_no_[locale].md +106 -0
- package/frequent_questions/vi/array_as_content_declaration.md +71 -0
- package/frequent_questions/vi/build_dictionaries.md +58 -0
- package/frequent_questions/vi/build_error_CI_CD.md +74 -0
- package/frequent_questions/vi/bun_set_up.md +53 -0
- package/frequent_questions/vi/customized_locale_list.md +64 -0
- package/frequent_questions/vi/domain_routing.md +113 -0
- package/frequent_questions/vi/esbuild_error.md +29 -0
- package/frequent_questions/vi/get_locale_cookie.md +142 -0
- package/frequent_questions/vi/intlayer_command_undefined.md +155 -0
- package/frequent_questions/vi/locale_incorect_in_url.md +73 -0
- package/frequent_questions/vi/static_rendering.md +44 -0
- package/frequent_questions/vi/translated_path_url.md +55 -0
- package/frequent_questions/vi/unknown_command.md +97 -0
- package/frequent_questions/zh/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/zh/array_as_content_declaration.md +1 -2
- package/frequent_questions/zh/build_dictionaries.md +1 -2
- package/frequent_questions/zh/build_error_CI_CD.md +1 -2
- package/frequent_questions/zh/bun_set_up.md +1 -2
- package/frequent_questions/zh/customized_locale_list.md +1 -2
- package/frequent_questions/zh/domain_routing.md +1 -2
- package/frequent_questions/zh/esbuild_error.md +1 -2
- package/frequent_questions/zh/get_locale_cookie.md +1 -2
- package/frequent_questions/zh/intlayer_command_undefined.md +1 -2
- package/frequent_questions/zh/locale_incorect_in_url.md +1 -2
- package/frequent_questions/zh/static_rendering.md +1 -3
- package/frequent_questions/zh/translated_path_url.md +1 -2
- package/frequent_questions/zh/unknown_command.md +1 -2
- package/legal/id/privacy_notice.md +83 -0
- package/legal/id/terms_of_service.md +55 -0
- package/legal/pl/privacy_notice.md +83 -0
- package/legal/pl/terms_of_service.md +55 -0
- package/legal/vi/privacy_notice.md +83 -0
- package/legal/vi/terms_of_service.md +55 -0
- package/package.json +19 -18
- package/src/generated/blog.entry.ts +38 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-11-01
|
|
3
|
+
updatedAt: 2025-11-01
|
|
4
|
+
title: next-intl を使った Next.js アプリケーションの国際化方法
|
|
5
|
+
description: next-intl を使った i18n の設定方法:多言語対応の Next.js アプリ向けのベストプラクティスと SEO のヒント、国際化、コンテンツの整理、技術的セットアップを網羅。
|
|
6
|
+
slugs:
|
|
7
|
+
- blog
|
|
8
|
+
- nextjs-internationalization-using-next-intl
|
|
9
|
+
applicationTemplate: https://github.com/aymericzip/next-intl-template
|
|
10
|
+
history:
|
|
11
|
+
- version: 7.0.0
|
|
12
|
+
date: 2025-11-01
|
|
13
|
+
changes: 初版
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# 2025年版 next-intl を使った Next.js アプリケーションの国際化方法
|
|
17
|
+
|
|
18
|
+
## 目次
|
|
19
|
+
|
|
20
|
+
<TOC/>
|
|
21
|
+
|
|
22
|
+
## next-intl とは?
|
|
23
|
+
|
|
24
|
+
**next-intl** は、Next.js の App Router 向けに特別に設計された人気の国際化(i18n)ライブラリです。優れた TypeScript サポートと組み込みの最適化機能を備え、多言語対応の Next.js アプリケーションをシームレスに構築する方法を提供します。
|
|
25
|
+
|
|
26
|
+
> ご希望であれば、[next-i18next ガイド](https://github.com/aymericzip/intlayer/blob/main/docs/blog/ja/i18n_using_next-i18next.md)や、直接 [Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_with_next-intl.md) を参照することもできます。
|
|
27
|
+
|
|
28
|
+
> 比較については、[next-i18next vs next-intl vs Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md) をご覧ください。
|
|
29
|
+
|
|
30
|
+
## 守るべきプラクティス
|
|
31
|
+
|
|
32
|
+
実装に入る前に、以下のプラクティスを守ることをお勧めします:
|
|
33
|
+
|
|
34
|
+
- **HTMLの`lang`と`dir`属性を設定する**
|
|
35
|
+
レイアウト内で`getLocaleDirection(locale)`を使って`dir`を計算し、適切なアクセシビリティとSEOのために`<html lang={locale} dir={dir}>`を設定します。
|
|
36
|
+
- **メッセージをネームスペースごとに分割する**
|
|
37
|
+
ロケールとネームスペースごとにJSONファイルを整理し(例:`common.json`、`about.json`)、必要なものだけを読み込みます。
|
|
38
|
+
- **クライアントのペイロードを最小化する**
|
|
39
|
+
ページ上では、必要なネームスペースのみを`NextIntlClientProvider`に送信します(例:`pick(messages, ['common', 'about'])`)。
|
|
40
|
+
- **静的ページを優先する**
|
|
41
|
+
パフォーマンスとSEO向上のために、可能な限り静的ページを使用します。
|
|
42
|
+
- **サーバーコンポーネントでのi18n**
|
|
43
|
+
サーバーコンポーネントは、ページや`client`としてマークされていないすべてのコンポーネントのように静的であり、ビルド時にプリレンダリングできます。したがって、翻訳関数をプロップとして渡す必要があります。
|
|
44
|
+
- **TypeScriptの型設定**
|
|
45
|
+
アプリケーション全体で型安全を確保するために、ロケールの型を設定します。
|
|
46
|
+
- **リダイレクト用プロキシ**
|
|
47
|
+
ロケール検出とルーティングを処理し、ユーザーを適切なロケール接頭辞付きURLにリダイレクトするためにプロキシを使用します。
|
|
48
|
+
- **メタデータ、サイトマップ、robots.txtの国際化**
|
|
49
|
+
Next.jsが提供する`generateMetadata`関数を使用して、メタデータ、サイトマップ、robots.txtを国際化し、すべてのロケールで検索エンジンによるより良い検出を確保します。
|
|
50
|
+
- **リンクのローカライズ**
|
|
51
|
+
`Link`コンポーネントを使用してリンクをローカライズし、ユーザーを適切なロケール接頭辞付きURLにリダイレクトします。すべてのロケールでページの発見性を確保することが重要です。
|
|
52
|
+
- **テストと翻訳の自動化**
|
|
53
|
+
テストと翻訳の自動化は、多言語アプリケーションのメンテナンスにかかる時間を削減します。
|
|
54
|
+
|
|
55
|
+
> 国際化とSEOに関して知っておくべきすべてをまとめたドキュメントをご覧ください: [next-intlによる国際化 (i18n)](https://github.com/aymericzip/intlayer/blob/main/docs/blog/ja/internationalization_and_SEO.md)。
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Next.jsアプリケーションでnext-intlをセットアップするステップバイステップガイド
|
|
60
|
+
|
|
61
|
+
<iframe
|
|
62
|
+
src="https://stackblitz.com/github/aymericzip/next-intl-template?embed=1&ctl=1&file=src/i18n.ts"
|
|
63
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
64
|
+
title="デモ CodeSandbox - Intlayer を使ってアプリケーションを国際化する方法"
|
|
65
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
66
|
+
loading="lazy"
|
|
67
|
+
|
|
68
|
+
> GitHub の [Application Template](https://github.com/aymericzip/next-intl-template) を参照してください。
|
|
69
|
+
|
|
70
|
+
これから作成するプロジェクト構造は以下の通りです:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
.
|
|
74
|
+
├── global.ts
|
|
75
|
+
├── locales
|
|
76
|
+
│ ├── en
|
|
77
|
+
│ │ ├── common.json
|
|
78
|
+
│ │ └── about.json
|
|
79
|
+
│ ├── fr
|
|
80
|
+
│ │ ├── common.json
|
|
81
|
+
│ │ └── about.json
|
|
82
|
+
│ └── es
|
|
83
|
+
│ ├── common.json
|
|
84
|
+
│ └── about.json
|
|
85
|
+
└── src # src はオプションです
|
|
86
|
+
├── proxy.ts
|
|
87
|
+
├── app
|
|
88
|
+
│ ├── i18n.ts
|
|
89
|
+
│ └── [locale]
|
|
90
|
+
│ ├── layout.tsx
|
|
91
|
+
│ ├── (home) # / (ホームリソースで全ページを汚染しないためのルートグループ)
|
|
92
|
+
│ │ ├── layout.tsx
|
|
93
|
+
│ │ └── page.tsx
|
|
94
|
+
│ └── about # /about
|
|
95
|
+
│ ├── layout.tsx
|
|
96
|
+
│ └── page.tsx
|
|
97
|
+
└── components
|
|
98
|
+
├── ClientComponent.tsx
|
|
99
|
+
└── ServerComponent.tsx
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### ステップ1: 依存関係のインストール
|
|
103
|
+
|
|
104
|
+
npmを使って必要なパッケージをインストールします:
|
|
105
|
+
|
|
106
|
+
```bash packageManager="npm"
|
|
107
|
+
npm install next-intl
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```bash packageManager="pnpm"
|
|
111
|
+
pnpm add next-intl
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```bash packageManager="yarn"
|
|
115
|
+
yarn add next-intl
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- **next-intl**: Next.js App Router向けのコア国際化ライブラリで、翻訳管理のためのフック、サーバー関数、クライアントプロバイダーを提供します。
|
|
119
|
+
|
|
120
|
+
### ステップ2: プロジェクトの設定
|
|
121
|
+
|
|
122
|
+
サポートするロケールを定義し、next-intlのリクエスト設定を行う設定ファイルを作成します。このファイルはi18n設定の単一の信頼できる情報源として機能し、アプリケーション全体で型安全性を保証します。
|
|
123
|
+
|
|
124
|
+
ロケール設定を一元化することで不整合を防ぎ、将来的にロケールの追加や削除を容易にします。`getRequestConfig`関数はすべてのリクエストで実行され、各ページに必要な翻訳のみを読み込むため、コード分割が可能になりバンドルサイズを削減します。
|
|
125
|
+
|
|
126
|
+
```tsx fileName="src/i18n.ts"
|
|
127
|
+
import { notFound } from "next/navigation";
|
|
128
|
+
import createMiddleware from "next-intl/middleware";
|
|
129
|
+
import { createNavigation } from "next-intl/navigation";
|
|
130
|
+
|
|
131
|
+
// 型安全にサポートするロケールを定義
|
|
132
|
+
export const locales = ["en", "fr", "es"] as const;
|
|
133
|
+
export type Locale = (typeof locales)[number];
|
|
134
|
+
export const defaultLocale: Locale = "en";
|
|
135
|
+
|
|
136
|
+
export function isRTL(locale: Locale | (string & {})) {
|
|
137
|
+
return /^(ar|fa|he|iw|ur|ps|sd|ug|yi|ckb|ku)(-|$)/i.test(locale);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ロケールごとにメッセージを動的に読み込み、コード分割を可能にする
|
|
141
|
+
// Promise.all はパフォーマンス向上のため名前空間を並列で読み込む
|
|
142
|
+
async function loadMessages(locale: Locale) {
|
|
143
|
+
// レイアウトやページで必要な名前空間のみを読み込む
|
|
144
|
+
const [common, home, about] = await Promise.all([
|
|
145
|
+
import(`../locales/${locale}/common.json`).then((m) => m.default),
|
|
146
|
+
import(`../locales/${locale}/home.json`).then((m) => m.default),
|
|
147
|
+
import(`../locales/${locale}/about.json`).then((m) => m.default),
|
|
148
|
+
// ... 将来的に追加するJSONファイルはここに追加してください
|
|
149
|
+
]);
|
|
150
|
+
|
|
151
|
+
return { common, home, about } as const;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// ローカライズされたURLを生成するヘルパー関数(例: /about と /fr/about)
|
|
155
|
+
export function localizedPath(locale: string, path: string) {
|
|
156
|
+
return locale === defaultLocale ? path : `/${locale}${path}`;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// getRequestConfigは各リクエストで実行され、サーバーコンポーネントにメッセージを提供します
|
|
160
|
+
// ここでnext-intlがNext.jsのサーバーサイドレンダリングにフックします
|
|
161
|
+
export default async function getRequestConfig({
|
|
162
|
+
requestLocale,
|
|
163
|
+
}: {
|
|
164
|
+
requestLocale: Promise<string | undefined>;
|
|
165
|
+
}) {
|
|
166
|
+
const requested: Locale = ((await requestLocale) as Locale) ?? defaultLocale;
|
|
167
|
+
|
|
168
|
+
if (!locales.includes(requested)) notFound();
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
locale: requested,
|
|
172
|
+
messages: await loadMessages(requested),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function getCookie(locale: Locale) {
|
|
177
|
+
return [
|
|
178
|
+
`NEXT_LOCALE=${locale}`,
|
|
179
|
+
"Path=/",
|
|
180
|
+
`Max-Age=${60 * 60 * 24 * 365}`, // 1年
|
|
181
|
+
"SameSite=Lax",
|
|
182
|
+
].join("; ");
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const routingOptions = {
|
|
186
|
+
locales,
|
|
187
|
+
defaultLocale,
|
|
188
|
+
localePrefix: "as-needed", // /en/... のルートを /... に変更
|
|
189
|
+
// オプション: ローカライズされたパス名
|
|
190
|
+
// pathnames: {
|
|
191
|
+
// '/': '/',
|
|
192
|
+
// '/about': {en: '/about', fr: '/a-propos', es: '/acerca-de'},
|
|
193
|
+
// '/blog/[slug]': '/blog/[slug]'
|
|
194
|
+
// }
|
|
195
|
+
// localeDetection: true, // クッキーからの "/" -> "/en" リダイレクトを防止
|
|
196
|
+
} as const;
|
|
197
|
+
|
|
198
|
+
export const { Link, redirect, usePathname, useRouter, getPathname } =
|
|
199
|
+
createNavigation(routingOptions);
|
|
200
|
+
|
|
201
|
+
export const proxy = createMiddleware(routingOptions);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### ステップ3: 動的ロケールルートの定義
|
|
205
|
+
|
|
206
|
+
ロケールごとの動的ルーティングを設定するために、アプリフォルダ内に `[locale]` ディレクトリを作成します。これにより、Next.js はロケールベースのルーティングを処理でき、各ロケールが URL セグメント(例:`/en/about`、`/fr/about`)になります。
|
|
207
|
+
|
|
208
|
+
動的ルートを使用することで、Next.js はビルド時にすべてのロケールの静的ページを生成でき、パフォーマンスとSEOが向上します。レイアウトコンポーネントは、ロケールに基づいて HTML の `lang` と `dir` 属性を設定し、アクセシビリティや検索エンジンの理解に重要です。
|
|
209
|
+
|
|
210
|
+
```tsx fileName="src/app/[locale]/layout.tsx"
|
|
211
|
+
import type { ReactNode } from "react";
|
|
212
|
+
import { locales } from "@/i18n";
|
|
213
|
+
import { getLocaleDirection, setRequestLocale } from "next-intl/server";
|
|
214
|
+
|
|
215
|
+
// ビルド時にすべてのロケールの静的ページを事前生成(SSG)
|
|
216
|
+
// これによりパフォーマンスとSEOが向上します
|
|
217
|
+
export function generateStaticParams() {
|
|
218
|
+
return locales.map((locale) => ({ locale }));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export default function LocaleLayout({
|
|
222
|
+
children,
|
|
223
|
+
params,
|
|
224
|
+
}: {
|
|
225
|
+
children: ReactNode;
|
|
226
|
+
params: Promise<{ locale: string }>;
|
|
227
|
+
}) {
|
|
228
|
+
// Next.jsのApp Routerでは、paramsはPromise(await可能)
|
|
229
|
+
// これにより、動的ルートセグメントを非同期に解決できる
|
|
230
|
+
const { locale } = await params;
|
|
231
|
+
|
|
232
|
+
// 重要: setRequestLocaleはnext-intlにこのリクエストで使用するロケールを伝える
|
|
233
|
+
// これがないと、getTranslations()はサーバーコンポーネントでどのロケールを使うか分からない
|
|
234
|
+
setRequestLocale(locale);
|
|
235
|
+
|
|
236
|
+
// 適切なHTMLレンダリングのためにテキストの方向(LTR/RTL)を取得
|
|
237
|
+
const dir = getLocaleDirection(locale);
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<html lang={locale} dir={dir}>
|
|
241
|
+
<body>{children}</body>
|
|
242
|
+
</html>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
249
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
250
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
251
|
+
import pick from "lodash/pick";
|
|
252
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
253
|
+
import ClientComponent from "@/components/ClientComponent";
|
|
254
|
+
|
|
255
|
+
export default async function AboutPage({
|
|
256
|
+
params,
|
|
257
|
+
}: {
|
|
258
|
+
params: Promise<{ locale: string }>;
|
|
259
|
+
}) {
|
|
260
|
+
const { locale } = await params;
|
|
261
|
+
|
|
262
|
+
// メッセージはサーバー側でロードされます。クライアントには必要なものだけを渡します。
|
|
263
|
+
// これにより、ブラウザに送信されるJavaScriptバンドルが最小化されます
|
|
264
|
+
const messages = await getMessages();
|
|
265
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
266
|
+
|
|
267
|
+
// 完全にサーバー側での翻訳/フォーマット処理
|
|
268
|
+
// これらはサーバー上で実行され、コンポーネントにpropsとして渡すことができます
|
|
269
|
+
const tAbout = await getTranslations("about");
|
|
270
|
+
const tCounter = await getTranslations("about.counter");
|
|
271
|
+
const format = await getFormatter();
|
|
272
|
+
|
|
273
|
+
const initialFormattedCount = format.number(0);
|
|
274
|
+
|
|
275
|
+
return (
|
|
276
|
+
// NextIntlClientProviderはクライアントコンポーネントで翻訳を利用可能にします
|
|
277
|
+
// クライアントコンポーネントが実際に使用する名前空間のみを渡します
|
|
278
|
+
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
279
|
+
<main>
|
|
280
|
+
<h1>{tAbout("title")}</h1>
|
|
281
|
+
<ClientComponent />
|
|
282
|
+
<ServerComponent
|
|
283
|
+
formattedCount={initialFormattedCount}
|
|
284
|
+
label={tCounter("label")}
|
|
285
|
+
increment={tCounter("increment")}
|
|
286
|
+
/>
|
|
287
|
+
</main>
|
|
288
|
+
</NextIntlClientProvider>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### ステップ4: 翻訳ファイルを作成する
|
|
294
|
+
|
|
295
|
+
各ロケールと名前空間ごとにJSONファイルを作成します。この構造により、翻訳を論理的に整理し、各ページに必要なものだけを読み込むことができます。
|
|
296
|
+
|
|
297
|
+
名前空間ごとに翻訳を整理することで(例:`common.json`、`about.json`)、コード分割が可能になり、バンドルサイズを削減できます。これにより、各ページに必要な翻訳のみを読み込むため、パフォーマンスが向上します。
|
|
298
|
+
|
|
299
|
+
```json fileName="locales/en/common.json"
|
|
300
|
+
{
|
|
301
|
+
"welcome": "Welcome",
|
|
302
|
+
"greeting": "Hello, world!"
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
```json fileName="locales/fr/common.json"
|
|
307
|
+
{
|
|
308
|
+
"welcome": "Bienvenue",
|
|
309
|
+
"greeting": "Bonjour le monde!"
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
```json fileName="locales/en/about.json"
|
|
314
|
+
{
|
|
315
|
+
"title": "About",
|
|
316
|
+
"description": "About page description",
|
|
317
|
+
"counter": {
|
|
318
|
+
"label": "Counter",
|
|
319
|
+
"increment": "Increment"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
```json fileName="locales/fr/about.json"
|
|
325
|
+
{
|
|
326
|
+
"title": "À propos",
|
|
327
|
+
"description": "Description de la page À propos",
|
|
328
|
+
"counter": {
|
|
329
|
+
"label": "Compteur",
|
|
330
|
+
"increment": "Incrémenter"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### ステップ5: ページで翻訳を利用する
|
|
336
|
+
|
|
337
|
+
サーバーで翻訳を読み込み、それをサーバーコンポーネントとクライアントコンポーネントの両方に渡すページコンポーネントを作成します。これにより、レンダリング前に翻訳が読み込まれ、コンテンツのフラッシュを防止します。
|
|
338
|
+
|
|
339
|
+
サーバーサイドでの翻訳読み込みはSEOを向上させ、FOUC(未翻訳コンテンツのフラッシュ)を防ぎます。`pick`を使用して必要な名前空間のみをクライアントプロバイダーに送ることで、ブラウザに送信されるJavaScriptバンドルを最小化します。
|
|
340
|
+
|
|
341
|
+
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
342
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
343
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
344
|
+
import pick from "lodash/pick";
|
|
345
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
346
|
+
import ClientComponent from "@/components/ClientComponent";
|
|
347
|
+
|
|
348
|
+
export default async function AboutPage({
|
|
349
|
+
params,
|
|
350
|
+
}: {
|
|
351
|
+
params: Promise<{ locale: string }>;
|
|
352
|
+
}) {
|
|
353
|
+
const { locale } = await params;
|
|
354
|
+
|
|
355
|
+
// メッセージはサーバー側で読み込まれます。クライアントには必要なものだけを渡します。
|
|
356
|
+
// これにより、ブラウザに送信されるJavaScriptバンドルが最小化されます
|
|
357
|
+
const messages = await getMessages();
|
|
358
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
359
|
+
|
|
360
|
+
// 完全にサーバー側での翻訳/フォーマット処理
|
|
361
|
+
// これらはサーバー上で実行され、コンポーネントにpropsとして渡すことができます
|
|
362
|
+
const tAbout = await getTranslations("about");
|
|
363
|
+
const tCounter = await getTranslations("about.counter");
|
|
364
|
+
const format = await getFormatter();
|
|
365
|
+
|
|
366
|
+
const initialFormattedCount = format.number(0);
|
|
367
|
+
|
|
368
|
+
return (
|
|
369
|
+
// NextIntlClientProvider はクライアントコンポーネントで翻訳を利用可能にします
|
|
370
|
+
// クライアントコンポーネントが実際に使用する名前空間のみを渡してください
|
|
371
|
+
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
372
|
+
<main>
|
|
373
|
+
<h1>{tAbout("title")}</h1>
|
|
374
|
+
<ClientComponent />
|
|
375
|
+
<ServerComponent
|
|
376
|
+
formattedCount={initialFormattedCount}
|
|
377
|
+
label={tCounter("label")}
|
|
378
|
+
increment={tCounter("increment")}
|
|
379
|
+
/>
|
|
380
|
+
</main>
|
|
381
|
+
</NextIntlClientProvider>
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### ステップ6: クライアントコンポーネントでの翻訳の使用
|
|
387
|
+
|
|
388
|
+
クライアントコンポーネントは、`useTranslations` と `useFormatter` フックを使用して翻訳およびフォーマット関数にアクセスできます。これらのフックは `NextIntlClientProvider` コンテキストから読み取ります。
|
|
389
|
+
|
|
390
|
+
クライアントコンポーネントは翻訳にアクセスするために React フックを必要とします。`useTranslations` と `useFormatter` フックは next-intl とシームレスに統合されており、ロケールが変更された際にリアクティブに更新されます。
|
|
391
|
+
|
|
392
|
+
> ページのクライアントメッセージに必要な名前空間を追加することを忘れないでください(クライアントコンポーネントが実際に必要とする名前空間のみを含めてください)。
|
|
393
|
+
|
|
394
|
+
```tsx fileName="src/components/ClientComponent.tsx"
|
|
395
|
+
"use client";
|
|
396
|
+
|
|
397
|
+
import React, { useState } from "react";
|
|
398
|
+
import { useTranslations, useFormatter } from "next-intl";
|
|
399
|
+
|
|
400
|
+
const ClientComponent = () => {
|
|
401
|
+
// ネストされたオブジェクトに直接スコープを設定
|
|
402
|
+
// useTranslations/useFormatter は NextIntlClientProvider コンテキストから読み取るフックです
|
|
403
|
+
// コンポーネントが NextIntlClientProvider でラップされている場合にのみ動作します
|
|
404
|
+
const t = useTranslations("about.counter");
|
|
405
|
+
const format = useFormatter();
|
|
406
|
+
const [count, setCount] = useState(0);
|
|
407
|
+
|
|
408
|
+
return (
|
|
409
|
+
<div>
|
|
410
|
+
<p>{format.number(count)}</p>
|
|
411
|
+
<button
|
|
412
|
+
aria-label={t("label")}
|
|
413
|
+
onClick={() => setCount((count) => count + 1)}
|
|
414
|
+
>
|
|
415
|
+
{t("increment")}
|
|
416
|
+
</button>
|
|
417
|
+
</div>
|
|
418
|
+
);
|
|
419
|
+
};
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### ステップ7: サーバーコンポーネントでの翻訳の使用
|
|
423
|
+
|
|
424
|
+
サーバーコンポーネントは React フックを使用できないため、親コンポーネントから props 経由で翻訳とフォーマッターを受け取ります。この方法により、サーバーコンポーネントは同期的に保たれ、クライアントコンポーネント内にネストすることが可能になります。
|
|
425
|
+
|
|
426
|
+
クライアント境界内にネストされる可能性のあるサーバーコンポーネントは同期的である必要があります。翻訳済みの文字列やフォーマット済みの値をpropsとして渡すことで、非同期処理を回避し、適切なレンダリングを保証します。親のページコンポーネントで翻訳とフォーマットを事前に計算してください。
|
|
427
|
+
|
|
428
|
+
```tsx fileName="src/components/ServerComponent.tsx"
|
|
429
|
+
// クライアントコンポーネント内にネストされたサーバーコンポーネントは同期的でなければなりません
|
|
430
|
+
// Reactはサーバー/クライアント境界を越えた非同期関数をシリアライズできません
|
|
431
|
+
// 解決策:親で翻訳/フォーマットを事前計算し、propsとして渡す
|
|
432
|
+
type ServerComponentProps = {
|
|
433
|
+
formattedCount: string;
|
|
434
|
+
label: string;
|
|
435
|
+
increment: string;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
const ServerComponent = ({
|
|
439
|
+
formattedCount,
|
|
440
|
+
label,
|
|
441
|
+
increment,
|
|
442
|
+
}: ServerComponentProps) => {
|
|
443
|
+
return (
|
|
444
|
+
<div>
|
|
445
|
+
<p>{formattedCount}</p>
|
|
446
|
+
<button aria-label={label}>{increment}</button>
|
|
447
|
+
</div>
|
|
448
|
+
);
|
|
449
|
+
};
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
> ページやレイアウト内で、`next-intl/server` から `getTranslations` と `getFormatter` を使用して翻訳とフォーマットを事前計算し、それらを props としてサーバーコンポーネントに渡してください。
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
### (オプション)ステップ8: コンテンツの言語を変更する
|
|
457
|
+
|
|
458
|
+
next-intl を使ってコンテンツの言語を変更するには、同じパス名を指しながらロケールを切り替えるロケール対応リンクをレンダリングします。プロバイダーが URL を自動的に書き換えるため、現在のルートをターゲットにするだけで済みます。
|
|
459
|
+
|
|
460
|
+
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
461
|
+
"use client";
|
|
462
|
+
|
|
463
|
+
import Link from "next/link";
|
|
464
|
+
import { usePathname } from "next/navigation";
|
|
465
|
+
import { useLocale } from "next-intl";
|
|
466
|
+
import { defaultLocale, getCookie, type Locale, locales } from "@/i18n";
|
|
467
|
+
|
|
468
|
+
const getLocaleLabel = (locale: Locale): string => {
|
|
469
|
+
try {
|
|
470
|
+
const displayNames = new Intl.DisplayNames([locale], { type: "language" });
|
|
471
|
+
return displayNames.of(locale) ?? locale.toUpperCase();
|
|
472
|
+
} catch {
|
|
473
|
+
return locale.toUpperCase();
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
const localeFlags: Record<Locale, string> = {
|
|
478
|
+
en: "🇬🇧",
|
|
479
|
+
fr: "🇫🇷",
|
|
480
|
+
es: "🇪🇸",
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
export default function LocaleSwitcher() {
|
|
484
|
+
const activeLocale = useLocale();
|
|
485
|
+
const pathname = usePathname();
|
|
486
|
+
|
|
487
|
+
// パス名からロケールのプレフィックスを削除してベースパスを取得する
|
|
488
|
+
const getBasePath = (path: string) => {
|
|
489
|
+
for (const locale of locales) {
|
|
490
|
+
if (path.startsWith(`/${locale}`)) {
|
|
491
|
+
return path.slice(locale.length + 1) || "/";
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return path;
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
const basePath = getBasePath(pathname);
|
|
498
|
+
|
|
499
|
+
return (
|
|
500
|
+
<nav aria-label="言語セレクター">
|
|
501
|
+
<div>
|
|
502
|
+
{(locales as readonly Locale[]).map((locale) => {
|
|
503
|
+
const isActive = locale === activeLocale;
|
|
504
|
+
// デフォルトロケールかどうかに基づいてhrefを構築
|
|
505
|
+
const href =
|
|
506
|
+
locale === defaultLocale ? basePath : `/${locale}${basePath}`;
|
|
507
|
+
return (
|
|
508
|
+
<Link
|
|
509
|
+
key={locale}
|
|
510
|
+
href={href}
|
|
511
|
+
aria-current={isActive ? "page" : undefined}
|
|
512
|
+
onClick={() => {
|
|
513
|
+
document.cookie = getCookie(locale);
|
|
514
|
+
}}
|
|
515
|
+
>
|
|
516
|
+
<span>{localeFlags[locale]}</span>
|
|
517
|
+
<span>{getLocaleLabel(locale)}</span>
|
|
518
|
+
<span>{locale.toUpperCase()}</span>
|
|
519
|
+
</Link>
|
|
520
|
+
);
|
|
521
|
+
})}
|
|
522
|
+
</div>
|
|
523
|
+
</nav>
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### (オプション)ステップ9:ローカライズされたLinkコンポーネントを使用する
|
|
529
|
+
|
|
530
|
+
`next-intl`は、アクティブなロケールを自動的に適用するローカライズされたリンクコンポーネントを含むサブパッケージ`next-intl/navigation`を提供しています。これはすでに`@/i18n`ファイルで抽出してあるので、以下のように使用できます。
|
|
531
|
+
|
|
532
|
+
```tsx fileName="src/components/MyComponent.tsx"
|
|
533
|
+
import { Link } from "@/i18n";
|
|
534
|
+
|
|
535
|
+
return <Link href="/about">t("about.title")</Link>;
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### (オプション)ステップ10:Server Actions内でアクティブなロケールにアクセスする
|
|
539
|
+
|
|
540
|
+
Server Actionsは`next-intl/server`を使用して現在のロケールを読み取ることができます。これはローカライズされたメールを送信したり、送信されたデータと共に言語設定を保存したりするのに便利です。
|
|
541
|
+
|
|
542
|
+
```ts fileName="src/app/actions/get-current-locale.ts"
|
|
543
|
+
"use server";
|
|
544
|
+
|
|
545
|
+
import { getLocale } from "next-intl/server";
|
|
546
|
+
|
|
547
|
+
export async function getCurrentLocale() {
|
|
548
|
+
return getLocale();
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export async function handleContactForm(formData: FormData) {
|
|
552
|
+
const locale = await getCurrentLocale();
|
|
553
|
+
|
|
554
|
+
// ロケールを使用してテンプレートや分析ラベルなどを選択します。
|
|
555
|
+
console.log(`ロケール ${locale} からの問い合わせフォームを受信しました`);
|
|
556
|
+
}
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
> `getLocale` は `next-intl` プロキシによって設定されたロケールを読み取るため、サーバーのどこでも動作します:ルートハンドラー、サーバーアクション、およびエッジ関数。
|
|
560
|
+
|
|
561
|
+
### (オプション)ステップ11:メタデータの国際化
|
|
562
|
+
|
|
563
|
+
コンテンツの翻訳は重要ですが、国際化の主な目的はあなたのウェブサイトを世界により見えるようにすることです。I18nは適切なSEOを通じてウェブサイトの可視性を向上させるための強力な手段です。
|
|
564
|
+
|
|
565
|
+
適切に国際化されたメタデータは、検索エンジンがあなたのページで利用可能な言語を理解するのに役立ちます。これには、hreflangメタタグの設定、タイトルや説明の翻訳、そして各ロケールに対して正しいカノニカルURLが設定されていることの確認が含まれます。
|
|
566
|
+
|
|
567
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
568
|
+
import type { Metadata } from "next";
|
|
569
|
+
import { locales, defaultLocale, localizedPath } from "@/i18n";
|
|
570
|
+
import { getTranslations } from "next-intl/server";
|
|
571
|
+
|
|
572
|
+
// generateMetadataは各ロケールごとに実行され、SEOに適したメタデータを生成します
|
|
573
|
+
tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
574
|
+
// これは検索エンジンが代替言語バージョンを理解するのに役立ちます
|
|
575
|
+
export async function generateMetadata({
|
|
576
|
+
params,
|
|
577
|
+
}: {
|
|
578
|
+
params: { locale: string };
|
|
579
|
+
}): Promise<Metadata> {
|
|
580
|
+
const { locale } = params;
|
|
581
|
+
const t = await getTranslations({ locale, namespace: "about" });
|
|
582
|
+
|
|
583
|
+
const url = "/about";
|
|
584
|
+
const languages = Object.fromEntries(
|
|
585
|
+
locales.map((locale) => [locale, localizedPath(locale, url)])
|
|
586
|
+
);
|
|
587
|
+
|
|
588
|
+
return {
|
|
589
|
+
title: t("title"),
|
|
590
|
+
description: t("description"),
|
|
591
|
+
alternates: {
|
|
592
|
+
canonical: localizedPath(locale, url),
|
|
593
|
+
languages: { ...languages, "x-default": url },
|
|
594
|
+
},
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
// ... ページの残りのコード
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### (オプション)ステップ12:サイトマップの国際化
|
|
602
|
+
|
|
603
|
+
すべてのロケールバージョンのページを含むサイトマップを生成します。これにより、検索エンジンがすべての言語バージョンのコンテンツを検出し、インデックス化するのに役立ちます。
|
|
604
|
+
|
|
605
|
+
適切に国際化されたサイトマップは、検索エンジンがすべての言語バージョンのページを見つけてインデックス化できるようにします。これにより、国際的な検索結果での可視性が向上します。
|
|
606
|
+
|
|
607
|
+
```tsx fileName="src/app/sitemap.ts"
|
|
608
|
+
import type { MetadataRoute } from "next";
|
|
609
|
+
import { defaultLocale, locales } from "@/i18n";
|
|
610
|
+
|
|
611
|
+
const origin = "https://example.com";
|
|
612
|
+
|
|
613
|
+
const formatterLocalizedPath = (locale: string, path: string) =>
|
|
614
|
+
locale === defaultLocale ? `${origin}${path}` : `${origin}/${locale}${path}`;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* すべてのロケールとそのローカライズされたパスのマップを取得する
|
|
618
|
+
*
|
|
619
|
+
* 出力例:
|
|
620
|
+
* {
|
|
621
|
+
* "en": "https://example.com",
|
|
622
|
+
* "fr": "https://example.com/fr",
|
|
623
|
+
* "es": "https://example.com/es",
|
|
624
|
+
* "x-default": "https://example.com"
|
|
625
|
+
* }
|
|
626
|
+
*/
|
|
627
|
+
const getLocalizedMap = (path: string) =>
|
|
628
|
+
Object.fromEntries([
|
|
629
|
+
...locales.map((locale) => [locale, formatterLocalizedPath(locale, path)]),
|
|
630
|
+
["x-default", formatterLocalizedPath(defaultLocale, path)],
|
|
631
|
+
]);
|
|
632
|
+
|
|
633
|
+
// すべてのロケールバリアントを含むサイトマップを生成し、SEOを向上させる
|
|
634
|
+
// alternatesフィールドは検索エンジンに言語バージョンを伝える
|
|
635
|
+
export default function sitemap(): MetadataRoute.Sitemap {
|
|
636
|
+
return [
|
|
637
|
+
{
|
|
638
|
+
url: formatterLocalizedPath(defaultLocale, "/"),
|
|
639
|
+
lastModified: new Date(),
|
|
640
|
+
changeFrequency: "monthly",
|
|
641
|
+
priority: 1.0,
|
|
642
|
+
alternates: { languages: getLocalizedMap("/") },
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
url: formatterLocalizedPath(defaultLocale, "/about"),
|
|
646
|
+
lastModified: new Date(),
|
|
647
|
+
changeFrequency: "monthly",
|
|
648
|
+
priority: 0.7,
|
|
649
|
+
alternates: { languages: getLocalizedMap("/about") },
|
|
650
|
+
},
|
|
651
|
+
];
|
|
652
|
+
}
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
### (オプション)ステップ13: robots.txtの多言語対応
|
|
656
|
+
|
|
657
|
+
保護されたルートのすべてのロケールバージョンを適切に処理するrobots.txtファイルを作成します。これにより、検索エンジンが管理者ページやダッシュボードページをどの言語でもインデックスしないようにできます。
|
|
658
|
+
|
|
659
|
+
すべてのロケールに対してrobots.txtを適切に設定することで、ルートがロケールごとに異なる場合でも、検索エンジンが機密ページをインデックスするのを防ぎます。
|
|
660
|
+
|
|
661
|
+
```tsx fileName="src/app/robots.ts"
|
|
662
|
+
import type { MetadataRoute } from "next";
|
|
663
|
+
import { locales, defaultLocale } from "@/i18n";
|
|
664
|
+
|
|
665
|
+
const origin = "https://example.com";
|
|
666
|
+
// すべてのロケールのパスを生成(例: /admin, /fr/admin, /es/admin)
|
|
667
|
+
const withAllLocales = (path: string) => [
|
|
668
|
+
path,
|
|
669
|
+
...locales
|
|
670
|
+
.filter((locale) => locale !== defaultLocale)
|
|
671
|
+
.map((locale) => "/" + locale + path),
|
|
672
|
+
];
|
|
673
|
+
|
|
674
|
+
export default function robots(): MetadataRoute.Robots {
|
|
675
|
+
const disallow = [
|
|
676
|
+
...withAllLocales("/dashboard"),
|
|
677
|
+
...withAllLocales("/admin"),
|
|
678
|
+
];
|
|
679
|
+
|
|
680
|
+
return {
|
|
681
|
+
rules: { userAgent: "*", allow: ["/"], disallow },
|
|
682
|
+
host: origin,
|
|
683
|
+
sitemap: origin + "/sitemap.xml",
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
### (オプション)ステップ14:ロケールルーティングのためのプロキシ設定
|
|
689
|
+
|
|
690
|
+
ユーザーの優先ロケールを自動的に検出し、適切なロケールプレフィックス付きURLへリダイレクトするプロキシを作成します。next-intlはこれを自動で処理する便利なプロキシ関数を提供しています。
|
|
691
|
+
|
|
692
|
+
プロキシは、ユーザーがサイトを訪れた際に自動的に好みの言語にリダイレクトされることを保証します。また、ユーザーの言語設定を保存し、次回以降の訪問時にユーザーエクスペリエンスを向上させます。
|
|
693
|
+
|
|
694
|
+
```ts fileName="src/proxy.ts"
|
|
695
|
+
import { proxy } from "@/i18n";
|
|
696
|
+
|
|
697
|
+
// ミドルウェアはルートの前に実行され、ロケール検出とルーティングを処理します
|
|
698
|
+
// localeDetection: true は Accept-Language ヘッダーを使用してロケールを自動検出します
|
|
699
|
+
export default proxy;
|
|
700
|
+
|
|
701
|
+
export const config = {
|
|
702
|
+
// API、Nextの内部処理、静的アセットをスキップ
|
|
703
|
+
// 正規表現: api、_nextで始まるもの、またはドットを含むファイルを除くすべてのルートにマッチ
|
|
704
|
+
matcher: ["/((?!api|_next|.*\\..*).*)"],
|
|
705
|
+
};
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
### (オプション) ステップ15: ロケール用のTypeScript型を設定する
|
|
709
|
+
|
|
710
|
+
TypeScriptを設定すると、キーのオートコンプリートと型安全性が得られます。
|
|
711
|
+
|
|
712
|
+
そのために、プロジェクトのルートに global.ts ファイルを作成し、以下のコードを追加できます。
|
|
713
|
+
|
|
714
|
+
```ts fileName="global.ts"
|
|
715
|
+
import type { locales } from "@/i18n";
|
|
716
|
+
|
|
717
|
+
type Messages = {
|
|
718
|
+
common: typeof import("./locales/en/common.json");
|
|
719
|
+
home: typeof import("./locales/en/home.json");
|
|
720
|
+
about: typeof import("./locales/en/about.json");
|
|
721
|
+
// ... 将来的に追加されるJSONファイルもここに追加してください
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
declare module "next-intl" {
|
|
725
|
+
interface AppConfig {
|
|
726
|
+
Locale: (typeof locales)[number];
|
|
727
|
+
Messages: Messages;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
このコードはモジュール拡張(Module Augmentation)を使用して、locales と messages を next-intl の AppConfig 型に追加します。
|
|
733
|
+
|
|
734
|
+
### (オプション)ステップ15: Intlayerを使って翻訳を自動化する
|
|
735
|
+
|
|
736
|
+
Intlayerは、アプリケーションのローカリゼーションプロセスを支援するために設計された**無料**かつ**オープンソース**のライブラリです。next-intlが翻訳の読み込みと管理を担当する一方で、Intlayerは翻訳ワークフローの自動化を支援します。
|
|
737
|
+
|
|
738
|
+
翻訳を手動で管理することは時間がかかり、エラーが発生しやすい作業です。Intlayerは翻訳のテスト、生成、管理を自動化し、時間を節約するとともに、アプリケーション全体での一貫性を確保します。
|
|
739
|
+
|
|
740
|
+
Intlayerは以下のことを可能にします:
|
|
741
|
+
|
|
742
|
+
- **コードベース内の好きな場所でコンテンツを宣言する**
|
|
743
|
+
Intlayerは`.content.{ts|js|json}`ファイルを使用して、コードベース内の好きな場所でコンテンツを宣言することを可能にします。これにより、コンテンツの整理が向上し、コードベースの可読性と保守性が高まります。
|
|
744
|
+
|
|
745
|
+
- **不足している翻訳のテスト**
|
|
746
|
+
Intlayerは、CI/CDパイプラインやユニットテストに統合できるテスト機能を提供します。詳細は[翻訳のテスト](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/testing.md)をご覧ください。
|
|
747
|
+
|
|
748
|
+
- **翻訳の自動化**
|
|
749
|
+
Intlayerは、翻訳を自動化するためのCLIとVSCode拡張機能を提供します。これらはCI/CDパイプラインに統合可能です。詳細は[翻訳の自動化](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_cli.md)をご覧ください。
|
|
750
|
+
ご自身の**APIキーとお好みのAIプロバイダー**を使用できます。また、コンテキストに応じた翻訳も提供します。詳細は[コンテンツの自動補完](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/autoFill.md)をご覧ください。
|
|
751
|
+
|
|
752
|
+
- **外部コンテンツの接続**
|
|
753
|
+
Intlayerは、外部のコンテンツ管理システム(CMS)にコンテンツを接続することを可能にします。最適化された方法でコンテンツを取得し、JSONリソースに挿入します。詳細は[外部コンテンツの取得について](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/dictionary/function_fetching.md)をご覧ください。
|
|
754
|
+
|
|
755
|
+
- **ビジュアルエディター**
|
|
756
|
+
Intlayerは、ビジュアルエディターを使用してコンテンツを編集できる無料のビジュアルエディターを提供しています。詳細は[翻訳のビジュアル編集について](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_visual_editor.md)をご覧ください。
|
|
757
|
+
|
|
758
|
+
その他にも多数の機能があります。Intlayerが提供するすべての機能を知るには、[Intlayerの利点に関するドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/interest_of_intlayer.md)をご参照ください。
|