@intlayer/docs 5.8.1 → 6.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/rag_powered_documentation_assistant.md +282 -0
- package/blog/de/rag_powered_documentation_assistant.md +282 -0
- package/blog/en/rag_powered_documentation_assistant.md +289 -0
- package/blog/en-GB/rag_powered_documentation_assistant.md +284 -0
- package/blog/es/rag_powered_documentation_assistant.md +308 -0
- package/blog/fr/rag_powered_documentation_assistant.md +308 -0
- package/blog/hi/rag_powered_documentation_assistant.md +284 -0
- package/blog/it/rag_powered_documentation_assistant.md +284 -0
- package/blog/ja/rag_powered_documentation_assistant.md +284 -0
- package/blog/ko/rag_powered_documentation_assistant.md +283 -0
- package/blog/pt/rag_powered_documentation_assistant.md +284 -0
- package/blog/ru/rag_powered_documentation_assistant.md +284 -0
- package/blog/tr/index.md +69 -0
- package/blog/tr/internationalization_and_SEO.md +273 -0
- package/blog/tr/intlayer_with_i18next.md +162 -0
- package/blog/tr/intlayer_with_next-i18next.md +367 -0
- package/blog/tr/intlayer_with_next-intl.md +392 -0
- package/blog/tr/intlayer_with_react-i18next.md +346 -0
- package/blog/tr/intlayer_with_react-intl.md +345 -0
- package/blog/tr/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/tr/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/tr/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/tr/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/tr/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/tr/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/tr/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/tr/list_i18n_technologies/frameworks/svelte.md +129 -0
- package/blog/tr/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +170 -0
- package/blog/tr/rag_powered_documentation_assistant.md +284 -0
- package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +162 -0
- package/blog/tr/vue-i18n_vs_intlayer.md +276 -0
- package/blog/tr/what_is_internationalization.md +166 -0
- package/blog/zh/rag_powered_documentation_assistant.md +284 -0
- package/dist/cjs/generated/blog.entry.cjs +212 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +660 -132
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +84 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +6 -0
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +212 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +660 -132
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +84 -0
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +6 -0
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +5 -2
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/docs/ar/autoFill.md +41 -40
- package/docs/ar/configuration.md +202 -199
- package/docs/ar/dictionary/content_file.md +1059 -0
- package/docs/ar/intlayer_CMS.md +4 -4
- package/docs/ar/intlayer_with_nestjs.md +271 -0
- package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7.md +533 -0
- package/docs/ar/intlayer_with_tanstack.md +465 -299
- package/docs/ar/intlayer_with_vite+preact.md +7 -7
- package/docs/ar/intlayer_with_vite+react.md +7 -7
- package/docs/ar/intlayer_with_vite+vue.md +9 -9
- package/docs/ar/packages/vite-intlayer/index.md +3 -3
- package/docs/ar/readme.md +261 -0
- package/docs/ar/testing.md +199 -0
- package/docs/de/autoFill.md +42 -19
- package/docs/de/configuration.md +155 -147
- package/docs/de/dictionary/content_file.md +1059 -0
- package/docs/de/intlayer_CMS.md +4 -5
- package/docs/de/intlayer_with_nestjs.md +270 -0
- package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/de/intlayer_with_react_router_v7.md +537 -0
- package/docs/de/intlayer_with_tanstack.md +469 -302
- package/docs/de/intlayer_with_vite+preact.md +7 -7
- package/docs/de/intlayer_with_vite+react.md +7 -7
- package/docs/de/intlayer_with_vite+vue.md +9 -9
- package/docs/de/packages/vite-intlayer/index.md +3 -3
- package/docs/de/readme.md +261 -0
- package/docs/de/testing.md +200 -0
- package/docs/en/CI_CD.md +4 -6
- package/docs/en/autoFill.md +25 -5
- package/docs/en/configuration.md +45 -54
- package/docs/en/dictionary/content_file.md +1054 -0
- package/docs/en/intlayer_CMS.md +8 -7
- package/docs/en/intlayer_cli.md +112 -5
- package/docs/en/intlayer_with_nestjs.md +268 -0
- package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +531 -0
- package/docs/en/intlayer_with_tanstack.md +463 -294
- package/docs/en/intlayer_with_vite+preact.md +8 -8
- package/docs/en/intlayer_with_vite+react.md +8 -8
- package/docs/en/intlayer_with_vite+vue.md +8 -8
- package/docs/en/packages/intlayer/getLocalizedUrl.md +102 -25
- package/docs/en/packages/vite-intlayer/index.md +3 -3
- package/docs/en/readme.md +261 -0
- package/docs/en/testing.md +200 -0
- package/docs/en-GB/autoFill.md +29 -6
- package/docs/en-GB/configuration.md +79 -71
- package/docs/en-GB/dictionary/content_file.md +1084 -0
- package/docs/en-GB/intlayer_CMS.md +4 -5
- package/docs/en-GB/intlayer_with_nestjs.md +268 -0
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7.md +533 -0
- package/docs/en-GB/intlayer_with_tanstack.md +466 -299
- package/docs/en-GB/intlayer_with_vite+preact.md +7 -7
- package/docs/en-GB/intlayer_with_vite+react.md +7 -7
- package/docs/en-GB/intlayer_with_vite+vue.md +9 -9
- package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
- package/docs/en-GB/readme.md +261 -0
- package/docs/en-GB/testing.md +200 -0
- package/docs/es/autoFill.md +45 -23
- package/docs/es/configuration.md +171 -167
- package/docs/es/dictionary/content_file.md +1088 -0
- package/docs/es/intlayer_CMS.md +4 -5
- package/docs/es/intlayer_with_nestjs.md +268 -0
- package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +533 -0
- package/docs/es/intlayer_with_tanstack.md +469 -280
- package/docs/es/intlayer_with_vite+preact.md +7 -7
- package/docs/es/intlayer_with_vite+react.md +7 -7
- package/docs/es/intlayer_with_vite+vue.md +9 -9
- package/docs/es/packages/vite-intlayer/index.md +3 -3
- package/docs/es/readme.md +261 -0
- package/docs/es/testing.md +200 -0
- package/docs/fr/autoFill.md +47 -24
- package/docs/fr/configuration.md +213 -198
- package/docs/fr/dictionary/content_file.md +1054 -0
- package/docs/fr/intlayer_CMS.md +4 -5
- package/docs/fr/intlayer_with_nestjs.md +268 -0
- package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7.md +549 -0
- package/docs/fr/intlayer_with_tanstack.md +465 -279
- package/docs/fr/intlayer_with_vite+preact.md +7 -7
- package/docs/fr/intlayer_with_vite+react.md +7 -7
- package/docs/fr/intlayer_with_vite+vue.md +9 -9
- package/docs/fr/packages/vite-intlayer/index.md +3 -3
- package/docs/fr/readme.md +261 -0
- package/docs/fr/testing.md +200 -0
- package/docs/hi/autoFill.md +47 -25
- package/docs/hi/configuration.md +194 -189
- package/docs/hi/dictionary/content_file.md +1056 -0
- package/docs/hi/intlayer_CMS.md +4 -5
- package/docs/hi/intlayer_with_nestjs.md +269 -0
- package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7.md +533 -0
- package/docs/hi/intlayer_with_tanstack.md +467 -282
- package/docs/hi/intlayer_with_vite+preact.md +7 -7
- package/docs/hi/intlayer_with_vite+react.md +7 -7
- package/docs/hi/intlayer_with_vite+vue.md +9 -9
- package/docs/hi/packages/vite-intlayer/index.md +3 -3
- package/docs/hi/readme.md +261 -0
- package/docs/hi/testing.md +200 -0
- package/docs/it/autoFill.md +46 -24
- package/docs/it/configuration.md +169 -161
- package/docs/it/dictionary/content_file.md +1061 -0
- package/docs/it/intlayer_CMS.md +4 -5
- package/docs/it/intlayer_with_nestjs.md +268 -0
- package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/it/intlayer_with_react_router_v7.md +535 -0
- package/docs/it/intlayer_with_tanstack.md +467 -301
- package/docs/it/intlayer_with_vite+preact.md +7 -7
- package/docs/it/intlayer_with_vite+react.md +7 -7
- package/docs/it/intlayer_with_vite+vue.md +9 -9
- package/docs/it/packages/vite-intlayer/index.md +3 -3
- package/docs/it/readme.md +261 -0
- package/docs/it/testing.md +200 -0
- package/docs/ja/autoFill.md +45 -23
- package/docs/ja/configuration.md +243 -204
- package/docs/ja/dictionary/content_file.md +1064 -0
- package/docs/ja/intlayer_CMS.md +4 -5
- package/docs/ja/intlayer_with_nestjs.md +268 -0
- package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ja/intlayer_with_react_router_v7.md +534 -0
- package/docs/ja/intlayer_with_tanstack.md +467 -303
- package/docs/ja/intlayer_with_vite+preact.md +7 -7
- package/docs/ja/intlayer_with_vite+react.md +7 -7
- package/docs/ja/intlayer_with_vite+vue.md +9 -9
- package/docs/ja/packages/vite-intlayer/index.md +3 -3
- package/docs/ja/readme.md +263 -0
- package/docs/ja/testing.md +200 -0
- package/docs/ko/autoFill.md +39 -16
- package/docs/ko/configuration.md +217 -197
- package/docs/ko/dictionary/content_file.md +1060 -0
- package/docs/ko/intlayer_CMS.md +4 -5
- package/docs/ko/intlayer_with_nestjs.md +268 -0
- package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7.md +540 -0
- package/docs/ko/intlayer_with_tanstack.md +466 -302
- package/docs/ko/intlayer_with_vite+preact.md +7 -7
- package/docs/ko/intlayer_with_vite+react.md +7 -7
- package/docs/ko/intlayer_with_vite+vue.md +9 -9
- package/docs/ko/packages/vite-intlayer/index.md +3 -3
- package/docs/ko/readme.md +261 -0
- package/docs/ko/testing.md +200 -0
- package/docs/pt/autoFill.md +39 -15
- package/docs/pt/configuration.md +165 -147
- package/docs/pt/dictionary/content_file.md +1062 -0
- package/docs/pt/intlayer_CMS.md +4 -5
- package/docs/pt/intlayer_with_nestjs.md +271 -0
- package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7.md +535 -0
- package/docs/pt/intlayer_with_tanstack.md +469 -300
- package/docs/pt/intlayer_with_vite+preact.md +7 -7
- package/docs/pt/intlayer_with_vite+react.md +7 -7
- package/docs/pt/intlayer_with_vite+vue.md +9 -9
- package/docs/pt/packages/vite-intlayer/index.md +3 -3
- package/docs/pt/readme.md +261 -0
- package/docs/pt/testing.md +200 -0
- package/docs/ru/autoFill.md +52 -30
- package/docs/ru/configuration.md +164 -117
- package/docs/ru/dictionary/content_file.md +1064 -0
- package/docs/ru/intlayer_CMS.md +4 -4
- package/docs/ru/intlayer_with_nestjs.md +270 -0
- package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7.md +534 -0
- package/docs/ru/intlayer_with_tanstack.md +470 -305
- package/docs/ru/intlayer_with_vite+preact.md +7 -7
- package/docs/ru/intlayer_with_vite+react.md +7 -7
- package/docs/ru/intlayer_with_vite+vue.md +9 -9
- package/docs/ru/packages/vite-intlayer/index.md +3 -3
- package/docs/ru/readme.md +261 -0
- package/docs/ru/testing.md +202 -0
- package/docs/tr/CI_CD.md +198 -0
- package/docs/tr/autoFill.md +201 -0
- package/docs/tr/configuration.md +585 -0
- package/docs/tr/dictionary/condition.md +243 -0
- package/docs/tr/dictionary/content_file.md +1055 -0
- package/docs/tr/dictionary/enumeration.md +251 -0
- package/docs/tr/dictionary/file.md +228 -0
- package/docs/tr/dictionary/function_fetching.md +218 -0
- package/docs/tr/dictionary/gender.md +279 -0
- package/docs/tr/dictionary/insertion.md +191 -0
- package/docs/tr/dictionary/markdown.md +385 -0
- package/docs/tr/dictionary/nesting.md +279 -0
- package/docs/tr/dictionary/translation.md +315 -0
- package/docs/tr/formatters.md +618 -0
- package/docs/tr/how_works_intlayer.md +254 -0
- package/docs/tr/index.md +168 -0
- package/docs/tr/interest_of_intlayer.md +288 -0
- package/docs/tr/intlayer_CMS.md +347 -0
- package/docs/tr/intlayer_cli.md +570 -0
- package/docs/tr/intlayer_visual_editor.md +269 -0
- package/docs/tr/intlayer_with_angular.md +694 -0
- package/docs/tr/intlayer_with_create_react_app.md +1218 -0
- package/docs/tr/intlayer_with_express.md +415 -0
- package/docs/tr/intlayer_with_lynx+react.md +511 -0
- package/docs/tr/intlayer_with_nestjs.md +268 -0
- package/docs/tr/intlayer_with_nextjs_14.md +1029 -0
- package/docs/tr/intlayer_with_nextjs_15.md +1506 -0
- package/docs/tr/intlayer_with_nextjs_page_router.md +1484 -0
- package/docs/tr/intlayer_with_nuxt.md +773 -0
- package/docs/tr/intlayer_with_react_native+expo.md +660 -0
- package/docs/tr/intlayer_with_react_router_v7.md +531 -0
- package/docs/tr/intlayer_with_tanstack.md +452 -0
- package/docs/tr/intlayer_with_vite+preact.md +1673 -0
- package/docs/tr/intlayer_with_vite+react.md +1632 -0
- package/docs/tr/intlayer_with_vite+solid.md +288 -0
- package/docs/tr/intlayer_with_vite+svelte.md +288 -0
- package/docs/tr/intlayer_with_vite+vue.md +1042 -0
- package/docs/tr/introduction.md +209 -0
- package/docs/tr/locale_mapper.md +244 -0
- package/docs/tr/mcp_server.md +207 -0
- package/docs/tr/packages/@intlayer/api/index.md +58 -0
- package/docs/tr/packages/@intlayer/chokidar/index.md +57 -0
- package/docs/tr/packages/@intlayer/cli/index.md +47 -0
- package/docs/tr/packages/@intlayer/config/index.md +142 -0
- package/docs/tr/packages/@intlayer/core/index.md +51 -0
- package/docs/tr/packages/@intlayer/design-system/index.md +47 -0
- package/docs/tr/packages/@intlayer/dictionary-entry/index.md +53 -0
- package/docs/tr/packages/@intlayer/editor/index.md +47 -0
- package/docs/tr/packages/@intlayer/editor-react/index.md +47 -0
- package/docs/tr/packages/@intlayer/webpack/index.md +61 -0
- package/docs/tr/packages/angular-intlayer/index.md +59 -0
- package/docs/tr/packages/express-intlayer/index.md +258 -0
- package/docs/tr/packages/express-intlayer/t.md +459 -0
- package/docs/tr/packages/intlayer/getConfiguration.md +151 -0
- package/docs/tr/packages/intlayer/getEnumeration.md +165 -0
- package/docs/tr/packages/intlayer/getHTMLTextDir.md +127 -0
- package/docs/tr/packages/intlayer/getLocaleLang.md +87 -0
- package/docs/tr/packages/intlayer/getLocaleName.md +124 -0
- package/docs/tr/packages/intlayer/getLocalizedUrl.md +324 -0
- package/docs/tr/packages/intlayer/getMultilingualUrls.md +225 -0
- package/docs/tr/packages/intlayer/getPathWithoutLocale.md +81 -0
- package/docs/tr/packages/intlayer/getTranslation.md +196 -0
- package/docs/tr/packages/intlayer/getTranslationContent.md +195 -0
- package/docs/tr/packages/intlayer/index.md +505 -0
- package/docs/tr/packages/intlayer-cli/index.md +71 -0
- package/docs/tr/packages/intlayer-editor/index.md +139 -0
- package/docs/tr/packages/lynx-intlayer/index.md +85 -0
- package/docs/tr/packages/next-intlayer/index.md +154 -0
- package/docs/tr/packages/next-intlayer/t.md +354 -0
- package/docs/tr/packages/next-intlayer/useDictionary.md +270 -0
- package/docs/tr/packages/next-intlayer/useIntlayer.md +265 -0
- package/docs/tr/packages/next-intlayer/useLocale.md +133 -0
- package/docs/tr/packages/nuxt-intlayer/index.md +59 -0
- package/docs/tr/packages/preact-intlayer/index.md +55 -0
- package/docs/tr/packages/react-intlayer/index.md +148 -0
- package/docs/tr/packages/react-intlayer/t.md +304 -0
- package/docs/tr/packages/react-intlayer/useDictionary.md +554 -0
- package/docs/tr/packages/react-intlayer/useI18n.md +478 -0
- package/docs/tr/packages/react-intlayer/useIntlayer.md +253 -0
- package/docs/tr/packages/react-intlayer/useLocale.md +212 -0
- package/docs/tr/packages/react-native-intlayer/index.md +85 -0
- package/docs/tr/packages/react-scripts-intlayer/index.md +82 -0
- package/docs/tr/packages/solid-intlayer/index.md +56 -0
- package/docs/tr/packages/svelte-intlayer/index.md +55 -0
- package/docs/tr/packages/vite-intlayer/index.md +82 -0
- package/docs/tr/packages/vue-intlayer/index.md +59 -0
- package/docs/tr/per_locale_file.md +321 -0
- package/docs/tr/readme.md +261 -0
- package/docs/tr/roadmap.md +338 -0
- package/docs/tr/testing.md +200 -0
- package/docs/tr/vs_code_extension.md +154 -0
- package/docs/zh/autoFill.md +40 -18
- package/docs/zh/configuration.md +245 -226
- package/docs/zh/dictionary/content_file.md +1064 -0
- package/docs/zh/intlayer_CMS.md +4 -5
- package/docs/zh/intlayer_with_nestjs.md +268 -0
- package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +535 -0
- package/docs/zh/intlayer_with_tanstack.md +468 -278
- package/docs/zh/intlayer_with_vite+preact.md +7 -7
- package/docs/zh/intlayer_with_vite+react.md +7 -7
- package/docs/zh/intlayer_with_vite+vue.md +7 -7
- package/docs/zh/packages/vite-intlayer/index.md +3 -3
- package/docs/zh/readme.md +261 -0
- package/docs/zh/testing.md +198 -0
- package/frequent_questions/tr/SSR_Next_no_[locale].md +105 -0
- package/frequent_questions/tr/array_as_content_declaration.md +72 -0
- package/frequent_questions/tr/build_dictionaries.md +59 -0
- package/frequent_questions/tr/build_error_CI_CD.md +75 -0
- package/frequent_questions/tr/customized_locale_list.md +65 -0
- package/frequent_questions/tr/domain_routing.md +114 -0
- package/frequent_questions/tr/esbuild_error.md +30 -0
- package/frequent_questions/tr/get_locale_cookie.md +142 -0
- package/frequent_questions/tr/intlayer_command_undefined.md +156 -0
- package/frequent_questions/tr/locale_incorect_in_url.md +74 -0
- package/frequent_questions/tr/static_rendering.md +45 -0
- package/frequent_questions/tr/translated_path_url.md +56 -0
- package/frequent_questions/tr/unknown_command.md +98 -0
- package/legal/tr/privacy_notice.md +83 -0
- package/legal/tr/terms_of_service.md +55 -0
- package/package.json +12 -12
- package/src/generated/blog.entry.ts +212 -0
- package/src/generated/docs.entry.ts +663 -135
- package/src/generated/frequentQuestions.entry.ts +85 -1
- package/src/generated/legal.entry.ts +7 -1
- package/docs/ar/dictionary/content_extention_customization.md +0 -100
- package/docs/ar/dictionary/get_started.md +0 -527
- package/docs/de/dictionary/content_extention_customization.md +0 -100
- package/docs/de/dictionary/get_started.md +0 -531
- package/docs/en/dictionary/content_extention_customization.md +0 -102
- package/docs/en/dictionary/get_started.md +0 -529
- package/docs/en-GB/dictionary/content_extention_customization.md +0 -100
- package/docs/en-GB/dictionary/get_started.md +0 -591
- package/docs/es/dictionary/content_extention_customization.md +0 -100
- package/docs/es/dictionary/get_started.md +0 -527
- package/docs/fr/dictionary/content_extention_customization.md +0 -100
- package/docs/fr/dictionary/get_started.md +0 -527
- package/docs/hi/dictionary/content_extention_customization.md +0 -100
- package/docs/hi/dictionary/get_started.md +0 -527
- package/docs/it/dictionary/content_extention_customization.md +0 -113
- package/docs/it/dictionary/get_started.md +0 -573
- package/docs/ja/dictionary/content_extention_customization.md +0 -113
- package/docs/ja/dictionary/get_started.md +0 -576
- package/docs/ko/dictionary/content_extention_customization.md +0 -100
- package/docs/ko/dictionary/get_started.md +0 -530
- package/docs/pt/dictionary/content_extention_customization.md +0 -100
- package/docs/pt/dictionary/get_started.md +0 -532
- package/docs/ru/dictionary/content_extention_customization.md +0 -100
- package/docs/ru/dictionary/get_started.md +0 -575
- package/docs/zh/dictionary/content_extention_customization.md +0 -117
- package/docs/zh/dictionary/get_started.md +0 -533
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-09-04
|
|
3
|
+
updatedAt: 2025-09-04
|
|
4
|
+
title: React Router v7 में Intlayer के साथ शुरुआत करना
|
|
5
|
+
description: जानें कि कैसे Intlayer का उपयोग करके अपने React Router v7 एप्लिकेशन में अंतरराष्ट्रीयकरण (i18n) जोड़ें। इस व्यापक गाइड का पालन करें ताकि आपका ऐप बहुभाषी और locale-सचेत रूटिंग के साथ हो।
|
|
6
|
+
keywords:
|
|
7
|
+
- अंतरराष्ट्रीयकरण
|
|
8
|
+
- दस्तावेज़ीकरण
|
|
9
|
+
- Intlayer
|
|
10
|
+
- React Router v7
|
|
11
|
+
- React
|
|
12
|
+
- i18n
|
|
13
|
+
- TypeScript
|
|
14
|
+
- Locale रूटिंग
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- environment
|
|
18
|
+
- vite-and-react
|
|
19
|
+
- react-router-v7
|
|
20
|
+
applicationTemplate: https://github.com/AydinTheFirst/react-router-intlayer
|
|
21
|
+
author: AydinTheFirst
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Intlayer और React Router v7 के साथ अंतरराष्ट्रीयकरण (i18n) शुरू करना
|
|
25
|
+
|
|
26
|
+
यह गाइड दिखाता है कि कैसे **Intlayer** को React Router v7 प्रोजेक्ट्स में seamless अंतरराष्ट्रीयकरण के लिए locale-सचेत रूटिंग, TypeScript समर्थन, और आधुनिक विकास प्रथाओं के साथ एकीकृत किया जाए।
|
|
27
|
+
|
|
28
|
+
## Intlayer क्या है?
|
|
29
|
+
|
|
30
|
+
**Intlayer** एक अभिनव, ओपन-सोर्स अंतरराष्ट्रीयकरण (i18n) लाइब्रेरी है जिसे आधुनिक वेब एप्लिकेशन में बहुभाषी समर्थन को सरल बनाने के लिए डिज़ाइन किया गया है।
|
|
31
|
+
|
|
32
|
+
Intlayer के साथ, आप कर सकते हैं:
|
|
33
|
+
|
|
34
|
+
- **घोषणात्मक शब्दकोशों का उपयोग करके अनुवादों का आसानी से प्रबंधन करें** जो कि कंपोनेंट स्तर पर होते हैं।
|
|
35
|
+
- **मेटाडेटा, रूट्स, और सामग्री को गतिशील रूप से स्थानीयकृत करें**।
|
|
36
|
+
- **स्वचालित रूप से उत्पन्न प्रकारों के साथ TypeScript समर्थन सुनिश्चित करें**, जिससे ऑटो-कम्प्लीशन और त्रुटि पहचान में सुधार होता है।
|
|
37
|
+
- **उन्नत सुविधाओं का लाभ उठाएं**, जैसे गतिशील locale पहचान और स्विचिंग।
|
|
38
|
+
- **React Router v7 के कॉन्फ़िगरेशन-आधारित रूटिंग सिस्टम के साथ locale-सचेत रूटिंग सक्षम करें**।
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## React Router v7 एप्लिकेशन में Intlayer सेटअप करने के लिए चरण-दर-चरण मार्गदर्शिका
|
|
43
|
+
|
|
44
|
+
### चरण 1: निर्भरताएँ स्थापित करें
|
|
45
|
+
|
|
46
|
+
अपनी पसंदीदा पैकेज मैनेजर का उपयोग करके आवश्यक पैकेज स्थापित करें:
|
|
47
|
+
|
|
48
|
+
```bash packageManager="npm"
|
|
49
|
+
npm install intlayer react-intlayer
|
|
50
|
+
npm install vite-intlayer --save-dev
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash packageManager="pnpm"
|
|
54
|
+
pnpm add intlayer react-intlayer
|
|
55
|
+
pnpm add vite-intlayer --save-dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- **intlayer**
|
|
59
|
+
|
|
60
|
+
- **intlayer**
|
|
61
|
+
|
|
62
|
+
मुख्य पैकेज जो कॉन्फ़िगरेशन प्रबंधन, अनुवाद, [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md), ट्रांसपाइलेशन, और [CLI कमांड्स](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_cli.md) के लिए अंतरराष्ट्रीयकरण उपकरण प्रदान करता है।
|
|
63
|
+
|
|
64
|
+
- **react-intlayer**
|
|
65
|
+
वह पैकेज जो Intlayer को React एप्लिकेशन के साथ एकीकृत करता है। यह React अंतरराष्ट्रीयकरण के लिए संदर्भ प्रदाता और हुक्स प्रदान करता है।
|
|
66
|
+
|
|
67
|
+
- **vite-intlayer**
|
|
68
|
+
इसमें Vite प्लगइन शामिल है जो Intlayer को [Vite बंडलर](https://vite.dev/guide/why.html#why-bundle-for-production) के साथ एकीकृत करता है, साथ ही उपयोगकर्ता की पसंदीदा भाषा का पता लगाने, कुकीज़ प्रबंधित करने, और URL पुनर्निर्देशन को संभालने के लिए मिडलवेयर भी शामिल है।
|
|
69
|
+
|
|
70
|
+
### चरण 2: अपने प्रोजेक्ट का कॉन्फ़िगरेशन
|
|
71
|
+
|
|
72
|
+
अपने एप्लिकेशन की भाषाओं को कॉन्फ़िगर करने के लिए एक कॉन्फ़िग फ़ाइल बनाएं:
|
|
73
|
+
|
|
74
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
75
|
+
import { type IntlayerConfig, Locales } from "intlayer";
|
|
76
|
+
|
|
77
|
+
const config: IntlayerConfig = {
|
|
78
|
+
internationalization: {
|
|
79
|
+
defaultLocale: Locales.ENGLISH,
|
|
80
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
81
|
+
},
|
|
82
|
+
middleware: {
|
|
83
|
+
prefixDefault: true, // URLs में हमेशा डिफ़ॉल्ट भाषा को प्रीफिक्स करें
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default config;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
91
|
+
import { Locales } from "intlayer";
|
|
92
|
+
|
|
93
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
94
|
+
const config = {
|
|
95
|
+
internationalization: {
|
|
96
|
+
defaultLocale: Locales.ENGLISH,
|
|
97
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
98
|
+
},
|
|
99
|
+
middleware: {
|
|
100
|
+
prefixDefault: true,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default config;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
108
|
+
const { Locales } = require("intlayer");
|
|
109
|
+
|
|
110
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
111
|
+
const config = {
|
|
112
|
+
internationalization: {
|
|
113
|
+
defaultLocale: Locales.ENGLISH,
|
|
114
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
115
|
+
},
|
|
116
|
+
middleware: {
|
|
117
|
+
prefixDefault: true, // URLs में हमेशा डिफ़ॉल्ट भाषा को प्रीफिक्स करें
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
module.exports = config;
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
> इस कॉन्फ़िगरेशन फ़ाइल के माध्यम से, आप स्थानीयकृत URL, मिडलवेयर रीडायरेक्शन, कुकी नाम, आपकी सामग्री घोषणाओं का स्थान और एक्सटेंशन, कंसोल में Intlayer लॉग को अक्षम करना, और भी बहुत कुछ सेट कर सकते हैं। उपलब्ध सभी पैरामीटर की पूरी सूची के लिए, कृपया [कॉन्फ़िगरेशन दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) देखें।
|
|
125
|
+
|
|
126
|
+
### चरण 3: React Router v7 रूट्स कॉन्फ़िगर करें
|
|
127
|
+
|
|
128
|
+
अपने रूटिंग कॉन्फ़िगरेशन को लोकल-जानकारी वाले रूट्स के साथ सेट करें:
|
|
129
|
+
|
|
130
|
+
```typescript fileName="app/routes.ts" codeFormat="typescript"
|
|
131
|
+
import { layout, route, type RouteConfig } from "@react-router/dev/routes";
|
|
132
|
+
|
|
133
|
+
export default [
|
|
134
|
+
layout("routes/layout.tsx", [
|
|
135
|
+
route("/", "routes/page.tsx"), // रूट पेज - लोकल पर रीडायरेक्ट करता है
|
|
136
|
+
route("/:lang", "routes/[lang]/page.tsx"), // स्थानीयकृत होम पेज
|
|
137
|
+
route("/:lang/about", "routes/[lang]/about/page.tsx"), // स्थानीयकृत अबाउट पेज
|
|
138
|
+
]),
|
|
139
|
+
] satisfies RouteConfig;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### चरण 4: अपने Vite कॉन्फ़िगरेशन में Intlayer को एकीकृत करें
|
|
143
|
+
|
|
144
|
+
अपने कॉन्फ़िगरेशन में intlayer प्लगइन जोड़ें:
|
|
145
|
+
|
|
146
|
+
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
147
|
+
import { reactRouter } from "@react-router/dev/vite";
|
|
148
|
+
import { defineConfig } from "vite";
|
|
149
|
+
import { intlayerMiddlewarePlugin, intlayerPlugin } from "vite-intlayer";
|
|
150
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
151
|
+
|
|
152
|
+
export default defineConfig({
|
|
153
|
+
plugins: [
|
|
154
|
+
reactRouter(),
|
|
155
|
+
tsconfigPaths(),
|
|
156
|
+
intlayerPlugin(),
|
|
157
|
+
intlayerMiddlewarePlugin(),
|
|
158
|
+
],
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
> `intlayerPlugin()` Vite प्लगइन का उपयोग Intlayer को Vite के साथ एकीकृत करने के लिए किया जाता है। यह कंटेंट घोषणा फ़ाइलों के निर्माण को सुनिश्चित करता है और विकास मोड में उनकी निगरानी करता है। यह Vite एप्लिकेशन के भीतर Intlayer पर्यावरण चर को परिभाषित करता है। इसके अतिरिक्त, यह प्रदर्शन को अनुकूलित करने के लिए उपनाम प्रदान करता है।
|
|
163
|
+
|
|
164
|
+
### चरण 5: लेआउट कॉम्पोनेंट बनाएं
|
|
165
|
+
|
|
166
|
+
अपने रूट लेआउट और स्थानीय-विशिष्ट लेआउट सेट करें:
|
|
167
|
+
|
|
168
|
+
#### रूट लेआउट
|
|
169
|
+
|
|
170
|
+
```tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
|
|
171
|
+
// app/routes/layout.tsx
|
|
172
|
+
import { Outlet } from "react-router";
|
|
173
|
+
import { IntlayerProvider } from "react-intlayer";
|
|
174
|
+
|
|
175
|
+
export default function RootLayout() {
|
|
176
|
+
return (
|
|
177
|
+
<IntlayerProvider>
|
|
178
|
+
<Outlet />
|
|
179
|
+
</IntlayerProvider>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### चरण 6: अपनी सामग्री घोषित करें
|
|
185
|
+
|
|
186
|
+
अपने अनुवादों को संग्रहीत करने के लिए अपनी सामग्री घोषणाएँ बनाएं और प्रबंधित करें:
|
|
187
|
+
|
|
188
|
+
```tsx fileName="app/routes/[lang]/page.content.ts" contentDeclarationFormat="typescript"
|
|
189
|
+
import { t, type Dictionary } from "intlayer";
|
|
190
|
+
|
|
191
|
+
const pageContent = {
|
|
192
|
+
key: "page",
|
|
193
|
+
content: {
|
|
194
|
+
title: t({
|
|
195
|
+
en: "Welcome to React Router v7 + Intlayer",
|
|
196
|
+
tr: "React Router v7 + Intlayer'a Hoş Geldiniz",
|
|
197
|
+
}),
|
|
198
|
+
description: t({
|
|
199
|
+
en: "Build multilingual applications with ease using React Router v7 and Intlayer.",
|
|
200
|
+
tr: "React Router v7 ve Intlayer kullanarak kolayca çok dilli uygulamalar geliştirin.",
|
|
201
|
+
}),
|
|
202
|
+
aboutLink: t({
|
|
203
|
+
en: "हमारे बारे में जानें",
|
|
204
|
+
tr: "Hakkımızda Öğrenin",
|
|
205
|
+
}),
|
|
206
|
+
homeLink: t({
|
|
207
|
+
en: "होम",
|
|
208
|
+
tr: "Ana Sayfa",
|
|
209
|
+
}),
|
|
210
|
+
},
|
|
211
|
+
} satisfies Dictionary;
|
|
212
|
+
|
|
213
|
+
export default pageContent;
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
> आपकी सामग्री घोषणाएँ आपकी एप्लिकेशन में कहीं भी परिभाषित की जा सकती हैं जब तक कि वे `contentDir` निर्देशिका (डिफ़ॉल्ट रूप से, `./app`) में शामिल हों। और सामग्री घोषणा फ़ाइल एक्सटेंशन से मेल खाती हों (डिफ़ॉल्ट रूप से, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)।
|
|
217
|
+
|
|
218
|
+
> अधिक विवरण के लिए, [सामग्री घोषणा प्रलेखन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md) देखें।
|
|
219
|
+
|
|
220
|
+
### चरण 7: लोकल-एवेयर कंपोनेंट बनाएं
|
|
221
|
+
|
|
222
|
+
`LocalizedLink` कंपोनेंट बनाएं जो स्थानीय-ज्ञान नेविगेशन के लिए हो:
|
|
223
|
+
|
|
224
|
+
```tsx fileName="app/components/localized-link.tsx" codeFormat="typescript"
|
|
225
|
+
// app/components/localized-link.tsx
|
|
226
|
+
import { getLocalizedUrl } from "intlayer";
|
|
227
|
+
import { useLocale } from "react-intlayer";
|
|
228
|
+
import React from "react";
|
|
229
|
+
import { Link, useLocation } from "react-router";
|
|
230
|
+
|
|
231
|
+
type RouterLinkProps = React.ComponentProps<typeof Link>;
|
|
232
|
+
|
|
233
|
+
export default function LocalizedLink({ to, ...props }: RouterLinkProps) {
|
|
234
|
+
const { locale } = useLocale(); // वर्तमान स्थानीय भाषा प्राप्त करें
|
|
235
|
+
const location = useLocation(); // वर्तमान स्थान प्राप्त करें
|
|
236
|
+
|
|
237
|
+
const isExternal = (path: string) =>
|
|
238
|
+
/^([a-z][a-z0-9+.-]*:)?\/\//i.test(path) || path.startsWith("mailto:"); // जांचें कि पथ बाहरी है या नहीं
|
|
239
|
+
|
|
240
|
+
if (typeof to === "string") {
|
|
241
|
+
if (to.startsWith("/") && !isExternal(to)) {
|
|
242
|
+
return <Link to={getLocalizedUrl(to, locale)} {...props} />;
|
|
243
|
+
}
|
|
244
|
+
return <Link to={to} {...props} />;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (to && typeof to === "object") {
|
|
248
|
+
const pathname = (to as { pathname?: string }).pathname;
|
|
249
|
+
if (pathname && pathname.startsWith("/") && !isExternal(pathname)) {
|
|
250
|
+
return (
|
|
251
|
+
<Link
|
|
252
|
+
to={{ ...to, pathname: getLocalizedUrl(pathname, locale) }}
|
|
253
|
+
{...props}
|
|
254
|
+
/>
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
return <Link to={to} {...props} />;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
<Link
|
|
262
|
+
to={getLocalizedUrl(location.pathname + location.search, locale)}
|
|
263
|
+
{...props}
|
|
264
|
+
/>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### चरण 8: अपने पृष्ठों में Intlayer का उपयोग करें
|
|
270
|
+
|
|
271
|
+
अपने एप्लिकेशन में अपने कंटेंट डिक्शनरीज़ तक पहुँचें:
|
|
272
|
+
|
|
273
|
+
#### रूट रीडायरेक्ट पेज
|
|
274
|
+
|
|
275
|
+
```tsx fileName="app/routes/page.tsx" codeFormat="typescript"
|
|
276
|
+
// app/routes/page.tsx
|
|
277
|
+
import { useLocale } from "react.intlayer";
|
|
278
|
+
import { Navigate } from "react-router";
|
|
279
|
+
|
|
280
|
+
export default function Page() {
|
|
281
|
+
const { locale } = useLocale();
|
|
282
|
+
|
|
283
|
+
return <Navigate replace to={locale} />;
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### स्थानीयकृत होम पेज
|
|
288
|
+
|
|
289
|
+
```tsx fileName="app/routes/[lang]/page.tsx" codeFormat="typescript"
|
|
290
|
+
import { useIntlayer } from "react.intlayer";
|
|
291
|
+
import LocalizedLink from "~/components/localized-link";
|
|
292
|
+
|
|
293
|
+
export default function Page() {
|
|
294
|
+
const content = useIntlayer("page");
|
|
295
|
+
|
|
296
|
+
return (
|
|
297
|
+
<div style={{ padding: "2rem", textAlign: "center" }}>
|
|
298
|
+
<h1>{content.title}</h1>
|
|
299
|
+
<p>{content.description}</p>
|
|
300
|
+
<nav style={{ marginTop: "2rem" }}>
|
|
301
|
+
<LocalizedLink
|
|
302
|
+
to="/about"
|
|
303
|
+
style={{
|
|
304
|
+
display: "inline-block",
|
|
305
|
+
padding: "0.5rem 1rem",
|
|
306
|
+
backgroundColor: "#007bff",
|
|
307
|
+
color: "white",
|
|
308
|
+
textDecoration: "none",
|
|
309
|
+
borderRadius: "4px",
|
|
310
|
+
}}
|
|
311
|
+
>
|
|
312
|
+
{content.aboutLink}
|
|
313
|
+
</LocalizedLink>
|
|
314
|
+
</nav>
|
|
315
|
+
</div>
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
> `useIntlayer` हुक के बारे में अधिक जानने के लिए, [दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useIntlayer.md) देखें।
|
|
321
|
+
|
|
322
|
+
### चरण 9: एक लोकल स्विचर कॉम्पोनेंट बनाएं
|
|
323
|
+
|
|
324
|
+
उपयोगकर्ताओं को भाषाएँ बदलने की अनुमति देने के लिए एक कॉम्पोनेंट बनाएं:
|
|
325
|
+
|
|
326
|
+
```tsx fileName="app/components/locale-switcher.tsx" codeFormat="typescript"
|
|
327
|
+
import { getLocalizedUrl, getLocaleName } from "intlayer";
|
|
328
|
+
import { useLocale } from "react-intlayer";
|
|
329
|
+
import { useLocation, useNavigate } from "react-router";
|
|
330
|
+
|
|
331
|
+
export default function LocaleSwitcher() {
|
|
332
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
333
|
+
const location = useLocation();
|
|
334
|
+
const navigate = useNavigate();
|
|
335
|
+
|
|
336
|
+
const handleLocaleChange = (newLocale: string) => {
|
|
337
|
+
const localizedUrl = getLocalizedUrl(
|
|
338
|
+
location.pathname + location.search,
|
|
339
|
+
newLocale
|
|
340
|
+
);
|
|
341
|
+
setLocale(newLocale);
|
|
342
|
+
navigate(localizedUrl);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
return (
|
|
346
|
+
<div style={{ margin: "1rem 0" }}>
|
|
347
|
+
<label htmlFor="locale-select">भाषा चुनें: </label>
|
|
348
|
+
<select
|
|
349
|
+
id="locale-select"
|
|
350
|
+
value={locale}
|
|
351
|
+
onChange={(e) => handleLocaleChange(e.target.value)}
|
|
352
|
+
style={{ padding: "0.25rem", marginLeft: "0.5rem" }}
|
|
353
|
+
>
|
|
354
|
+
{availableLocales.map((availableLocale) => (
|
|
355
|
+
<option key={availableLocale} value={availableLocale}>
|
|
356
|
+
{getLocaleName(availableLocale)}
|
|
357
|
+
</option>
|
|
358
|
+
))}
|
|
359
|
+
</select>
|
|
360
|
+
</div>
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
> `useLocale` हुक के बारे में अधिक जानने के लिए, [दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useLocale.md) देखें।
|
|
366
|
+
|
|
367
|
+
### चरण 10: HTML एट्रिब्यूट्स प्रबंधन जोड़ें (वैकल्पिक)
|
|
368
|
+
|
|
369
|
+
HTML lang और dir एट्रिब्यूट्स को प्रबंधित करने के लिए एक हुक बनाएं:
|
|
370
|
+
|
|
371
|
+
```tsx fileName="app/hooks/useI18nHTMLAttributes.tsx" codeFormat="typescript"
|
|
372
|
+
// app/hooks/useI18nHTMLAttributes.tsx
|
|
373
|
+
import { getHTMLTextDir } from "intlayer";
|
|
374
|
+
import { useEffect } from "react";
|
|
375
|
+
import { useLocale } from "react-intlayer";
|
|
376
|
+
|
|
377
|
+
export const useI18nHTMLAttributes = () => {
|
|
378
|
+
const { locale } = useLocale();
|
|
379
|
+
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
document.documentElement.lang = locale;
|
|
382
|
+
document.documentElement.dir = getHTMLTextDir(locale);
|
|
383
|
+
}, [locale]);
|
|
384
|
+
};
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
फिर इसे अपने रूट कॉम्पोनेंट में उपयोग करें:
|
|
388
|
+
|
|
389
|
+
```tsx fileName="app/root.tsx" codeFormat="typescript"
|
|
390
|
+
// app/routes/layout.tsx
|
|
391
|
+
import { Outlet } from "react-router";
|
|
392
|
+
import { IntlayerProvider } from "react-intlayer";
|
|
393
|
+
|
|
394
|
+
import { useI18nHTMLAttributes } from "app/hooks/useI18nHTMLAttributes"; // हुक को इम्पोर्ट करें
|
|
395
|
+
|
|
396
|
+
export default function RootLayout() {
|
|
397
|
+
useI18nHTMLAttributes(); // हुक को कॉल करें
|
|
398
|
+
|
|
399
|
+
return (
|
|
400
|
+
<IntlayerProvider>
|
|
401
|
+
<Outlet />
|
|
402
|
+
</IntlayerProvider>
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### चरण 11: अपना एप्लिकेशन बनाएं और चलाएं
|
|
408
|
+
|
|
409
|
+
सामग्री शब्दकोश बनाएं और अपने एप्लिकेशन को चलाएं:
|
|
410
|
+
|
|
411
|
+
```bash packageManager="npm"
|
|
412
|
+
# Intlayer शब्दकोश बनाएं
|
|
413
|
+
npm run intlayer:build
|
|
414
|
+
|
|
415
|
+
# विकास सर्वर शुरू करें
|
|
416
|
+
npm run dev
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
```bash packageManager="pnpm"
|
|
420
|
+
# Intlayer शब्दकोश बनाएं
|
|
421
|
+
pnpm intlayer:build
|
|
422
|
+
|
|
423
|
+
# विकास सर्वर शुरू करें
|
|
424
|
+
pnpm dev
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
```bash packageManager="yarn"
|
|
428
|
+
# Intlayer शब्दकोश बनाएं
|
|
429
|
+
yarn intlayer:build
|
|
430
|
+
|
|
431
|
+
# विकास सर्वर शुरू करें
|
|
432
|
+
yarn dev
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### चरण 12: TypeScript कॉन्फ़िगर करें (वैकल्पिक)
|
|
436
|
+
|
|
437
|
+
Intlayer TypeScript के लाभ प्राप्त करने और आपके कोडबेस को मजबूत बनाने के लिए मॉड्यूल ऑगमेंटेशन का उपयोग करता है।
|
|
438
|
+
|
|
439
|
+
सुनिश्चित करें कि आपकी TypeScript कॉन्फ़िगरेशन में स्वचालित रूप से जनरेट किए गए प्रकार शामिल हैं:
|
|
440
|
+
|
|
441
|
+
```json5 fileName="tsconfig.json"
|
|
442
|
+
{
|
|
443
|
+
compilerOptions: {
|
|
444
|
+
// ... आपकी मौजूदा TypeScript कॉन्फ़िगरेशन
|
|
445
|
+
},
|
|
446
|
+
include: [
|
|
447
|
+
// ... your existing includes
|
|
448
|
+
".intlayer/**/*.ts", // ऑटो-जनरेटेड टाइप्स शामिल करें
|
|
449
|
+
],
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### गिट कॉन्फ़िगरेशन
|
|
454
|
+
|
|
455
|
+
यह अनुशंसित है कि Intlayer द्वारा जनरेट की गई फाइलों को अनदेखा किया जाए। इससे आप उन्हें अपनी Git रिपॉजिटरी में कमिट करने से बच सकते हैं।
|
|
456
|
+
|
|
457
|
+
इसके लिए, आप अपनी `.gitignore` फाइल में निम्नलिखित निर्देश जोड़ सकते हैं:
|
|
458
|
+
|
|
459
|
+
```plaintext fileName=".gitignore"
|
|
460
|
+
# Intlayer द्वारा जनरेट की गई फाइलों को अनदेखा करें
|
|
461
|
+
.intlayer
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## प्रोडक्शन डिप्लॉयमेंट
|
|
467
|
+
|
|
468
|
+
जब आप अपना एप्लिकेशन डिप्लॉय करें:
|
|
469
|
+
|
|
470
|
+
1. **अपना एप्लिकेशन बनाएं:**
|
|
471
|
+
|
|
472
|
+
```bash
|
|
473
|
+
npm run build
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
2. **Intlayer शब्दकोश बनाएं:**
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
npm run intlayer:build
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
3. **यदि प्रोडक्शन में मिडलवेयर का उपयोग कर रहे हैं तो `vite-intlayer` को dependencies में जोड़ें:**
|
|
483
|
+
```bash
|
|
484
|
+
npm install vite-intlayer --save
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
आपका एप्लिकेशन अब निम्नलिखित का समर्थन करेगा:
|
|
488
|
+
|
|
489
|
+
- **URL संरचना**: `/en`, `/en/about`, `/tr`, `/tr/about`
|
|
490
|
+
- ब्राउज़र प्राथमिकताओं के आधार पर **स्वचालित लोकल डिटेक्शन**
|
|
491
|
+
- React Router v7 के साथ **लोकल-अवेयर राउटिंग**
|
|
492
|
+
- ऑटो-जनरेटेड टाइप्स के साथ **TypeScript समर्थन**
|
|
493
|
+
- उचित लोकल हैंडलिंग के साथ **सर्वर-साइड रेंडरिंग**
|
|
494
|
+
|
|
495
|
+
## VS कोड एक्सटेंशन
|
|
496
|
+
|
|
497
|
+
Intlayer के साथ अपने विकास अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS कोड एक्सटेंशन** इंस्टॉल कर सकते हैं।
|
|
498
|
+
|
|
499
|
+
[VS कोड मार्केटप्लेस से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
500
|
+
|
|
501
|
+
यह एक्सटेंशन प्रदान करता है:
|
|
502
|
+
|
|
503
|
+
- अनुवाद कुंजियों के लिए **ऑटोकंप्लीशन**
|
|
504
|
+
- गायब अनुवादों के लिए **रियल-टाइम त्रुटि पहचान**
|
|
505
|
+
- अनुवादित सामग्री के **इनलाइन पूर्वावलोकन**
|
|
506
|
+
- **त्वरित क्रियाएं** जो अनुवादों को आसानी से बनाने और अपडेट करने में मदद करती हैं।
|
|
507
|
+
|
|
508
|
+
एक्सटेंशन का उपयोग कैसे करें, इसके लिए अधिक जानकारी के लिए देखें [Intlayer VS कोड एक्सटेंशन दस्तावेज़](https://intlayer.org/doc/vs-code-extension)।
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## आगे बढ़ें
|
|
513
|
+
|
|
514
|
+
आगे बढ़ने के लिए, आप [विज़ुअल एडिटर](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_visual_editor.md) को लागू कर सकते हैं या अपनी सामग्री को [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_CMS.md) का उपयोग करके बाहरी कर सकते हैं।
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## दस्तावेज़ संदर्भ
|
|
519
|
+
|
|
520
|
+
- [Intlayer दस्तावेज़](https://intlayer.org)
|
|
521
|
+
- [React Router v7 दस्तावेज़](https://reactrouter.com/)
|
|
522
|
+
- [useIntlayer हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useIntlayer.md)
|
|
523
|
+
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useLocale.md)
|
|
524
|
+
- [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md)
|
|
525
|
+
- [कॉन्फ़िगरेशन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md)
|
|
526
|
+
|
|
527
|
+
यह व्यापक मार्गदर्शिका आपको Intlayer को React Router v7 के साथ पूरी तरह से अंतरराष्ट्रीयकृत एप्लिकेशन के लिए एकीकृत करने में आवश्यक सभी जानकारी प्रदान करती है, जिसमें स्थानीय-जानकारी वाले रूटिंग और TypeScript समर्थन शामिल हैं।
|
|
528
|
+
|
|
529
|
+
## दस्तावेज़ इतिहास
|
|
530
|
+
|
|
531
|
+
| संस्करण | तिथि | परिवर्तन |
|
|
532
|
+
| ------- | --------- | -------------------------------- |
|
|
533
|
+
| 5.8.2 | 2025-09-4 | React Router v7 के लिए जोड़ा गया |
|