@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,540 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-09-04
|
|
3
|
+
updatedAt: 2025-09-04
|
|
4
|
+
title: React Router v7에서 Intlayer로 시작하는 국제화(i18n)
|
|
5
|
+
description: Intlayer를 사용하여 React Router v7 애플리케이션에 국제화(i18n)를 추가하는 방법을 배우세요. 로케일 인식 라우팅으로 앱을 다국어 지원으로 만드는 종합 가이드입니다.
|
|
6
|
+
keywords:
|
|
7
|
+
- 국제화
|
|
8
|
+
- 문서
|
|
9
|
+
- Intlayer
|
|
10
|
+
- React Router v7
|
|
11
|
+
- React
|
|
12
|
+
- i18n
|
|
13
|
+
- TypeScript
|
|
14
|
+
- 로케일 라우팅
|
|
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
|
+
이 가이드는 React Router v7 프로젝트에서 로케일 인식 라우팅, TypeScript 지원 및 최신 개발 방식을 활용하여 **Intlayer**를 원활한 국제화(i18n) 통합에 사용하는 방법을 보여줍니다.
|
|
27
|
+
|
|
28
|
+
## Intlayer란 무엇인가요?
|
|
29
|
+
|
|
30
|
+
**Intlayer**는 현대 웹 애플리케이션에서 다국어 지원을 간소화하기 위해 설계된 혁신적이고 오픈 소스인 국제화(i18n) 라이브러리입니다.
|
|
31
|
+
|
|
32
|
+
Intlayer를 사용하면 다음을 할 수 있습니다:
|
|
33
|
+
|
|
34
|
+
- **컴포넌트 수준에서 선언적 사전을 사용하여 번역을 쉽게 관리**할 수 있습니다.
|
|
35
|
+
- **메타데이터, 라우트 및 콘텐츠를 동적으로 현지화**할 수 있습니다.
|
|
36
|
+
- **자동 생성된 타입으로 TypeScript 지원을 보장**하여 자동 완성 및 오류 감지를 향상시킵니다.
|
|
37
|
+
- **동적 로케일 감지 및 전환과 같은 고급 기능**을 활용할 수 있습니다.
|
|
38
|
+
- **React Router v7의 구성 기반 라우팅 시스템을 사용하여 로케일 인식 라우팅 활성화**.
|
|
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
|
+
구성 관리, 번역, [콘텐츠 선언](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/get_started.md), 트랜스파일링 및 [CLI 명령어](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/intlayer_cli.md)를 위한 국제화 도구를 제공하는 핵심 패키지입니다.
|
|
62
|
+
|
|
63
|
+
- **react-intlayer**
|
|
64
|
+
Intlayer를 React 애플리케이션과 통합하는 패키지입니다. React 국제화를 위한 컨텍스트 프로바이더와 훅을 제공합니다.
|
|
65
|
+
|
|
66
|
+
- **vite-intlayer**
|
|
67
|
+
Intlayer를 [Vite 번들러](https://vite.dev/guide/why.html#why-bundle-for-production)와 통합하기 위한 Vite 플러그인과, 사용자의 선호 로케일 감지, 쿠키 관리, URL 리디렉션 처리를 위한 미들웨어를 포함합니다.
|
|
68
|
+
|
|
69
|
+
### 2단계: 프로젝트 구성
|
|
70
|
+
|
|
71
|
+
애플리케이션의 언어를 구성하기 위한 설정 파일을 만드세요:
|
|
72
|
+
|
|
73
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
74
|
+
import { type IntlayerConfig, Locales } from "intlayer";
|
|
75
|
+
|
|
76
|
+
const config: IntlayerConfig = {
|
|
77
|
+
internationalization: {
|
|
78
|
+
defaultLocale: Locales.ENGLISH,
|
|
79
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
80
|
+
},
|
|
81
|
+
middleware: {
|
|
82
|
+
prefixDefault: true, // URL에 항상 기본 로케일 접두사 추가
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default config;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
90
|
+
import { Locales } from "intlayer";
|
|
91
|
+
|
|
92
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
93
|
+
const config = {
|
|
94
|
+
internationalization: {
|
|
95
|
+
defaultLocale: Locales.ENGLISH,
|
|
96
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
97
|
+
},
|
|
98
|
+
middleware: {
|
|
99
|
+
prefixDefault: true,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default config;
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
107
|
+
const { Locales } = require("intlayer");
|
|
108
|
+
|
|
109
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
110
|
+
const config = {
|
|
111
|
+
internationalization: {
|
|
112
|
+
defaultLocale: Locales.ENGLISH,
|
|
113
|
+
locales: [Locales.ENGLISH, Locales.TURKISH],
|
|
114
|
+
},
|
|
115
|
+
middleware: {
|
|
116
|
+
prefixDefault: true,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
module.exports = config;
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
> 이 구성 파일을 통해 지역화된 URL, 미들웨어 리디렉션, 쿠키 이름, 콘텐츠 선언의 위치 및 확장자 설정, 콘솔에서 Intlayer 로그 비활성화 등 다양한 설정을 할 수 있습니다. 사용 가능한 모든 매개변수 목록은 [구성 문서](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/configuration.md)를 참조하세요.
|
|
124
|
+
|
|
125
|
+
### 3단계: React Router v7 라우트 구성
|
|
126
|
+
|
|
127
|
+
로케일 인식 라우트로 라우팅 구성을 설정하세요:
|
|
128
|
+
|
|
129
|
+
```typescript fileName="app/routes.ts" codeFormat="typescript"
|
|
130
|
+
import { layout, route, type RouteConfig } from "@react-router/dev/routes";
|
|
131
|
+
|
|
132
|
+
export default [
|
|
133
|
+
layout("routes/layout.tsx", [
|
|
134
|
+
route("/", "routes/page.tsx"), // 루트 페이지 - 로케일로 리디렉션
|
|
135
|
+
route("/:lang", "routes/[lang]/page.tsx"), // 로케일별 홈 페이지
|
|
136
|
+
route("/:lang/about", "routes/[lang]/about/page.tsx"), // 로케일별 소개 페이지
|
|
137
|
+
]),
|
|
138
|
+
] satisfies RouteConfig;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### 4단계: Vite 구성에 Intlayer 통합
|
|
142
|
+
|
|
143
|
+
intlayer 플러그인을 구성에 추가하세요:
|
|
144
|
+
|
|
145
|
+
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
146
|
+
import { reactRouter } from "@react-router/dev/vite";
|
|
147
|
+
import { defineConfig } from "vite";
|
|
148
|
+
import { intlayerMiddlewarePlugin, intlayerPlugin } from "vite-intlayer";
|
|
149
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
150
|
+
|
|
151
|
+
export default defineConfig({
|
|
152
|
+
plugins: [
|
|
153
|
+
reactRouter(),
|
|
154
|
+
tsconfigPaths(),
|
|
155
|
+
intlayerPlugin(),
|
|
156
|
+
intlayerMiddlewarePlugin(),
|
|
157
|
+
],
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
> `intlayerPlugin()` Vite 플러그인은 Intlayer를 Vite와 통합하는 데 사용됩니다. 이 플러그인은 콘텐츠 선언 파일을 빌드하고 개발 모드에서 이를 모니터링합니다. 또한 Vite 애플리케이션 내에서 Intlayer 환경 변수를 정의하며, 성능 최적화를 위해 별칭(alias)도 제공합니다.
|
|
162
|
+
|
|
163
|
+
### 5단계: 레이아웃 컴포넌트 생성
|
|
164
|
+
|
|
165
|
+
루트 레이아웃과 로케일별 레이아웃을 설정하세요:
|
|
166
|
+
|
|
167
|
+
#### 루트 레이아웃
|
|
168
|
+
|
|
169
|
+
```tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
|
|
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: "Learn About Us",
|
|
204
|
+
tr: "Hakkımızda Öğrenin",
|
|
205
|
+
}),
|
|
206
|
+
homeLink: t({
|
|
207
|
+
en: "Home",
|
|
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/ko/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/ko/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/ko/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
|
+
json5 fileName="tsconfig.json"
|
|
448
|
+
{
|
|
449
|
+
compilerOptions: {
|
|
450
|
+
// ... 기존 TypeScript 설정
|
|
451
|
+
},
|
|
452
|
+
include: [
|
|
453
|
+
// ... 기존 포함 항목
|
|
454
|
+
".intlayer/**/*.ts", // 자동 생성된 타입 포함
|
|
455
|
+
],
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Git 설정
|
|
460
|
+
|
|
461
|
+
Intlayer가 생성하는 파일들은 Git 저장소에 커밋하지 않도록 무시하는 것이 권장됩니다.
|
|
462
|
+
|
|
463
|
+
이를 위해 `.gitignore` 파일에 다음 내용을 추가할 수 있습니다:
|
|
464
|
+
|
|
465
|
+
```plaintext fileName=".gitignore"
|
|
466
|
+
# Intlayer가 생성한 파일 무시
|
|
467
|
+
.intlayer
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## 프로덕션 배포
|
|
473
|
+
|
|
474
|
+
애플리케이션을 배포할 때:
|
|
475
|
+
|
|
476
|
+
1. **애플리케이션 빌드:**
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
npm run build
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
2. **Intlayer 사전 빌드:**
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
npm run intlayer:build
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
3. **프로덕션에서 미들웨어를 사용할 경우 `vite-intlayer`를 dependencies로 이동:**
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
npm install vite-intlayer --save
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
귀하의 애플리케이션은 이제 다음을 지원합니다:
|
|
495
|
+
|
|
496
|
+
- **URL 구조**: `/en`, `/en/about`, `/tr`, `/tr/about`
|
|
497
|
+
- 브라우저 환경 설정에 따른 **자동 로케일 감지**
|
|
498
|
+
- React Router v7과 함께하는 **로케일 인식 라우팅**
|
|
499
|
+
- 자동 생성 타입을 통한 **TypeScript 지원**
|
|
500
|
+
- 적절한 로케일 처리를 포함한 **서버 사이드 렌더링**
|
|
501
|
+
|
|
502
|
+
## VS Code 확장 프로그램
|
|
503
|
+
|
|
504
|
+
Intlayer와 함께 개발 경험을 향상시키기 위해 공식 **Intlayer VS Code 확장 프로그램**을 설치할 수 있습니다.
|
|
505
|
+
|
|
506
|
+
[VS Code 마켓플레이스에서 설치하기](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
507
|
+
|
|
508
|
+
이 확장 프로그램은 다음을 제공합니다:
|
|
509
|
+
|
|
510
|
+
- 번역 키에 대한 **자동 완성**
|
|
511
|
+
- 누락된 번역에 대한 **실시간 오류 감지**
|
|
512
|
+
- 번역된 콘텐츠의 **인라인 미리보기**
|
|
513
|
+
- **빠른 작업**으로 번역을 쉽게 생성하고 업데이트할 수 있습니다.
|
|
514
|
+
|
|
515
|
+
확장 기능 사용 방법에 대한 자세한 내용은 [Intlayer VS Code 확장 문서](https://intlayer.org/doc/vs-code-extension)를 참조하세요.
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## 더 나아가기
|
|
520
|
+
|
|
521
|
+
더 나아가려면 [비주얼 에디터](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/intlayer_visual_editor.md)를 구현하거나 [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/intlayer_CMS.md)를 사용하여 콘텐츠를 외부화할 수 있습니다.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## 문서 참고
|
|
526
|
+
|
|
527
|
+
- [Intlayer 문서](https://intlayer.org)
|
|
528
|
+
- [React Router v7 문서](https://reactrouter.com/)
|
|
529
|
+
- [useIntlayer 훅](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/useIntlayer.md)
|
|
530
|
+
- [useLocale 훅](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/useLocale.md)
|
|
531
|
+
- [콘텐츠 선언](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/get_started.md)
|
|
532
|
+
- [설정](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/configuration.md)
|
|
533
|
+
|
|
534
|
+
이 포괄적인 가이드는 React Router v7과 Intlayer를 통합하여 로케일 인식 라우팅과 TypeScript 지원이 포함된 완전한 국제화 애플리케이션을 구축하는 데 필요한 모든 내용을 제공합니다.
|
|
535
|
+
|
|
536
|
+
## 문서 이력
|
|
537
|
+
|
|
538
|
+
| 버전 | 날짜 | 변경 사항 |
|
|
539
|
+
| ----- | --------- | ---------------------- |
|
|
540
|
+
| 5.8.2 | 2025-09-4 | React Router v7용 추가 |
|