@intlayer/docs 7.0.7 → 7.0.8-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/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** एक लोकप्रिय अंतरराष्ट्रीयकरण (i18n) लाइब्रेरी है जो विशेष रूप से Next.js App Router के लिए डिज़ाइन की गई है। यह उत्कृष्ट TypeScript समर्थन और अंतर्निर्मित अनुकूलन के साथ बहुभाषी Next.js एप्लिकेशन बनाने का एक सहज तरीका प्रदान करती है।
|
|
25
|
+
|
|
26
|
+
> यदि आप चाहें, तो आप [next-i18next गाइड](https://github.com/aymericzip/intlayer/blob/main/docs/blog/hi/i18n_using_next-i18next.md) को भी संदर्भित कर सकते हैं, या सीधे [Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_with_next-intl.md) का उपयोग कर सकते हैं।
|
|
27
|
+
|
|
28
|
+
> तुलना देखें [next-i18next vs next-intl vs Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/hi/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
|
+
- **संदेशों को namespace द्वारा विभाजित करें**
|
|
37
|
+
JSON फ़ाइलों को locale और namespace (जैसे, `common.json`, `about.json`) के अनुसार व्यवस्थित करें ताकि आप केवल आवश्यक चीज़ें लोड करें।
|
|
38
|
+
- **क्लाइंट पेलोड को न्यूनतम करें**
|
|
39
|
+
पृष्ठों पर, केवल आवश्यक namespaces को `NextIntlClientProvider` को भेजें (जैसे, `pick(messages, ['common', 'about'])`)।
|
|
40
|
+
- **स्थैतिक पृष्ठों को प्राथमिकता दें**
|
|
41
|
+
बेहतर प्रदर्शन और SEO के लिए जहां संभव हो स्थैतिक पृष्ठों का उपयोग करें।
|
|
42
|
+
- **सर्वर कंपोनेंट्स में I18n**
|
|
43
|
+
- **सर्वर कंपोनेंट्स**
|
|
44
|
+
पेज़ या सभी कंपोनेंट्स जो `client` के रूप में चिह्नित नहीं हैं, वे स्थैतिक होते हैं और बिल्ड समय पर प्री-रेंडर किए जा सकते हैं। इसलिए हमें अनुवाद फ़ंक्शंस को प्रॉप्स के रूप में उन्हें पास करना होगा।
|
|
45
|
+
- **TypeScript प्रकार सेट करें**
|
|
46
|
+
अपने locales के लिए ताकि आपके पूरे एप्लिकेशन में टाइप सुरक्षा सुनिश्चित हो सके।
|
|
47
|
+
- **रिडायरेक्शन के लिए प्रॉक्सी**
|
|
48
|
+
locale डिटेक्शन और रूटिंग को संभालने के लिए प्रॉक्सी का उपयोग करें और उपयोगकर्ता को उपयुक्त locale-प्रिफिक्स्ड URL पर रीडायरेक्ट करें।
|
|
49
|
+
- **अपने मेटाडेटा, साइटमैप, robots.txt का अंतरराष्ट्रीयकरण**
|
|
50
|
+
Next.js द्वारा प्रदान किए गए `generateMetadata` फ़ंक्शन का उपयोग करके अपने मेटाडेटा, साइटमैप, robots.txt का अंतरराष्ट्रीयकरण करें ताकि सभी locales में खोज इंजन द्वारा बेहतर खोज सुनिश्चित हो सके।
|
|
51
|
+
- **लिंक को स्थानीयकृत करें**
|
|
52
|
+
- `Link` कंपोनेंट का उपयोग करके लिंक को लोकलाइज़ करें ताकि उपयोगकर्ता को उपयुक्त locale-प्रिफिक्स्ड URL पर रीडायरेक्ट किया जा सके। यह सुनिश्चित करना महत्वपूर्ण है कि आपकी पेज सभी locales में खोजे जा सकें।
|
|
53
|
+
- **टेस्ट और अनुवाद को स्वचालित करें**
|
|
54
|
+
टेस्ट और अनुवाद को स्वचालित करने से आपके बहुभाषी एप्लिकेशन के रखरखाव में समय की बचत होती है।
|
|
55
|
+
|
|
56
|
+
> हमारे डॉक्यूमेंट में देखें जो अंतरराष्ट्रीयकरण और SEO के बारे में आपको सब कुछ जानना आवश्यक है: [next-intl के साथ अंतरराष्ट्रीयकरण (i18n)](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/internationalization_and_SEO.md)।
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Next.js एप्लिकेशन में next-intl सेटअप करने के लिए चरण-दर-चरण मार्गदर्शिका
|
|
61
|
+
|
|
62
|
+
<iframe
|
|
63
|
+
src="https://stackblitz.com/github/aymericzip/next-intl-template?embed=1&ctl=1&file=src/i18n.ts"
|
|
64
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
65
|
+
title="डेमो CodeSandbox - Intlayer का उपयोग करके अपने एप्लिकेशन को अंतरराष्ट्रीयकृत कैसे करें"
|
|
66
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
67
|
+
loading="lazy"
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
> GitHub पर [एप्लिकेशन टेम्पलेट](https://github.com/aymericzip/next-intl-template) देखें।
|
|
71
|
+
|
|
72
|
+
यहाँ वह प्रोजेक्ट संरचना है जिसे हम बनाएंगे:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
.
|
|
76
|
+
├── global.ts
|
|
77
|
+
├── locales
|
|
78
|
+
│ ├── en
|
|
79
|
+
│ │ ├── common.json
|
|
80
|
+
│ │ └── about.json
|
|
81
|
+
│ ├── fr
|
|
82
|
+
│ │ ├── common.json
|
|
83
|
+
│ │ └── about.json
|
|
84
|
+
│ └── es
|
|
85
|
+
│ ├── common.json
|
|
86
|
+
│ └── about.json
|
|
87
|
+
└── src # Src वैकल्पिक है
|
|
88
|
+
├── proxy.ts
|
|
89
|
+
├── app
|
|
90
|
+
│ ├── i18n.ts
|
|
91
|
+
│ └── [locale]
|
|
92
|
+
│ ├── layout.tsx
|
|
93
|
+
│ ├── (home) # / (होम संसाधनों के साथ सभी पृष्ठों को प्रदूषित न करने के लिए रूट समूह)
|
|
94
|
+
│ │ ├── layout.tsx
|
|
95
|
+
│ │ └── page.tsx
|
|
96
|
+
│ └── about # /about
|
|
97
|
+
│ ├── layout.tsx
|
|
98
|
+
│ └── page.tsx
|
|
99
|
+
└── components
|
|
100
|
+
├── ClientComponent.tsx
|
|
101
|
+
└── ServerComponent.tsx
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### चरण 1: निर्भरताएँ स्थापित करें
|
|
105
|
+
|
|
106
|
+
npm का उपयोग करके आवश्यक पैकेज स्थापित करें:
|
|
107
|
+
|
|
108
|
+
```bash packageManager="npm"
|
|
109
|
+
npm install next-intl
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```bash packageManager="pnpm"
|
|
113
|
+
pnpm add next-intl
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```bash packageManager="yarn"
|
|
117
|
+
yarn add next-intl
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
- **next-intl**: Next.js App Router के लिए मुख्य अंतरराष्ट्रीयकरण लाइब्रेरी जो अनुवादों के प्रबंधन के लिए hooks, सर्वर फ़ंक्शन, और क्लाइंट प्रदाता प्रदान करती है।
|
|
121
|
+
|
|
122
|
+
### चरण 2: अपने प्रोजेक्ट को कॉन्फ़िगर करें
|
|
123
|
+
|
|
124
|
+
अपने समर्थित लोकल्स को परिभाषित करने और next-intl के अनुरोध कॉन्फ़िगरेशन को सेट अप करने के लिए एक कॉन्फ़िगरेशन फ़ाइल बनाएं। यह फ़ाइल आपके i18n सेटअप के लिए सत्य का एकमात्र स्रोत के रूप में कार्य करती है और आपके एप्लिकेशन में टाइप सुरक्षा सुनिश्चित करती है।
|
|
125
|
+
|
|
126
|
+
अपने लोकल कॉन्फ़िगरेशन को केंद्रीकृत करने से असंगतियों से बचा जाता है और भविष्य में लोकल्स को जोड़ना या हटाना आसान हो जाता है। `getRequestConfig` फ़ंक्शन हर अनुरोध पर चलता है और केवल प्रत्येक पृष्ठ के लिए आवश्यक अनुवाद लोड करता है, जिससे कोड-स्प्लिटिंग सक्षम होती है और बंडल का आकार कम होता है।
|
|
127
|
+
|
|
128
|
+
```tsx fileName="src/i18n.ts"
|
|
129
|
+
import { notFound } from "next/navigation";
|
|
130
|
+
import createMiddleware from "next-intl/middleware";
|
|
131
|
+
import { createNavigation } from "next-intl/navigation";
|
|
132
|
+
|
|
133
|
+
// टाइप सुरक्षा के साथ समर्थित लोकल्स को परिभाषित करें
|
|
134
|
+
export const locales = ["en", "fr", "es"] as const;
|
|
135
|
+
export type Locale = (typeof locales)[number];
|
|
136
|
+
export const defaultLocale: Locale = "en";
|
|
137
|
+
|
|
138
|
+
export function isRTL(locale: Locale | (string & {})) {
|
|
139
|
+
return /^(ar|fa|he|iw|ur|ps|sd|ug|yi|ckb|ku)(-|$)/i.test(locale);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// कोड-स्प्लिटिंग सक्षम करने के लिए प्रत्येक लोकल के अनुसार संदेशों को डायनामिक रूप से लोड करें
|
|
143
|
+
// बेहतर प्रदर्शन के लिए Promise.all समानांतर में नेमस्पेस लोड करता है
|
|
144
|
+
async function loadMessages(locale: Locale) {
|
|
145
|
+
// केवल वे नेमस्पेस लोड करें जिनकी आपकी लेआउट/पेजेस को आवश्यकता है
|
|
146
|
+
const [common, home, about] = await Promise.all([
|
|
147
|
+
import(`../locales/${locale}/common.json`).then((m) => m.default),
|
|
148
|
+
import(`../locales/${locale}/home.json`).then((m) => m.default),
|
|
149
|
+
import(`../locales/${locale}/about.json`).then((m) => m.default),
|
|
150
|
+
// ... भविष्य के JSON फाइलें यहाँ जोड़ी जानी चाहिए
|
|
151
|
+
]);
|
|
152
|
+
|
|
153
|
+
return { common, home, about } as const;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// स्थानीयकृत URLs उत्पन्न करने में सहायक (जैसे, /about बनाम /fr/about)
|
|
157
|
+
export function localizedPath(locale: string, path: string) {
|
|
158
|
+
return locale === defaultLocale ? path : `/${locale}${path}`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// getRequestConfig प्रत्येक अनुरोध पर चलता है और सर्वर कंपोनेंट्स को संदेश प्रदान करता है
|
|
162
|
+
// यहीं next-intl Next.js के सर्वर-साइड रेंडरिंग में हुक करता है
|
|
163
|
+
export default async function getRequestConfig({
|
|
164
|
+
requestLocale,
|
|
165
|
+
}: {
|
|
166
|
+
requestLocale: Promise<string | undefined>;
|
|
167
|
+
}) {
|
|
168
|
+
const requested: Locale = ((await requestLocale) as Locale) ?? defaultLocale;
|
|
169
|
+
|
|
170
|
+
if (!locales.includes(requested)) notFound();
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
locale: requested,
|
|
174
|
+
messages: await loadMessages(requested),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function getCookie(locale: Locale) {
|
|
179
|
+
return [
|
|
180
|
+
`NEXT_LOCALE=${locale}`,
|
|
181
|
+
"Path=/",
|
|
182
|
+
`Max-Age=${60 * 60 * 24 * 365}`, // 1 वर्ष
|
|
183
|
+
"SameSite=Lax",
|
|
184
|
+
].join("; ");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const routingOptions = {
|
|
188
|
+
locales,
|
|
189
|
+
defaultLocale,
|
|
190
|
+
localePrefix: "as-needed", // /en/... रूट को /... में बदलें
|
|
191
|
+
// वैकल्पिक: स्थानीयकृत पाथनेम्स
|
|
192
|
+
// pathnames: {
|
|
193
|
+
// '/': '/',
|
|
194
|
+
// '/about': {en: '/about', fr: '/a-propos', es: '/acerca-de'},
|
|
195
|
+
// '/blog/[slug]': '/blog/[slug]'
|
|
196
|
+
// }
|
|
197
|
+
// localeDetection: true, // कुकी से "/" -> "/en" रीडायरेक्ट को रोकें
|
|
198
|
+
} as const;
|
|
199
|
+
|
|
200
|
+
export const { Link, redirect, usePathname, useRouter, getPathname } =
|
|
201
|
+
createNavigation(routingOptions);
|
|
202
|
+
|
|
203
|
+
export const proxy = createMiddleware(routingOptions);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### चरण 3: डायनामिक लोकल रूट्स परिभाषित करें
|
|
207
|
+
|
|
208
|
+
अपने ऐप फ़ोल्डर में `[locale]` डायरेक्टरी बनाकर स्थानीयताओं के लिए डायनेमिक रूटिंग सेट करें। इससे Next.js स्थानीय-आधारित रूटिंग को संभाल सकता है जहाँ प्रत्येक स्थानीयता URL सेगमेंट बन जाती है (जैसे, `/en/about`, `/fr/about`)।
|
|
209
|
+
|
|
210
|
+
डायनेमिक रूट्स का उपयोग करने से Next.js सभी स्थानीयताओं के लिए बिल्ड समय पर स्थैतिक पृष्ठ उत्पन्न कर सकता है, जिससे प्रदर्शन और SEO में सुधार होता है। लेआउट कॉम्पोनेंट HTML के `lang` और `dir` एट्रिब्यूट्स को स्थानीयता के आधार पर सेट करता है, जो पहुंच और सर्च इंजन की समझ के लिए महत्वपूर्ण है।
|
|
211
|
+
|
|
212
|
+
```tsx fileName="src/app/[locale]/layout.tsx"
|
|
213
|
+
import type { ReactNode } from "react";
|
|
214
|
+
import { locales } from "@/i18n";
|
|
215
|
+
import { getLocaleDirection, setRequestLocale } from "next-intl/server";
|
|
216
|
+
|
|
217
|
+
// सभी स्थानीयताओं के लिए बिल्ड समय पर स्थैतिक पृष्ठ पूर्व-उत्पन्न करें (SSG)
|
|
218
|
+
// यह प्रदर्शन और SEO में सुधार करता है
|
|
219
|
+
export function generateStaticParams() {
|
|
220
|
+
return locales.map((locale) => ({ locale }));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export default function LocaleLayout({
|
|
224
|
+
children,
|
|
225
|
+
params,
|
|
226
|
+
}: {
|
|
227
|
+
children: ReactNode;
|
|
228
|
+
params: Promise<{ locale: string }>;
|
|
229
|
+
}) {
|
|
230
|
+
// Next.js App Router में, params एक Promise है (जिसे await किया जा सकता है)
|
|
231
|
+
// यह डायनेमिक रूट सेगमेंट्स को असिंक्रोनस तरीके से हल करने की अनुमति देता है
|
|
232
|
+
const { locale } = await params;
|
|
233
|
+
|
|
234
|
+
// महत्वपूर्ण: setRequestLocale next-intl को बताता है कि इस अनुरोध के लिए कौन सी locale का उपयोग करना है
|
|
235
|
+
// इसके बिना, getTranslations() को पता नहीं चलेगा कि सर्वर कंपोनेंट्स में कौन सी locale का उपयोग करना है
|
|
236
|
+
setRequestLocale(locale);
|
|
237
|
+
|
|
238
|
+
// उचित HTML रेंडरिंग के लिए टेक्स्ट दिशा (LTR/RTL) प्राप्त करें
|
|
239
|
+
const dir = getLocaleDirection(locale);
|
|
240
|
+
|
|
241
|
+
return (
|
|
242
|
+
<html lang={locale} dir={dir}>
|
|
243
|
+
<body>{children}</body>
|
|
244
|
+
</html>
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
250
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
251
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
252
|
+
import pick from "lodash/pick";
|
|
253
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
254
|
+
import ClientComponent from "@/components/ClientComponent";
|
|
255
|
+
|
|
256
|
+
export default async function AboutPage({
|
|
257
|
+
params,
|
|
258
|
+
}: {
|
|
259
|
+
params: Promise<{ locale: string }>;
|
|
260
|
+
}) {
|
|
261
|
+
const { locale } = await params;
|
|
262
|
+
|
|
263
|
+
// संदेश सर्वर-साइड पर लोड किए जाते हैं। केवल आवश्यक चीज़ें क्लाइंट को भेजें।
|
|
264
|
+
// इससे ब्राउज़र को भेजे जाने वाले JavaScript बंडल का आकार कम होता है
|
|
265
|
+
const messages = await getMessages();
|
|
266
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
267
|
+
|
|
268
|
+
// केवल सर्वर-साइड अनुवाद/फॉर्मेटिंग
|
|
269
|
+
// ये सर्वर पर चलते हैं और इन्हें कंपोनेंट्स को props के रूप में पास किया जा सकता है
|
|
270
|
+
const tAbout = await getTranslations("about");
|
|
271
|
+
const tCounter = await getTranslations("about.counter");
|
|
272
|
+
const format = await getFormatter();
|
|
273
|
+
|
|
274
|
+
const initialFormattedCount = format.number(0);
|
|
275
|
+
|
|
276
|
+
return (
|
|
277
|
+
// NextIntlClientProvider क्लाइंट कंपोनेंट्स के लिए अनुवाद उपलब्ध कराता है
|
|
278
|
+
// केवल वे namespaces पास करें जिनका आपके क्लाइंट कंपोनेंट्स वास्तव में उपयोग करते हैं
|
|
279
|
+
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
280
|
+
<main>
|
|
281
|
+
<h1>{tAbout("title")}</h1>
|
|
282
|
+
<ClientComponent />
|
|
283
|
+
<ServerComponent
|
|
284
|
+
formattedCount={initialFormattedCount}
|
|
285
|
+
label={tCounter("label")}
|
|
286
|
+
increment={tCounter("increment")}
|
|
287
|
+
/>
|
|
288
|
+
</main>
|
|
289
|
+
</NextIntlClientProvider>
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### चरण 4: अपने अनुवाद फ़ाइलें बनाएं
|
|
295
|
+
|
|
296
|
+
प्रत्येक locale और namespace के लिए JSON फ़ाइलें बनाएं। यह संरचना आपको अनुवादों को तार्किक रूप से व्यवस्थित करने और प्रत्येक पेज के लिए केवल आवश्यक अनुवाद लोड करने की अनुमति देती है।
|
|
297
|
+
|
|
298
|
+
namespace के अनुसार अनुवादों को व्यवस्थित करना (जैसे, `common.json`, `about.json`) कोड स्प्लिटिंग सक्षम करता है और बंडल आकार को कम करता है। आप केवल उन अनुवादों को लोड करते हैं जो प्रत्येक पेज के लिए आवश्यक हैं, जिससे प्रदर्शन में सुधार होता है।
|
|
299
|
+
|
|
300
|
+
```json fileName="locales/en/common.json"
|
|
301
|
+
{
|
|
302
|
+
"welcome": "Welcome",
|
|
303
|
+
"greeting": "Hello, world!"
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
```json fileName="locales/fr/common.json"
|
|
308
|
+
{
|
|
309
|
+
"welcome": "Bienvenue",
|
|
310
|
+
"greeting": "Bonjour le monde!"
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
```json fileName="locales/en/about.json"
|
|
315
|
+
{
|
|
316
|
+
"title": "About",
|
|
317
|
+
"description": "About page description",
|
|
318
|
+
"counter": {
|
|
319
|
+
"label": "Counter",
|
|
320
|
+
"increment": "Increment"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
```json fileName="locales/fr/about.json"
|
|
326
|
+
{
|
|
327
|
+
"title": "À propos",
|
|
328
|
+
"description": "Description de la page À propos",
|
|
329
|
+
"counter": {
|
|
330
|
+
"label": "Compteur",
|
|
331
|
+
"increment": "Incrémenter"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### चरण 5: अपने पृष्ठों में अनुवादों का उपयोग करें
|
|
337
|
+
|
|
338
|
+
एक पेज कंपोनेंट बनाएं जो सर्वर पर अनुवाद लोड करता है और उन्हें सर्वर और क्लाइंट दोनों कंपोनेंट्स को पास करता है। यह सुनिश्चित करता है कि अनुवाद रेंडरिंग से पहले लोड हो जाएं और कंटेंट फ्लैशिंग को रोका जा सके।
|
|
339
|
+
|
|
340
|
+
सर्वर-साइड अनुवाद लोडिंग SEO में सुधार करती है और FOUC (अनुवादित नहीं हुआ कंटेंट का फ्लैश) को रोकती है। `pick` का उपयोग करके केवल आवश्यक namespaces को क्लाइंट प्रोवाइडर को भेजकर, हम ब्राउज़र को भेजे जाने वाले जावास्क्रिप्ट बंडल को न्यूनतम करते हैं।
|
|
341
|
+
|
|
342
|
+
```tsx fileName="src/app/[locale]/about/page.tsx"
|
|
343
|
+
import { getTranslations, getMessages, getFormatter } from "next-intl/server";
|
|
344
|
+
import { NextIntlClientProvider } from "next-intl";
|
|
345
|
+
import pick from "lodash/pick";
|
|
346
|
+
import ServerComponent from "@/components/ServerComponent";
|
|
347
|
+
import ClientComponent from "@/components/ClientComponent";
|
|
348
|
+
|
|
349
|
+
export default async function AboutPage({
|
|
350
|
+
params,
|
|
351
|
+
}: {
|
|
352
|
+
params: Promise<{ locale: string }>;
|
|
353
|
+
}) {
|
|
354
|
+
const { locale } = await params;
|
|
355
|
+
|
|
356
|
+
// संदेश सर्वर-साइड लोड किए जाते हैं। केवल आवश्यक चीज़ें क्लाइंट को भेजें।
|
|
357
|
+
// इससे ब्राउज़र को भेजे जाने वाले जावास्क्रिप्ट बंडल का आकार कम होता है
|
|
358
|
+
const messages = await getMessages();
|
|
359
|
+
const clientMessages = pick(messages, ["common", "about"]);
|
|
360
|
+
|
|
361
|
+
// सख्ती से सर्वर-साइड अनुवाद/फॉर्मेटिंग
|
|
362
|
+
// ये सर्वर पर चलते हैं और कंपोनेंट्स को props के रूप में पास किए जा सकते हैं
|
|
363
|
+
const tAbout = await getTranslations("about");
|
|
364
|
+
const tCounter = await getTranslations("about.counter");
|
|
365
|
+
const format = await getFormatter();
|
|
366
|
+
|
|
367
|
+
const initialFormattedCount = format.number(0);
|
|
368
|
+
|
|
369
|
+
return (
|
|
370
|
+
// NextIntlClientProvider क्लाइंट कंपोनेंट्स के लिए अनुवाद उपलब्ध कराता है
|
|
371
|
+
// केवल वे namespaces पास करें जिनकी आपके क्लाइंट कंपोनेंट्स को वास्तव में आवश्यकता है
|
|
372
|
+
<NextIntlClientProvider locale={locale} messages={clientMessages}>
|
|
373
|
+
<main>
|
|
374
|
+
<h1>{tAbout("title")}</h1>
|
|
375
|
+
<ClientComponent />
|
|
376
|
+
<ServerComponent
|
|
377
|
+
formattedCount={initialFormattedCount}
|
|
378
|
+
label={tCounter("label")}
|
|
379
|
+
increment={tCounter("increment")}
|
|
380
|
+
/>
|
|
381
|
+
</main>
|
|
382
|
+
</NextIntlClientProvider>
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### चरण 6: क्लाइंट कंपोनेंट्स में अनुवाद का उपयोग करें
|
|
388
|
+
|
|
389
|
+
क्लाइंट कंपोनेंट्स `useTranslations` और `useFormatter` hooks का उपयोग करके अनुवाद और फॉर्मेटिंग फ़ंक्शंस तक पहुँच सकते हैं। ये hooks `NextIntlClientProvider` context से पढ़ते हैं।
|
|
390
|
+
|
|
391
|
+
क्लाइंट कंपोनेंट्स को अनुवादों तक पहुँचने के लिए React hooks की आवश्यकता होती है। `useTranslations` और `useFormatter` hooks next-intl के साथ सहजता से एकीकृत होते हैं और जब locale बदलता है तो प्रतिक्रियाशील अपडेट प्रदान करते हैं।
|
|
392
|
+
|
|
393
|
+
> आवश्यक namespaces को पेज के क्लाइंट संदेशों में जोड़ना न भूलें (केवल वे namespaces शामिल करें जिनकी आपके क्लाइंट कंपोनेंट्स को वास्तव में आवश्यकता है)।
|
|
394
|
+
|
|
395
|
+
```tsx fileName="src/components/ClientComponent.tsx"
|
|
396
|
+
"use client";
|
|
397
|
+
|
|
398
|
+
import React, { useState } from "react";
|
|
399
|
+
import { useTranslations, useFormatter } from "next-intl";
|
|
400
|
+
|
|
401
|
+
const ClientComponent = () => {
|
|
402
|
+
// सीधे nested ऑब्जेक्ट के लिए स्कोप करें
|
|
403
|
+
// useTranslations/useFormatter वे hooks हैं जो NextIntlClientProvider context से पढ़ते हैं
|
|
404
|
+
// ये केवल तभी काम करते हैं जब component को NextIntlClientProvider में लपेटा गया हो
|
|
405
|
+
const t = useTranslations("about.counter");
|
|
406
|
+
const format = useFormatter();
|
|
407
|
+
const [count, setCount] = useState(0);
|
|
408
|
+
|
|
409
|
+
return (
|
|
410
|
+
<div>
|
|
411
|
+
<p>{format.number(count)}</p>
|
|
412
|
+
<button
|
|
413
|
+
aria-label={t("label")}
|
|
414
|
+
onClick={() => setCount((count) => count + 1)}
|
|
415
|
+
>
|
|
416
|
+
{t("increment")}
|
|
417
|
+
</button>
|
|
418
|
+
</div>
|
|
419
|
+
);
|
|
420
|
+
};
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### चरण 7: सर्वर कंपोनेंट्स में अनुवादों का उपयोग करें
|
|
424
|
+
|
|
425
|
+
सर्वर कंपोनेंट्स React hooks का उपयोग नहीं कर सकते, इसलिए वे अपने पैरेंट कंपोनेंट्स से props के माध्यम से अनुवाद और फॉर्मैटर प्राप्त करते हैं। यह तरीका सर्वर कंपोनेंट्स को synchronous रखता है और उन्हें क्लाइंट कंपोनेंट्स के अंदर नेस्ट करने की अनुमति देता है।
|
|
426
|
+
|
|
427
|
+
क्लाइंट बाउंड्रीज़ के अंतर्गत नेस्टेड हो सकने वाले सर्वर कंपोनेंट्स को सिंक्रोनस होना आवश्यक है। अनुवादित स्ट्रिंग्स और फॉर्मेटेड वैल्यूज़ को प्रॉप्स के रूप में पास करके, हम असिंक्रोनस ऑपरेशंस से बचते हैं और सही रेंडरिंग सुनिश्चित करते हैं। पेरेंट पेज कंपोनेंट में अनुवाद और फॉर्मेटिंग को प्री-कंप्यूट करें।
|
|
428
|
+
|
|
429
|
+
```tsx fileName="src/components/ServerComponent.tsx"
|
|
430
|
+
// क्लाइंट कंपोनेंट्स के अंदर नेस्टेड सर्वर कंपोनेंट्स को सिंक्रोनस होना चाहिए
|
|
431
|
+
// React सर्वर/क्लाइंट बाउंड्री के पार असिंक्रोनस फंक्शंस को सीरियलाइज़ नहीं कर सकता
|
|
432
|
+
// समाधान: पेरेंट में अनुवाद/फॉर्मेट्स को प्री-कंप्यूट करें और प्रॉप्स के रूप में पास करें
|
|
433
|
+
type ServerComponentProps = {
|
|
434
|
+
formattedCount: string; // फॉर्मेट किया गया काउंट
|
|
435
|
+
label: string; // लेबल
|
|
436
|
+
increment: string; // इंक्रीमेंट टेक्स्ट
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
const ServerComponent = ({
|
|
440
|
+
formattedCount,
|
|
441
|
+
label,
|
|
442
|
+
increment,
|
|
443
|
+
}: ServerComponentProps) => {
|
|
444
|
+
return (
|
|
445
|
+
<div>
|
|
446
|
+
<p>{formattedCount}</p>
|
|
447
|
+
<button aria-label={label}>{increment}</button>
|
|
448
|
+
</div>
|
|
449
|
+
);
|
|
450
|
+
};
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
> अपने पेज/लेआउट में, `next-intl/server` से `getTranslations` और `getFormatter` का उपयोग करें ताकि अनुवाद और फॉर्मेटिंग को पहले से गणना किया जा सके, फिर उन्हें props के रूप में सर्वर कंपोनेंट्स को पास करें।
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
### (वैकल्पिक) चरण 8: अपनी सामग्री की भाषा बदलें
|
|
458
|
+
|
|
459
|
+
next-intl के साथ अपनी सामग्री की भाषा बदलने के लिए, ऐसे locale-aware लिंक रेंडर करें जो locale बदलते समय उसी pathname की ओर इशारा करें। प्रदाता URLs को स्वचालित रूप से पुनर्लेखित करता है, इसलिए आपको केवल वर्तमान रूट को लक्षित करना होता है।
|
|
460
|
+
|
|
461
|
+
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
462
|
+
"use client";
|
|
463
|
+
|
|
464
|
+
import Link from "next/link";
|
|
465
|
+
import { usePathname } from "next/navigation";
|
|
466
|
+
import { useLocale } from "next-intl";
|
|
467
|
+
import { defaultLocale, getCookie, type Locale, locales } from "@/i18n";
|
|
468
|
+
|
|
469
|
+
const getLocaleLabel = (locale: Locale): string => {
|
|
470
|
+
try {
|
|
471
|
+
const displayNames = new Intl.DisplayNames([locale], { type: "language" });
|
|
472
|
+
return displayNames.of(locale) ?? locale.toUpperCase();
|
|
473
|
+
} catch {
|
|
474
|
+
return locale.toUpperCase();
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
const localeFlags: Record<Locale, string> = {
|
|
479
|
+
en: "🇬🇧",
|
|
480
|
+
fr: "🇫🇷",
|
|
481
|
+
es: "🇪🇸",
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
export default function LocaleSwitcher() {
|
|
485
|
+
const activeLocale = useLocale();
|
|
486
|
+
const pathname = usePathname();
|
|
487
|
+
|
|
488
|
+
// बेस पथ प्राप्त करने के लिए पथनाम से लोकल प्रीफिक्स हटाएं
|
|
489
|
+
const getBasePath = (path: string) => {
|
|
490
|
+
for (const locale of locales) {
|
|
491
|
+
if (path.startsWith(`/${locale}`)) {
|
|
492
|
+
return path.slice(locale.length + 1) || "/";
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return path;
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
const basePath = getBasePath(pathname);
|
|
499
|
+
|
|
500
|
+
return (
|
|
501
|
+
<nav aria-label="भाषा चयनकर्ता">
|
|
502
|
+
<div>
|
|
503
|
+
{(locales as readonly Locale[]).map((locale) => {
|
|
504
|
+
const isActive = locale === activeLocale;
|
|
505
|
+
// href बनाएँ यह देखते हुए कि क्या यह डिफ़ॉल्ट locale है
|
|
506
|
+
const href =
|
|
507
|
+
locale === defaultLocale ? basePath : `/${locale}${basePath}`;
|
|
508
|
+
return (
|
|
509
|
+
<Link
|
|
510
|
+
key={locale}
|
|
511
|
+
href={href}
|
|
512
|
+
aria-current={isActive ? "page" : undefined}
|
|
513
|
+
onClick={() => {
|
|
514
|
+
document.cookie = getCookie(locale);
|
|
515
|
+
}}
|
|
516
|
+
>
|
|
517
|
+
<span>{localeFlags[locale]}</span>
|
|
518
|
+
<span>{getLocaleLabel(locale)}</span>
|
|
519
|
+
<span>{locale.toUpperCase()}</span>
|
|
520
|
+
</Link>
|
|
521
|
+
);
|
|
522
|
+
})}
|
|
523
|
+
</div>
|
|
524
|
+
</nav>
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### (वैकल्पिक) चरण 9: स्थानीयकृत Link कॉम्पोनेंट का उपयोग करें
|
|
530
|
+
|
|
531
|
+
`next-intl` एक उप-पैकेज `next-intl/navigation` प्रदान करता है जिसमें एक स्थानीयकृत लिंक कॉम्पोनेंट होता है जो स्वचालित रूप से सक्रिय locale लागू करता है। हमने इसे आपके लिए `@/i18n` फ़ाइल में पहले ही निकाला है, इसलिए आप इसे इस प्रकार उपयोग कर सकते हैं:
|
|
532
|
+
|
|
533
|
+
```tsx fileName="src/components/MyComponent.tsx"
|
|
534
|
+
import { Link } from "@/i18n";
|
|
535
|
+
|
|
536
|
+
return <Link href="/about">t("about.title")</Link>;
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### (वैकल्पिक) चरण 10: Server Actions के अंदर सक्रिय locale तक पहुँचें
|
|
540
|
+
|
|
541
|
+
Server Actions वर्तमान locale को `next-intl/server` का उपयोग करके पढ़ सकते हैं। यह स्थानीयकृत ईमेल भेजने या सबमिट किए गए डेटा के साथ भाषा प्राथमिकताएँ संग्रहीत करने के लिए उपयोगी है।
|
|
542
|
+
|
|
543
|
+
```ts fileName="src/app/actions/get-current-locale.ts"
|
|
544
|
+
"use server";
|
|
545
|
+
|
|
546
|
+
import { getLocale } from "next-intl/server";
|
|
547
|
+
|
|
548
|
+
export async function getCurrentLocale() {
|
|
549
|
+
return getLocale();
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export async function handleContactForm(formData: FormData) {
|
|
553
|
+
const locale = await getCurrentLocale();
|
|
554
|
+
|
|
555
|
+
// टेम्पलेट्स, एनालिटिक्स लेबल आदि चुनने के लिए locale का उपयोग करें।
|
|
556
|
+
console.log(`locale ${locale} से संपर्क फ़ॉर्म प्राप्त हुआ`);
|
|
557
|
+
}
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
> `getLocale` उस locale को पढ़ता है जो `next-intl` प्रॉक्सी द्वारा सेट किया गया है, इसलिए यह सर्वर पर कहीं भी काम करता है: Route Handlers, Server Actions, और edge functions।
|
|
561
|
+
|
|
562
|
+
### (वैकल्पिक) चरण 11: अपने मेटाडेटा का अंतरराष्ट्रीयकरण करें
|
|
563
|
+
|
|
564
|
+
सामग्री का अनुवाद करना महत्वपूर्ण है, लेकिन अंतरराष्ट्रीयकरण का मुख्य उद्देश्य आपकी वेबसाइट को दुनिया के लिए अधिक दृश्य बनाना है। I18n आपकी वेबसाइट की दृश्यता को उचित SEO के माध्यम से सुधारने के लिए एक अद्भुत उपकरण है।
|
|
565
|
+
|
|
566
|
+
सही ढंग से अंतरराष्ट्रीयकृत मेटाडेटा खोज इंजनों को यह समझने में मदद करता है कि आपकी पृष्ठों पर कौन-कौन सी भाषाएँ उपलब्ध हैं। इसमें hreflang मेटा टैग सेट करना, शीर्षक और विवरणों का अनुवाद करना, और प्रत्येक लोकल के लिए कैनोनिकल URL को सही ढंग से सेट करना शामिल है।
|
|
567
|
+
|
|
568
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
569
|
+
import type { Metadata } from "next";
|
|
570
|
+
import { locales, defaultLocale, localizedPath } from "@/i18n";
|
|
571
|
+
import { getTranslations } from "next-intl/server";
|
|
572
|
+
|
|
573
|
+
// generateMetadata प्रत्येक लोकल के लिए चलता है, SEO-अनुकूल मेटाडेटा उत्पन्न करता है
|
|
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 के लिए सभी locale संस्करणों के साथ sitemap जनरेट करें
|
|
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
|
+
एक प्रॉक्सी बनाएं जो स्वचालित रूप से उपयोगकर्ता की पसंदीदा भाषा (locale) का पता लगाए और उन्हें उपयुक्त लोकल-प्रिफिक्स्ड 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
|
+
// Regex: सभी रूट्स से मेल खाता है सिवाय उन रूट्स के जो 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 पाइपलाइन में या आपके यूनिट टेस्ट में एकीकृत किए जा सकने वाले टेस्ट फंक्शन प्रदान करता है। अपने अनुवादों का परीक्षण करने के बारे में अधिक जानने के लिए [testing your translations](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/testing.md) देखें।
|
|
747
|
+
|
|
748
|
+
- **अपने अनुवादों को स्वचालित करें**,
|
|
749
|
+
Intlayer आपके अनुवादों को स्वचालित करने के लिए एक CLI और VSCode एक्सटेंशन प्रदान करता है। इसे आपके CI/CD पाइपलाइन में एकीकृत किया जा सकता है। अपने अनुवादों को स्वचालित करने के बारे में अधिक जानने के लिए [automating your translations](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_cli.md) देखें।
|
|
750
|
+
आप अपनी **अपनी API कुंजी और अपनी पसंद के AI प्रदाता** का उपयोग कर सकते हैं। यह संदर्भ-सचेत अनुवाद भी प्रदान करता है, देखें [fill content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/autoFill.md)।
|
|
751
|
+
|
|
752
|
+
- **बाहरी सामग्री से कनेक्ट करें**
|
|
753
|
+
Intlayer आपको अपने कंटेंट को एक बाहरी कंटेंट मैनेजमेंट सिस्टम (CMS) से कनेक्ट करने की अनुमति देता है। इसे एक अनुकूलित तरीके से प्राप्त करने और अपने JSON संसाधनों में सम्मिलित करने के लिए। अधिक जानने के लिए [बाहरी कंटेंट प्राप्त करना](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/function_fetching.md) देखें।
|
|
754
|
+
|
|
755
|
+
- **विज़ुअल एडिटर**
|
|
756
|
+
Intlayer एक मुफ्त विज़ुअल एडिटर प्रदान करता है जिससे आप अपने कंटेंट को विज़ुअल एडिटर का उपयोग करके संपादित कर सकते हैं। अधिक जानने के लिए [अपने अनुवादों का विज़ुअल संपादन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_visual_editor.md) देखें।
|
|
757
|
+
|
|
758
|
+
और भी बहुत कुछ। Intlayer द्वारा प्रदान की गई सभी विशेषताओं को खोजने के लिए, कृपया [Intlayer के महत्व की दस्तावेज़ीकरण](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/interest_of_intlayer.md) देखें।
|