@intlayer/docs 5.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/ar/CI_CD.md +149 -0
- package/ar/autoFill.md +157 -0
- package/ar/concept/content/file.md +1 -0
- package/ar/configuration.md +492 -0
- package/ar/dictionary/condition.md +213 -0
- package/ar/dictionary/content_extention_customization.md +81 -0
- package/ar/dictionary/enumeration.md +221 -0
- package/ar/dictionary/file.md +209 -0
- package/ar/dictionary/function_fetching.md +190 -0
- package/ar/dictionary/get_started.md +490 -0
- package/ar/dictionary/insertion.md +161 -0
- package/ar/dictionary/markdown.md +343 -0
- package/ar/dictionary/nesting.md +249 -0
- package/ar/dictionary/translation.md +307 -0
- package/ar/header.md +7 -0
- package/ar/how_works_intlayer.md +219 -0
- package/ar/index.md +125 -0
- package/ar/interest_of_intlayer.md +132 -0
- package/ar/intlayer_CMS.md +328 -0
- package/ar/intlayer_cli.md +258 -0
- package/ar/intlayer_visual_editor.md +210 -0
- package/ar/intlayer_with_angular.md +3 -0
- package/ar/intlayer_with_create_react_app.md +1196 -0
- package/ar/intlayer_with_express.md +270 -0
- package/ar/intlayer_with_lynx+react.md +482 -0
- package/ar/intlayer_with_nextjs_14.md +1260 -0
- package/ar/intlayer_with_nextjs_15.md +1311 -0
- package/ar/intlayer_with_nextjs_page_router.md +1099 -0
- package/ar/intlayer_with_react_native+expo.md +539 -0
- package/ar/intlayer_with_vite+preact.md +1679 -0
- package/ar/intlayer_with_vite+react.md +1582 -0
- package/ar/intlayer_with_vite+solid.md +3 -0
- package/ar/intlayer_with_vite+svelte.md +3 -0
- package/ar/intlayer_with_vite+vue.md +989 -0
- package/ar/introduction.md +190 -0
- package/ar/mcp_server.md +150 -0
- package/ar/packages/@intlayer/api/index.md +31 -0
- package/ar/packages/@intlayer/chokidar/index.md +31 -0
- package/ar/packages/@intlayer/cli/index.md +1 -0
- package/ar/packages/@intlayer/config/index.md +116 -0
- package/ar/packages/@intlayer/core/index.md +25 -0
- package/ar/packages/@intlayer/design-system/index.md +21 -0
- package/ar/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/ar/packages/@intlayer/editor/index.md +21 -0
- package/ar/packages/@intlayer/editor-react/index.md +21 -0
- package/ar/packages/@intlayer/webpack/index.md +35 -0
- package/ar/packages/angular-intlayer/index.md +3 -0
- package/ar/packages/express-intlayer/index.md +232 -0
- package/ar/packages/express-intlayer/t.md +448 -0
- package/ar/packages/intlayer/getConfiguration.md +120 -0
- package/ar/packages/intlayer/getEnumeration.md +138 -0
- package/ar/packages/intlayer/getHTMLTextDir.md +97 -0
- package/ar/packages/intlayer/getLocaleLang.md +61 -0
- package/ar/packages/intlayer/getLocaleName.md +93 -0
- package/ar/packages/intlayer/getLocalizedUrl.md +221 -0
- package/ar/packages/intlayer/getMultilingualUrls.md +198 -0
- package/ar/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/ar/packages/intlayer/getTranslation.md +175 -0
- package/ar/packages/intlayer/getTranslationContent.md +175 -0
- package/ar/packages/intlayer/index.md +254 -0
- package/ar/packages/intlayer-cli/index.md +41 -0
- package/ar/packages/intlayer-editor/index.md +113 -0
- package/ar/packages/lynx-intlayer/index.md +58 -0
- package/ar/packages/next-intlayer/index.md +267 -0
- package/ar/packages/next-intlayer/t.md +341 -0
- package/ar/packages/next-intlayer/useDictionary.md +248 -0
- package/ar/packages/next-intlayer/useIntlayer.md +237 -0
- package/ar/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/ar/packages/next-intlayer/useLocale.md +105 -0
- package/ar/packages/preact-intlayer/index.md +3 -0
- package/ar/packages/react-intlayer/index.md +261 -0
- package/ar/packages/react-intlayer/t.md +283 -0
- package/ar/packages/react-intlayer/useDictionary.md +268 -0
- package/ar/packages/react-intlayer/useIntlayer.md +225 -0
- package/ar/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/ar/packages/react-intlayer/useLocale.md +184 -0
- package/ar/packages/react-native-intlayer/index.md +57 -0
- package/ar/packages/react-scripts-intlayer/index.md +57 -0
- package/ar/packages/solid-intlayer/index.md +3 -0
- package/ar/packages/svelte-intlayer/index.md +3 -0
- package/ar/packages/vite-intlayer/index.md +53 -0
- package/ar/packages/vue-intlayer/index.md +3 -0
- package/ar/per_locale_file.md +298 -0
- package/ar/privacy_notice.md +61 -0
- package/ar/roadmap.md +208 -0
- package/ar/terms_of_service.md +33 -0
- package/ar/vs_code_extension.md +139 -0
- package/de/CI_CD.md +149 -0
- package/de/angular-intlayer/index.md +3 -0
- package/de/autoFill.md +157 -0
- package/de/configuration.md +501 -0
- package/de/dictionary/condition.md +213 -0
- package/de/dictionary/content_extention_customization.md +81 -0
- package/de/dictionary/enumeration.md +221 -0
- package/de/dictionary/file.md +207 -0
- package/de/dictionary/function_fetching.md +190 -0
- package/de/dictionary/get_started.md +466 -0
- package/de/dictionary/insertion.md +167 -0
- package/de/dictionary/markdown.md +345 -0
- package/de/dictionary/nesting.md +252 -0
- package/de/dictionary/translation.md +287 -0
- package/de/header.md +5 -0
- package/de/how_works_intlayer.md +216 -0
- package/de/index.md +125 -0
- package/de/insertion.md +0 -0
- package/de/interest_of_intlayer.md +132 -0
- package/de/intlayer_CMS.md +334 -0
- package/de/intlayer_cli.md +274 -0
- package/de/intlayer_visual_editor.md +210 -0
- package/de/intlayer_with_angular.md +3 -0
- package/de/intlayer_with_create_react_app.md +1200 -0
- package/de/intlayer_with_express.md +268 -0
- package/de/intlayer_with_lynx+react.md +482 -0
- package/de/intlayer_with_nextjs_14.md +1258 -0
- package/de/intlayer_with_nextjs_15.md +1306 -0
- package/de/intlayer_with_nextjs_page_router.md +1087 -0
- package/de/intlayer_with_react_native+expo.md +539 -0
- package/de/intlayer_with_vite+preact.md +1701 -0
- package/de/intlayer_with_vite+react.md +1584 -0
- package/de/intlayer_with_vite+solid.md +3 -0
- package/de/intlayer_with_vite+svelte.md +3 -0
- package/de/intlayer_with_vite+vue.md +989 -0
- package/de/introduction.md +186 -0
- package/de/mcp_server.md +150 -0
- package/de/packages/@intlayer/api/index.md +31 -0
- package/de/packages/@intlayer/chokidar/index.md +31 -0
- package/de/packages/@intlayer/cli/index.md +21 -0
- package/de/packages/@intlayer/config/index.md +116 -0
- package/de/packages/@intlayer/core/index.md +25 -0
- package/de/packages/@intlayer/design-system/index.md +21 -0
- package/de/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/de/packages/@intlayer/editor/index.md +21 -0
- package/de/packages/@intlayer/editor-react/index.md +21 -0
- package/de/packages/@intlayer/webpack/index.md +35 -0
- package/de/packages/angular-intlayer/index.md +31 -0
- package/de/packages/express-intlayer/index.md +229 -0
- package/de/packages/express-intlayer/t.md +432 -0
- package/de/packages/intlayer/getConfiguration.md +120 -0
- package/de/packages/intlayer/getEnumeration.md +140 -0
- package/de/packages/intlayer/getHTMLTextDir.md +97 -0
- package/de/packages/intlayer/getLocaleLang.md +57 -0
- package/de/packages/intlayer/getLocaleName.md +93 -0
- package/de/packages/intlayer/getLocalizedUrl.md +221 -0
- package/de/packages/intlayer/getMultilingualUrls.md +198 -0
- package/de/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/de/packages/intlayer/getTranslation.md +166 -0
- package/de/packages/intlayer/getTranslationContent.md +166 -0
- package/de/packages/intlayer/index.md +478 -0
- package/de/packages/intlayer-cli/index.md +41 -0
- package/de/packages/intlayer-editor/index.md +113 -0
- package/de/packages/lynx-intlayer/index.md +58 -0
- package/de/packages/next-intlayer/index.md +263 -0
- package/de/packages/next-intlayer/t.md +325 -0
- package/de/packages/next-intlayer/useDictionary.md +242 -0
- package/de/packages/next-intlayer/useIntlayer.md +237 -0
- package/de/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/de/packages/next-intlayer/useLocale.md +105 -0
- package/de/packages/preact-intlayer/index.md +3 -0
- package/de/packages/react-intlayer/index.md +260 -0
- package/de/packages/react-intlayer/t.md +277 -0
- package/de/packages/react-intlayer/useDictionary.md +260 -0
- package/de/packages/react-intlayer/useIntlayer.md +225 -0
- package/de/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/de/packages/react-intlayer/useLocale.md +184 -0
- package/de/packages/react-native-intlayer/index.md +57 -0
- package/de/packages/react-scripts-intlayer/index.md +57 -0
- package/de/packages/solid-intlayer/index.md +3 -0
- package/de/packages/svelte-intlayer/index.md +3 -0
- package/de/packages/vite-intlayer/index.md +53 -0
- package/de/packages/vue-intlayer/index.md +3 -0
- package/de/per_locale_file.md +298 -0
- package/de/privacy_notice.md +61 -0
- package/de/roadmap.md +206 -0
- package/de/terms_of_service.md +33 -0
- package/de/vs_code_extension.md +139 -0
- package/en/CI_CD.md +149 -0
- package/en/autoFill.md +157 -0
- package/en/configuration.md +506 -0
- package/en/dictionary/condition.md +213 -0
- package/en/dictionary/content_extention_customization.md +81 -0
- package/en/dictionary/enumeration.md +221 -0
- package/en/dictionary/file.md +198 -0
- package/en/dictionary/function_fetching.md +190 -0
- package/en/dictionary/get_started.md +504 -0
- package/en/dictionary/insertion.md +167 -0
- package/en/dictionary/markdown.md +355 -0
- package/en/dictionary/nesting.md +249 -0
- package/en/dictionary/translation.md +285 -0
- package/en/frequent_questions/build_dictionaries.md +37 -0
- package/en/frequent_questions/domain_routing.md +92 -0
- package/en/frequent_questions/esbuild_error.md +9 -0
- package/en/frequent_questions/get_locale_cookie.md +121 -0
- package/en/frequent_questions/intlayer_command_undefined.md +135 -0
- package/en/frequent_questions/locale_incorect_in_url.md +52 -0
- package/en/frequent_questions/static_rendering.md +24 -0
- package/en/frequent_questions/unknown_command.md +76 -0
- package/en/header.md +5 -0
- package/en/how_works_intlayer.md +219 -0
- package/en/index.md +139 -0
- package/en/interest_of_intlayer.md +133 -0
- package/en/intlayer_CMS.md +334 -0
- package/en/intlayer_cli.md +309 -0
- package/en/intlayer_visual_editor.md +244 -0
- package/en/intlayer_with_angular.md +139 -0
- package/en/intlayer_with_create_react_app.md +1209 -0
- package/en/intlayer_with_express.md +391 -0
- package/en/intlayer_with_lynx+react.md +483 -0
- package/en/intlayer_with_nextjs_14.md +1298 -0
- package/en/intlayer_with_nextjs_15.md +1347 -0
- package/en/intlayer_with_nextjs_page_router.md +1126 -0
- package/en/intlayer_with_react_native+expo.md +630 -0
- package/en/intlayer_with_vite+preact.md +1659 -0
- package/en/intlayer_with_vite+react.md +1605 -0
- package/en/intlayer_with_vite+solid.md +254 -0
- package/en/intlayer_with_vite+svelte.md +254 -0
- package/en/intlayer_with_vite+vue.md +1000 -0
- package/en/introduction.md +185 -0
- package/en/mcp_server.md +150 -0
- package/en/packages/@intlayer/api/index.md +31 -0
- package/en/packages/@intlayer/chokidar/index.md +31 -0
- package/en/packages/@intlayer/cli/index.md +21 -0
- package/en/packages/@intlayer/config/index.md +116 -0
- package/en/packages/@intlayer/core/index.md +25 -0
- package/en/packages/@intlayer/design-system/index.md +21 -0
- package/en/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/en/packages/@intlayer/editor/index.md +21 -0
- package/en/packages/@intlayer/editor-react/index.md +21 -0
- package/en/packages/@intlayer/webpack/index.md +35 -0
- package/en/packages/angular-intlayer/index.md +31 -0
- package/en/packages/express-intlayer/index.md +229 -0
- package/en/packages/express-intlayer/t.md +432 -0
- package/en/packages/intlayer/getConfiguration.md +120 -0
- package/en/packages/intlayer/getEnumeration.md +138 -0
- package/en/packages/intlayer/getHTMLTextDir.md +97 -0
- package/en/packages/intlayer/getLocaleLang.md +57 -0
- package/en/packages/intlayer/getLocaleName.md +93 -0
- package/en/packages/intlayer/getLocalizedUrl.md +221 -0
- package/en/packages/intlayer/getMultilingualUrls.md +198 -0
- package/en/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/en/packages/intlayer/getTranslation.md +166 -0
- package/en/packages/intlayer/getTranslationContent.md +166 -0
- package/en/packages/intlayer/index.md +476 -0
- package/en/packages/intlayer-cli/index.md +41 -0
- package/en/packages/intlayer-editor/index.md +113 -0
- package/en/packages/lynx-intlayer/index.md +60 -0
- package/en/packages/next-intlayer/index.md +263 -0
- package/en/packages/next-intlayer/t.md +326 -0
- package/en/packages/next-intlayer/useDictionary.md +242 -0
- package/en/packages/next-intlayer/useIntlayer.md +237 -0
- package/en/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/en/packages/next-intlayer/useLocale.md +105 -0
- package/en/packages/preact-intlayer/index.md +31 -0
- package/en/packages/react-intlayer/index.md +257 -0
- package/en/packages/react-intlayer/t.md +277 -0
- package/en/packages/react-intlayer/useDictionary.md +260 -0
- package/en/packages/react-intlayer/useIntlayer.md +225 -0
- package/en/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/en/packages/react-intlayer/useLocale.md +184 -0
- package/en/packages/react-native-intlayer/index.md +59 -0
- package/en/packages/react-scripts-intlayer/index.md +57 -0
- package/en/packages/solid-intlayer/index.md +31 -0
- package/en/packages/svelte-intlayer/index.md +31 -0
- package/en/packages/vite-intlayer/index.md +53 -0
- package/en/packages/vue-intlayer/index.md +31 -0
- package/en/per_locale_file.md +297 -0
- package/en/privacy_notice.md +61 -0
- package/en/roadmap.md +270 -0
- package/en/t.md +163 -0
- package/en/terms_of_service.md +33 -0
- package/en/vs_code_extension.md +129 -0
- package/en-GB/CI_CD.md +149 -0
- package/en-GB/autoFill.md +0 -0
- package/en-GB/configuration.md +490 -0
- package/en-GB/dictionary/condition.md +213 -0
- package/en-GB/dictionary/content_extention_customization.md +83 -0
- package/en-GB/dictionary/enumeration.md +221 -0
- package/en-GB/dictionary/file.md +201 -0
- package/en-GB/dictionary/function_fetching.md +190 -0
- package/en-GB/dictionary/get_started.md +466 -0
- package/en-GB/dictionary/insertion.md +167 -0
- package/en-GB/dictionary/markdown.md +343 -0
- package/en-GB/dictionary/nesting.md +249 -0
- package/en-GB/dictionary/translation.md +285 -0
- package/en-GB/header.md +1 -0
- package/en-GB/how_works_intlayer.md +217 -0
- package/en-GB/index.md +142 -0
- package/en-GB/interest_of_intlayer.md +123 -0
- package/en-GB/intlayer_CMS.md +334 -0
- package/en-GB/intlayer_cli.md +239 -0
- package/en-GB/intlayer_visual_editor.md +210 -0
- package/en-GB/intlayer_with_angular.md +3 -0
- package/en-GB/intlayer_with_create_react_app.md +1192 -0
- package/en-GB/intlayer_with_express.md +267 -0
- package/en-GB/intlayer_with_lynx+react.md +484 -0
- package/en-GB/intlayer_with_nextjs_14.md +1267 -0
- package/en-GB/intlayer_with_nextjs_15.md +1308 -0
- package/en-GB/intlayer_with_nextjs_page_router.md +1087 -0
- package/en-GB/intlayer_with_react_native+expo.md +539 -0
- package/en-GB/intlayer_with_vite+preact.md +1648 -0
- package/en-GB/intlayer_with_vite+react.md +1430 -0
- package/en-GB/intlayer_with_vite+solid.md +3 -0
- package/en-GB/intlayer_with_vite+svelte.md +3 -0
- package/en-GB/intlayer_with_vite+vue.md +993 -0
- package/en-GB/introduction.md +201 -0
- package/en-GB/mcp_server.md +150 -0
- package/en-GB/packages/@intlayer/api/index.md +31 -0
- package/en-GB/packages/@intlayer/chokidar/index.md +31 -0
- package/en-GB/packages/@intlayer/cli/index.md +21 -0
- package/en-GB/packages/@intlayer/config/index.md +116 -0
- package/en-GB/packages/@intlayer/core/index.md +25 -0
- package/en-GB/packages/@intlayer/design-system/index.md +21 -0
- package/en-GB/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/en-GB/packages/@intlayer/editor/index.md +21 -0
- package/en-GB/packages/@intlayer/editor-react/index.md +21 -0
- package/en-GB/packages/@intlayer/webpack/index.md +35 -0
- package/en-GB/packages/angular-intlayer/index.md +3 -0
- package/en-GB/packages/express-intlayer/index.md +229 -0
- package/en-GB/packages/express-intlayer/t.md +432 -0
- package/en-GB/packages/intlayer/getConfiguration.md +120 -0
- package/en-GB/packages/intlayer/getEnumeration.md +140 -0
- package/en-GB/packages/intlayer/getHTMLTextDir.md +97 -0
- package/en-GB/packages/intlayer/getLocaleLang.md +57 -0
- package/en-GB/packages/intlayer/getLocaleName.md +93 -0
- package/en-GB/packages/intlayer/getLocalizedUrl.md +221 -0
- package/en-GB/packages/intlayer/getMultilingualUrls.md +198 -0
- package/en-GB/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/en-GB/packages/intlayer/getTranslation.md +166 -0
- package/en-GB/packages/intlayer/getTranslationContent.md +166 -0
- package/en-GB/packages/intlayer/index.md +476 -0
- package/en-GB/packages/intlayer-cli/index.md +41 -0
- package/en-GB/packages/intlayer-editor/index.md +113 -0
- package/en-GB/packages/lynx-intlayer/index.md +58 -0
- package/en-GB/packages/next-intlayer/index.md +263 -0
- package/en-GB/packages/next-intlayer/t.md +326 -0
- package/en-GB/packages/next-intlayer/useDictionary.md +242 -0
- package/en-GB/packages/next-intlayer/useIntlayer.md +237 -0
- package/en-GB/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/en-GB/packages/next-intlayer/useLocale.md +105 -0
- package/en-GB/packages/preact-intlayer/index.md +3 -0
- package/en-GB/packages/react-intlayer/index.md +257 -0
- package/en-GB/packages/react-intlayer/t.md +277 -0
- package/en-GB/packages/react-intlayer/useDictionary.md +260 -0
- package/en-GB/packages/react-intlayer/useIntlayer.md +225 -0
- package/en-GB/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/en-GB/packages/react-intlayer/useLocale.md +184 -0
- package/en-GB/packages/react-native-intlayer/index.md +57 -0
- package/en-GB/packages/react-scripts-intlayer/index.md +57 -0
- package/en-GB/packages/solid-intlayer/index.md +3 -0
- package/en-GB/packages/svelte-intlayer/index.md +3 -0
- package/en-GB/packages/vite-intlayer/index.md +53 -0
- package/en-GB/packages/vue-intlayer/index.md +3 -0
- package/en-GB/per_locale_file.md +298 -0
- package/en-GB/privacy_notice.md +57 -0
- package/en-GB/roadmap.md +206 -0
- package/en-GB/terms_of_service.md +33 -0
- package/en-GB/vs_code_extension.md +139 -0
- package/es/CI_CD.md +149 -0
- package/es/autoFill.md +157 -0
- package/es/configuration.md +503 -0
- package/es/dictionary/condition.md +213 -0
- package/es/dictionary/content_extention_customization.md +81 -0
- package/es/dictionary/enumeration.md +221 -0
- package/es/dictionary/file.md +206 -0
- package/es/dictionary/function_fetching.md +190 -0
- package/es/dictionary/get_started.md +466 -0
- package/es/dictionary/insertion.md +161 -0
- package/es/dictionary/markdown.md +338 -0
- package/es/dictionary/nesting.md +249 -0
- package/es/dictionary/translation.md +287 -0
- package/es/header.md +5 -0
- package/es/how_works_intlayer.md +217 -0
- package/es/index.md +122 -0
- package/es/interest_of_intlayer.md +132 -0
- package/es/intlayer_CMS.md +334 -0
- package/es/intlayer_cli.md +274 -0
- package/es/intlayer_visual_editor.md +210 -0
- package/es/intlayer_with_angular.md +3 -0
- package/es/intlayer_with_create_react_app.md +1192 -0
- package/es/intlayer_with_express.md +276 -0
- package/es/intlayer_with_lynx+react.md +475 -0
- package/es/intlayer_with_nextjs_14.md +1258 -0
- package/es/intlayer_with_nextjs_15.md +1308 -0
- package/es/intlayer_with_nextjs_page_router.md +1088 -0
- package/es/intlayer_with_react_native+expo.md +180 -0
- package/es/intlayer_with_vite+preact.md +1637 -0
- package/es/intlayer_with_vite+react.md +1592 -0
- package/es/intlayer_with_vite+solid.md +3 -0
- package/es/intlayer_with_vite+svelte.md +3 -0
- package/es/intlayer_with_vite+vue.md +947 -0
- package/es/introduction.md +184 -0
- package/es/mcp_server.md +150 -0
- package/es/packages/@intlayer/api/index.md +31 -0
- package/es/packages/@intlayer/chokidar/index.md +31 -0
- package/es/packages/@intlayer/cli/index.md +21 -0
- package/es/packages/@intlayer/config/index.md +116 -0
- package/es/packages/@intlayer/core/index.md +25 -0
- package/es/packages/@intlayer/design-system/index.md +21 -0
- package/es/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/es/packages/@intlayer/editor/index.md +21 -0
- package/es/packages/@intlayer/editor-react/index.md +21 -0
- package/es/packages/@intlayer/webpack/index.md +35 -0
- package/es/packages/angular-intlayer/index.md +3 -0
- package/es/packages/express-intlayer/index.md +229 -0
- package/es/packages/express-intlayer/t.md +432 -0
- package/es/packages/intlayer/getConfiguration.md +120 -0
- package/es/packages/intlayer/getEnumeration.md +138 -0
- package/es/packages/intlayer/getHTMLTextDir.md +97 -0
- package/es/packages/intlayer/getLocaleLang.md +57 -0
- package/es/packages/intlayer/getLocaleName.md +93 -0
- package/es/packages/intlayer/getLocalizedUrl.md +221 -0
- package/es/packages/intlayer/getMultilingualUrls.md +198 -0
- package/es/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/es/packages/intlayer/getTranslation.md +166 -0
- package/es/packages/intlayer/getTranslationContent.md +166 -0
- package/es/packages/intlayer/index.md +478 -0
- package/es/packages/intlayer-cli/index.md +41 -0
- package/es/packages/intlayer-editor/index.md +115 -0
- package/es/packages/lynx-intlayer/index.md +58 -0
- package/es/packages/next-intlayer/index.md +263 -0
- package/es/packages/next-intlayer/t.md +325 -0
- package/es/packages/next-intlayer/useDictionary.md +242 -0
- package/es/packages/next-intlayer/useIntlayer.md +237 -0
- package/es/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/es/packages/next-intlayer/useLocale.md +105 -0
- package/es/packages/preact-intlayer/index.md +3 -0
- package/es/packages/react-intlayer/index.md +263 -0
- package/es/packages/react-intlayer/t.md +277 -0
- package/es/packages/react-intlayer/useDictionary.md +270 -0
- package/es/packages/react-intlayer/useIntlayer.md +225 -0
- package/es/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/es/packages/react-intlayer/useLocale.md +184 -0
- package/es/packages/react-native-intlayer/index.md +57 -0
- package/es/packages/react-scripts-intlayer/index.md +57 -0
- package/es/packages/solid-intlayer/index.md +3 -0
- package/es/packages/svelte-intlayer/index.md +5 -0
- package/es/packages/vite-intlayer/index.md +53 -0
- package/es/packages/vue-intlayer/index.md +3 -0
- package/es/per_locale_file.md +293 -0
- package/es/privacy_notice.md +61 -0
- package/es/roadmap.md +157 -0
- package/es/terms_of_service.md +33 -0
- package/es/vs_code_extension.md +139 -0
- package/fr/CI_CD.md +149 -0
- package/fr/autoFill.md +157 -0
- package/fr/configuration.md +481 -0
- package/fr/dictionary/condition.md +213 -0
- package/fr/dictionary/content_extention_customization.md +81 -0
- package/fr/dictionary/enumeration.md +221 -0
- package/fr/dictionary/file.md +206 -0
- package/fr/dictionary/function_fetching.md +190 -0
- package/fr/dictionary/get_started.md +466 -0
- package/fr/dictionary/insertion.md +161 -0
- package/fr/dictionary/markdown.md +335 -0
- package/fr/dictionary/nesting.md +249 -0
- package/fr/dictionary/translation.md +287 -0
- package/fr/header.md +5 -0
- package/fr/how_works_intlayer.md +217 -0
- package/fr/index.md +122 -0
- package/fr/interest_of_intlayer.md +132 -0
- package/fr/intlayer_CMS.md +334 -0
- package/fr/intlayer_cli.md +274 -0
- package/fr/intlayer_visual_editor.md +210 -0
- package/fr/intlayer_with_angular.md +3 -0
- package/fr/intlayer_with_create_react_app.md +1192 -0
- package/fr/intlayer_with_express.md +270 -0
- package/fr/intlayer_with_lynx+react.md +466 -0
- package/fr/intlayer_with_nextjs_14.md +1258 -0
- package/fr/intlayer_with_nextjs_15.md +1308 -0
- package/fr/intlayer_with_nextjs_page_router.md +1085 -0
- package/fr/intlayer_with_react_native+expo.md +535 -0
- package/fr/intlayer_with_vite+preact.md +1621 -0
- package/fr/intlayer_with_vite+react.md +1589 -0
- package/fr/intlayer_with_vite+solid.md +3 -0
- package/fr/intlayer_with_vite+svelte.md +3 -0
- package/fr/intlayer_with_vite+vue.md +947 -0
- package/fr/introduction.md +190 -0
- package/fr/mcp_server.md +152 -0
- package/fr/packages/@intlayer/api/index.md +31 -0
- package/fr/packages/@intlayer/chokidar/index.md +31 -0
- package/fr/packages/@intlayer/cli/index.md +21 -0
- package/fr/packages/@intlayer/config/index.md +116 -0
- package/fr/packages/@intlayer/core/index.md +25 -0
- package/fr/packages/@intlayer/design-system/index.md +21 -0
- package/fr/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/fr/packages/@intlayer/editor/index.md +21 -0
- package/fr/packages/@intlayer/editor-react/index.md +21 -0
- package/fr/packages/@intlayer/webpack/index.md +35 -0
- package/fr/packages/angular-intlayer/index.md +3 -0
- package/fr/packages/express-intlayer/index.md +238 -0
- package/fr/packages/express-intlayer/t.md +432 -0
- package/fr/packages/intlayer/getConfiguration.md +120 -0
- package/fr/packages/intlayer/getEnumeration.md +138 -0
- package/fr/packages/intlayer/getHTMLTextDir.md +97 -0
- package/fr/packages/intlayer/getLocaleLang.md +57 -0
- package/fr/packages/intlayer/getLocaleName.md +93 -0
- package/fr/packages/intlayer/getLocalizedUrl.md +221 -0
- package/fr/packages/intlayer/getMultilingualUrls.md +198 -0
- package/fr/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/fr/packages/intlayer/getTranslation.md +166 -0
- package/fr/packages/intlayer/getTranslationContent.md +166 -0
- package/fr/packages/intlayer/index.md +476 -0
- package/fr/packages/intlayer-cli/index.md +41 -0
- package/fr/packages/intlayer-editor/index.md +115 -0
- package/fr/packages/lynx-intlayer/index.md +58 -0
- package/fr/packages/next-intlayer/index.md +266 -0
- package/fr/packages/next-intlayer/t.md +325 -0
- package/fr/packages/next-intlayer/useDictionary.md +242 -0
- package/fr/packages/next-intlayer/useIntlayer.md +237 -0
- package/fr/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/fr/packages/next-intlayer/useLocale.md +105 -0
- package/fr/packages/preact-intlayer/index.md +3 -0
- package/fr/packages/react-intlayer/index.md +257 -0
- package/fr/packages/react-intlayer/t.md +277 -0
- package/fr/packages/react-intlayer/useDictionary.md +269 -0
- package/fr/packages/react-intlayer/useIntlayer.md +234 -0
- package/fr/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/fr/packages/react-intlayer/useLocale.md +184 -0
- package/fr/packages/react-native-intlayer/index.md +57 -0
- package/fr/packages/react-scripts-intlayer/index.md +57 -0
- package/fr/packages/solid-intlayer/index.md +3 -0
- package/fr/packages/svelte-intlayer/index.md +3 -0
- package/fr/packages/vite-intlayer/index.md +53 -0
- package/fr/packages/vue-intlayer/index.md +3 -0
- package/fr/per_locale_file.md +297 -0
- package/fr/privacy_notice.md +57 -0
- package/fr/roadmap.md +206 -0
- package/fr/terms_of_service.md +33 -0
- package/fr/vs_code_extension.md +139 -0
- package/hi/CI_CD.md +149 -0
- package/hi/autoFill.md +157 -0
- package/hi/configuration.md +509 -0
- package/hi/dictionary/condition.md +213 -0
- package/hi/dictionary/content_extention_customization.md +81 -0
- package/hi/dictionary/enumeration.md +221 -0
- package/hi/dictionary/file.md +209 -0
- package/hi/dictionary/function_fetching.md +188 -0
- package/hi/dictionary/get_started.md +490 -0
- package/hi/dictionary/insertion.md +167 -0
- package/hi/dictionary/markdown.md +344 -0
- package/hi/dictionary/nesting.md +249 -0
- package/hi/dictionary/translation.md +307 -0
- package/hi/header.md +7 -0
- package/hi/how_works_intlayer.md +217 -0
- package/hi/index.md +125 -0
- package/hi/interest_of_intlayer.md +132 -0
- package/hi/intlayer_CMS.md +334 -0
- package/hi/intlayer_cli.md +274 -0
- package/hi/intlayer_visual_editor.md +210 -0
- package/hi/intlayer_with_angular.md +3 -0
- package/hi/intlayer_with_create_react_app.md +1395 -0
- package/hi/intlayer_with_express.md +273 -0
- package/hi/intlayer_with_lynx+react.md +456 -0
- package/hi/intlayer_with_nextjs_14.md +1283 -0
- package/hi/intlayer_with_nextjs_15.md +1319 -0
- package/hi/intlayer_with_nextjs_page_router.md +1097 -0
- package/hi/intlayer_with_react_native+expo.md +554 -0
- package/hi/intlayer_with_vite+preact.md +1538 -0
- package/hi/intlayer_with_vite+react.md +1540 -0
- package/hi/intlayer_with_vite+solid.md +3 -0
- package/hi/intlayer_with_vite+svelte.md +3 -0
- package/hi/intlayer_with_vite+vue.md +840 -0
- package/hi/introduction.md +190 -0
- package/hi/mcp_server.md +150 -0
- package/hi/packages/@intlayer/api/index.md +31 -0
- package/hi/packages/@intlayer/chokidar/index.md +31 -0
- package/hi/packages/@intlayer/cli/index.md +21 -0
- package/hi/packages/@intlayer/config/index.md +116 -0
- package/hi/packages/@intlayer/core/index.md +25 -0
- package/hi/packages/@intlayer/design-system/index.md +21 -0
- package/hi/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/hi/packages/@intlayer/editor/index.md +21 -0
- package/hi/packages/@intlayer/editor-react/index.md +21 -0
- package/hi/packages/@intlayer/webpack/index.md +35 -0
- package/hi/packages/angular-intlayer/index.md +3 -0
- package/hi/packages/express-intlayer/index.md +232 -0
- package/hi/packages/express-intlayer/t.md +445 -0
- package/hi/packages/intlayer/getConfiguration.md +120 -0
- package/hi/packages/intlayer/getEnumeration.md +138 -0
- package/hi/packages/intlayer/getHTMLTextDir.md +97 -0
- package/hi/packages/intlayer/getLocaleLang.md +57 -0
- package/hi/packages/intlayer/getLocaleName.md +93 -0
- package/hi/packages/intlayer/getLocalizedUrl.md +221 -0
- package/hi/packages/intlayer/getMultilingualUrls.md +198 -0
- package/hi/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/hi/packages/intlayer/getTranslation.md +175 -0
- package/hi/packages/intlayer/getTranslationContent.md +175 -0
- package/hi/packages/intlayer/index.md +314 -0
- package/hi/packages/intlayer-cli/index.md +41 -0
- package/hi/packages/intlayer-editor/index.md +113 -0
- package/hi/packages/lynx-intlayer/index.md +58 -0
- package/hi/packages/next-intlayer/index.md +270 -0
- package/hi/packages/next-intlayer/t.md +337 -0
- package/hi/packages/next-intlayer/useDictionary.md +248 -0
- package/hi/packages/next-intlayer/useIntlayer.md +237 -0
- package/hi/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/hi/packages/next-intlayer/useLocale.md +105 -0
- package/hi/packages/preact-intlayer/index.md +3 -0
- package/hi/packages/react-intlayer/index.md +261 -0
- package/hi/packages/react-intlayer/t.md +283 -0
- package/hi/packages/react-intlayer/useDictionary.md +268 -0
- package/hi/packages/react-intlayer/useIntlayer.md +225 -0
- package/hi/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/hi/packages/react-intlayer/useLocale.md +184 -0
- package/hi/packages/react-native-intlayer/index.md +57 -0
- package/hi/packages/react-scripts-intlayer/index.md +57 -0
- package/hi/packages/solid-intlayer/index.md +3 -0
- package/hi/packages/svelte-intlayer/index.md +3 -0
- package/hi/packages/vite-intlayer/index.md +53 -0
- package/hi/packages/vue-intlayer/index.md +3 -0
- package/hi/per_locale_file.md +298 -0
- package/hi/privacy_notice.md +61 -0
- package/hi/roadmap.md +206 -0
- package/hi/terms_of_service.md +33 -0
- package/hi/vs_code_extension.md +139 -0
- package/index.cjs +1265 -0
- package/index.d.ts +100 -0
- package/it/CI_CD.md +149 -0
- package/it/autoFill.md +157 -0
- package/it/configuration.md +503 -0
- package/it/dictionary/condition.md +213 -0
- package/it/dictionary/content_extention_customization.md +81 -0
- package/it/dictionary/enumeration.md +221 -0
- package/it/dictionary/file.md +207 -0
- package/it/dictionary/function_fetching.md +190 -0
- package/it/dictionary/get_started.md +466 -0
- package/it/dictionary/insertion.md +161 -0
- package/it/dictionary/markdown.md +343 -0
- package/it/dictionary/nesting.md +249 -0
- package/it/dictionary/translation.md +287 -0
- package/it/header.md +7 -0
- package/it/how_works_intlayer.md +217 -0
- package/it/index.md +125 -0
- package/it/interest_of_intlayer.md +132 -0
- package/it/intlayer_CMS.md +334 -0
- package/it/intlayer_cli.md +274 -0
- package/it/intlayer_visual_editor.md +210 -0
- package/it/intlayer_with_angular.md +3 -0
- package/it/intlayer_with_create_react_app.md +413 -0
- package/it/intlayer_with_express.md +267 -0
- package/it/intlayer_with_lynx+react.md +482 -0
- package/it/intlayer_with_nextjs_14.md +1269 -0
- package/it/intlayer_with_nextjs_15.md +1319 -0
- package/it/intlayer_with_nextjs_page_router.md +1095 -0
- package/it/intlayer_with_react_native+expo.md +261 -0
- package/it/intlayer_with_vite+preact.md +1681 -0
- package/it/intlayer_with_vite+react.md +1580 -0
- package/it/intlayer_with_vite+solid.md +3 -0
- package/it/intlayer_with_vite+svelte.md +3 -0
- package/it/intlayer_with_vite+vue.md +989 -0
- package/it/introduction.md +192 -0
- package/it/mcp_server.md +152 -0
- package/it/packages/@intlayer/api/index.md +31 -0
- package/it/packages/@intlayer/chokidar/index.md +31 -0
- package/it/packages/@intlayer/cli/index.md +21 -0
- package/it/packages/@intlayer/config/index.md +116 -0
- package/it/packages/@intlayer/core/index.md +25 -0
- package/it/packages/@intlayer/design-system/index.md +21 -0
- package/it/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/it/packages/@intlayer/editor/index.md +21 -0
- package/it/packages/@intlayer/editor-react/index.md +21 -0
- package/it/packages/@intlayer/webpack/index.md +35 -0
- package/it/packages/angular-intlayer/index.md +3 -0
- package/it/packages/express-intlayer/index.md +229 -0
- package/it/packages/express-intlayer/t.md +432 -0
- package/it/packages/intlayer/getConfiguration.md +120 -0
- package/it/packages/intlayer/getEnumeration.md +138 -0
- package/it/packages/intlayer/getHTMLTextDir.md +97 -0
- package/it/packages/intlayer/getLocaleLang.md +57 -0
- package/it/packages/intlayer/getLocaleName.md +93 -0
- package/it/packages/intlayer/getLocalizedUrl.md +221 -0
- package/it/packages/intlayer/getMultilingualUrls.md +200 -0
- package/it/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/it/packages/intlayer/getTranslation.md +166 -0
- package/it/packages/intlayer/getTranslationContent.md +166 -0
- package/it/packages/intlayer/index.md +479 -0
- package/it/packages/intlayer-cli/index.md +41 -0
- package/it/packages/intlayer-editor/index.md +113 -0
- package/it/packages/lynx-intlayer/index.md +58 -0
- package/it/packages/next-intlayer/index.md +267 -0
- package/it/packages/next-intlayer/t.md +326 -0
- package/it/packages/next-intlayer/useDictionary.md +242 -0
- package/it/packages/next-intlayer/useIntlayer.md +237 -0
- package/it/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/it/packages/next-intlayer/useLocale.md +105 -0
- package/it/packages/preact-intlayer/index.md +3 -0
- package/it/packages/react-intlayer/index.md +260 -0
- package/it/packages/react-intlayer/t.md +277 -0
- package/it/packages/react-intlayer/useDictionary.md +260 -0
- package/it/packages/react-intlayer/useIntlayer.md +225 -0
- package/it/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/it/packages/react-intlayer/useLocale.md +184 -0
- package/it/packages/react-native-intlayer/index.md +57 -0
- package/it/packages/react-scripts-intlayer/index.md +57 -0
- package/it/packages/solid-intlayer/index.md +5 -0
- package/it/packages/svelte-intlayer/index.md +3 -0
- package/it/packages/vite-intlayer/index.md +53 -0
- package/it/packages/vue-intlayer/index.md +5 -0
- package/it/per_locale_file.md +298 -0
- package/it/privacy_notice.md +61 -0
- package/it/roadmap.md +206 -0
- package/it/terms_of_service.md +33 -0
- package/it/vs_code_extension.md +139 -0
- package/ja/CI_CD.md +149 -0
- package/ja/autoFill.md +157 -0
- package/ja/configuration.md +507 -0
- package/ja/dictionary/condition.md +213 -0
- package/ja/dictionary/content_extention_customization.md +81 -0
- package/ja/dictionary/enumeration.md +221 -0
- package/ja/dictionary/file.md +209 -0
- package/ja/dictionary/function_fetching.md +190 -0
- package/ja/dictionary/get_started.md +466 -0
- package/ja/dictionary/insertion.md +161 -0
- package/ja/dictionary/markdown.md +343 -0
- package/ja/dictionary/nesting.md +249 -0
- package/ja/dictionary/translation.md +287 -0
- package/ja/header.md +7 -0
- package/ja/how_works_intlayer.md +217 -0
- package/ja/index.md +125 -0
- package/ja/interest_of_intlayer.md +132 -0
- package/ja/intlayer_CMS.md +334 -0
- package/ja/intlayer_cli.md +274 -0
- package/ja/intlayer_visual_editor.md +213 -0
- package/ja/intlayer_with_angular.md +3 -0
- package/ja/intlayer_with_create_react_app.md +1186 -0
- package/ja/intlayer_with_express.md +267 -0
- package/ja/intlayer_with_lynx+react.md +482 -0
- package/ja/intlayer_with_nextjs_14.md +1256 -0
- package/ja/intlayer_with_nextjs_15.md +1308 -0
- package/ja/intlayer_with_nextjs_page_router.md +1085 -0
- package/ja/intlayer_with_react_native+expo.md +537 -0
- package/ja/intlayer_with_vite+preact.md +1601 -0
- package/ja/intlayer_with_vite+react.md +1555 -0
- package/ja/intlayer_with_vite+solid.md +3 -0
- package/ja/intlayer_with_vite+svelte.md +3 -0
- package/ja/intlayer_with_vite+vue.md +990 -0
- package/ja/introduction.md +186 -0
- package/ja/mcp_server.md +150 -0
- package/ja/packages/@intlayer/api/index.md +31 -0
- package/ja/packages/@intlayer/chokidar/index.md +31 -0
- package/ja/packages/@intlayer/cli/index.md +21 -0
- package/ja/packages/@intlayer/config/index.md +116 -0
- package/ja/packages/@intlayer/core/index.md +25 -0
- package/ja/packages/@intlayer/design-system/index.md +21 -0
- package/ja/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/ja/packages/@intlayer/editor/index.md +21 -0
- package/ja/packages/@intlayer/editor-react/index.md +21 -0
- package/ja/packages/@intlayer/webpack/index.md +35 -0
- package/ja/packages/angular-intlayer/index.md +3 -0
- package/ja/packages/express-intlayer/index.md +229 -0
- package/ja/packages/express-intlayer/t.md +432 -0
- package/ja/packages/intlayer/getConfiguration.md +120 -0
- package/ja/packages/intlayer/getEnumeration.md +140 -0
- package/ja/packages/intlayer/getHTMLTextDir.md +97 -0
- package/ja/packages/intlayer/getLocaleLang.md +59 -0
- package/ja/packages/intlayer/getLocaleName.md +93 -0
- package/ja/packages/intlayer/getLocalizedUrl.md +221 -0
- package/ja/packages/intlayer/getMultilingualUrls.md +198 -0
- package/ja/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/ja/packages/intlayer/getTranslation.md +166 -0
- package/ja/packages/intlayer/getTranslationContent.md +166 -0
- package/ja/packages/intlayer/index.md +479 -0
- package/ja/packages/intlayer-cli/index.md +41 -0
- package/ja/packages/intlayer-editor/index.md +115 -0
- package/ja/packages/lynx-intlayer/index.md +58 -0
- package/ja/packages/next-intlayer/index.md +263 -0
- package/ja/packages/next-intlayer/t.md +326 -0
- package/ja/packages/next-intlayer/useDictionary.md +242 -0
- package/ja/packages/next-intlayer/useIntlayer.md +237 -0
- package/ja/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/ja/packages/next-intlayer/useLocale.md +105 -0
- package/ja/packages/preact-intlayer/index.md +3 -0
- package/ja/packages/react-intlayer/index.md +257 -0
- package/ja/packages/react-intlayer/t.md +277 -0
- package/ja/packages/react-intlayer/useDictionary.md +260 -0
- package/ja/packages/react-intlayer/useIntlayer.md +225 -0
- package/ja/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/ja/packages/react-intlayer/useLocale.md +184 -0
- package/ja/packages/react-native-intlayer/index.md +57 -0
- package/ja/packages/react-scripts-intlayer/index.md +57 -0
- package/ja/packages/solid-intlayer/index.md +3 -0
- package/ja/packages/svelte-intlayer/index.md +3 -0
- package/ja/packages/vite-intlayer/index.md +53 -0
- package/ja/packages/vue-intlayer/index.md +3 -0
- package/ja/per_locale_file.md +298 -0
- package/ja/privacy_notice.md +57 -0
- package/ja/roadmap.md +206 -0
- package/ja/terms_of_service.md +33 -0
- package/ja/vs_code_extension.md +139 -0
- package/ko/CI_CD.md +149 -0
- package/ko/autoFill.md +157 -0
- package/ko/configuration.md +507 -0
- package/ko/dictionary/condition.md +213 -0
- package/ko/dictionary/content_extention_customization.md +81 -0
- package/ko/dictionary/enumeration.md +221 -0
- package/ko/dictionary/file.md +207 -0
- package/ko/dictionary/function_fetching.md +190 -0
- package/ko/dictionary/get_started.md +466 -0
- package/ko/dictionary/insertion.md +167 -0
- package/ko/dictionary/markdown.md +343 -0
- package/ko/dictionary/nesting.md +249 -0
- package/ko/dictionary/translation.md +287 -0
- package/ko/header.md +7 -0
- package/ko/how_works_intlayer.md +216 -0
- package/ko/index.md +125 -0
- package/ko/interest_of_intlayer.md +132 -0
- package/ko/intlayer_CMS.md +334 -0
- package/ko/intlayer_cli.md +274 -0
- package/ko/intlayer_visual_editor.md +210 -0
- package/ko/intlayer_with_angular.md +3 -0
- package/ko/intlayer_with_create_react_app.md +1186 -0
- package/ko/intlayer_with_express.md +267 -0
- package/ko/intlayer_with_lynx+react.md +482 -0
- package/ko/intlayer_with_nextjs_14.md +1267 -0
- package/ko/intlayer_with_nextjs_15.md +1319 -0
- package/ko/intlayer_with_nextjs_page_router.md +1097 -0
- package/ko/intlayer_with_react_native+expo.md +537 -0
- package/ko/intlayer_with_vite+preact.md +1682 -0
- package/ko/intlayer_with_vite+react.md +1582 -0
- package/ko/intlayer_with_vite+solid.md +3 -0
- package/ko/intlayer_with_vite+svelte.md +3 -0
- package/ko/intlayer_with_vite+vue.md +988 -0
- package/ko/introduction.md +186 -0
- package/ko/mcp_server.md +150 -0
- package/ko/packages/@intlayer/api/index.md +31 -0
- package/ko/packages/@intlayer/chokidar/index.md +31 -0
- package/ko/packages/@intlayer/cli/index.md +21 -0
- package/ko/packages/@intlayer/config/index.md +116 -0
- package/ko/packages/@intlayer/core/index.md +25 -0
- package/ko/packages/@intlayer/design-system/index.md +21 -0
- package/ko/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/ko/packages/@intlayer/editor/index.md +21 -0
- package/ko/packages/@intlayer/editor-react/index.md +21 -0
- package/ko/packages/@intlayer/webpack/index.md +35 -0
- package/ko/packages/angular-intlayer/index.md +5 -0
- package/ko/packages/express-intlayer/index.md +229 -0
- package/ko/packages/express-intlayer/t.md +432 -0
- package/ko/packages/intlayer/getConfiguration.md +120 -0
- package/ko/packages/intlayer/getEnumeration.md +138 -0
- package/ko/packages/intlayer/getHTMLTextDir.md +97 -0
- package/ko/packages/intlayer/getLocaleLang.md +57 -0
- package/ko/packages/intlayer/getLocaleName.md +93 -0
- package/ko/packages/intlayer/getLocalizedUrl.md +221 -0
- package/ko/packages/intlayer/getMultilingualUrls.md +198 -0
- package/ko/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/ko/packages/intlayer/getTranslation.md +166 -0
- package/ko/packages/intlayer/getTranslationContent.md +166 -0
- package/ko/packages/intlayer/index.md +480 -0
- package/ko/packages/intlayer-cli/index.md +41 -0
- package/ko/packages/intlayer-editor/index.md +113 -0
- package/ko/packages/lynx-intlayer/index.md +58 -0
- package/ko/packages/next-intlayer/index.md +267 -0
- package/ko/packages/next-intlayer/t.md +337 -0
- package/ko/packages/next-intlayer/useDictionary.md +242 -0
- package/ko/packages/next-intlayer/useIntlayer.md +237 -0
- package/ko/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/ko/packages/next-intlayer/useLocale.md +105 -0
- package/ko/packages/preact-intlayer/index.md +3 -0
- package/ko/packages/react-intlayer/index.md +260 -0
- package/ko/packages/react-intlayer/t.md +277 -0
- package/ko/packages/react-intlayer/useDictionary.md +268 -0
- package/ko/packages/react-intlayer/useIntlayer.md +225 -0
- package/ko/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/ko/packages/react-intlayer/useLocale.md +184 -0
- package/ko/packages/react-native-intlayer/index.md +57 -0
- package/ko/packages/react-scripts-intlayer/index.md +57 -0
- package/ko/packages/solid-intlayer/index.md +3 -0
- package/ko/packages/svelte-intlayer/index.md +3 -0
- package/ko/packages/vite-intlayer/index.md +53 -0
- package/ko/packages/vue-intlayer/index.md +3 -0
- package/ko/per_locale_file.md +300 -0
- package/ko/privacy_notice.md +61 -0
- package/ko/roadmap.md +206 -0
- package/ko/terms_of_service.md +33 -0
- package/ko/vs_code_extension.md +139 -0
- package/package.json +96 -0
- package/pt/CI_CD.md +149 -0
- package/pt/autoFill.md +157 -0
- package/pt/configuration.md +503 -0
- package/pt/dictionary/condition.md +213 -0
- package/pt/dictionary/content_extention_customization.md +81 -0
- package/pt/dictionary/enumeration.md +221 -0
- package/pt/dictionary/file.md +210 -0
- package/pt/dictionary/function_fetching.md +190 -0
- package/pt/dictionary/get_started.md +490 -0
- package/pt/dictionary/insertion.md +161 -0
- package/pt/dictionary/markdown.md +339 -0
- package/pt/dictionary/nesting.md +249 -0
- package/pt/dictionary/translation.md +322 -0
- package/pt/header.md +7 -0
- package/pt/how_works_intlayer.md +216 -0
- package/pt/index.md +125 -0
- package/pt/interest_of_intlayer.md +132 -0
- package/pt/intlayer_CMS.md +334 -0
- package/pt/intlayer_cli.md +274 -0
- package/pt/intlayer_visual_editor.md +210 -0
- package/pt/intlayer_with_angular.md +3 -0
- package/pt/intlayer_with_create_react_app.md +1204 -0
- package/pt/intlayer_with_express.md +270 -0
- package/pt/intlayer_with_lynx+react.md +467 -0
- package/pt/intlayer_with_nextjs_14.md +1269 -0
- package/pt/intlayer_with_nextjs_15.md +1319 -0
- package/pt/intlayer_with_nextjs_page_router.md +1109 -0
- package/pt/intlayer_with_react_native+expo.md +259 -0
- package/pt/intlayer_with_vite+preact.md +1663 -0
- package/pt/intlayer_with_vite+react.md +1621 -0
- package/pt/intlayer_with_vite+solid.md +3 -0
- package/pt/intlayer_with_vite+svelte.md +3 -0
- package/pt/intlayer_with_vite+vue.md +989 -0
- package/pt/introduction.md +193 -0
- package/pt/mcp_server.md +150 -0
- package/pt/packages/@intlayer/api/index.md +31 -0
- package/pt/packages/@intlayer/chokidar/index.md +31 -0
- package/pt/packages/@intlayer/cli/index.md +21 -0
- package/pt/packages/@intlayer/config/index.md +116 -0
- package/pt/packages/@intlayer/core/index.md +25 -0
- package/pt/packages/@intlayer/design-system/index.md +21 -0
- package/pt/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/pt/packages/@intlayer/editor/index.md +21 -0
- package/pt/packages/@intlayer/editor-react/index.md +21 -0
- package/pt/packages/@intlayer/webpack/index.md +35 -0
- package/pt/packages/angular-intlayer/index.md +3 -0
- package/pt/packages/express-intlayer/index.md +232 -0
- package/pt/packages/express-intlayer/t.md +267 -0
- package/pt/packages/intlayer/getConfiguration.md +120 -0
- package/pt/packages/intlayer/getEnumeration.md +138 -0
- package/pt/packages/intlayer/getHTMLTextDir.md +97 -0
- package/pt/packages/intlayer/getLocaleLang.md +57 -0
- package/pt/packages/intlayer/getLocaleName.md +93 -0
- package/pt/packages/intlayer/getLocalizedUrl.md +221 -0
- package/pt/packages/intlayer/getMultilingualUrls.md +198 -0
- package/pt/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/pt/packages/intlayer/getTranslation.md +175 -0
- package/pt/packages/intlayer/getTranslationContent.md +177 -0
- package/pt/packages/intlayer/index.md +484 -0
- package/pt/packages/intlayer-cli/index.md +41 -0
- package/pt/packages/intlayer-editor/index.md +113 -0
- package/pt/packages/lynx-intlayer/index.md +58 -0
- package/pt/packages/next-intlayer/index.md +270 -0
- package/pt/packages/next-intlayer/t.md +341 -0
- package/pt/packages/next-intlayer/useDictionary.md +248 -0
- package/pt/packages/next-intlayer/useIntlayer.md +237 -0
- package/pt/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/pt/packages/next-intlayer/useLocale.md +105 -0
- package/pt/packages/preact-intlayer/index.md +3 -0
- package/pt/packages/react-intlayer/index.md +261 -0
- package/pt/packages/react-intlayer/t.md +289 -0
- package/pt/packages/react-intlayer/useDictionary.md +268 -0
- package/pt/packages/react-intlayer/useIntlayer.md +225 -0
- package/pt/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/pt/packages/react-intlayer/useLocale.md +184 -0
- package/pt/packages/react-native-intlayer/index.md +57 -0
- package/pt/packages/react-scripts-intlayer/index.md +57 -0
- package/pt/packages/solid-intlayer/index.md +3 -0
- package/pt/packages/svelte-intlayer/index.md +3 -0
- package/pt/packages/vite-intlayer/index.md +53 -0
- package/pt/packages/vue-intlayer/index.md +3 -0
- package/pt/per_locale_file.md +298 -0
- package/pt/privacy_notice.md +61 -0
- package/pt/roadmap.md +206 -0
- package/pt/terms_of_service.md +33 -0
- package/pt/vs_code_extension.md +139 -0
- package/ru/CI_CD.md +149 -0
- package/ru/autoFill.md +157 -0
- package/ru/configuration.md +507 -0
- package/ru/dictionary/condition.md +213 -0
- package/ru/dictionary/content_extention_customization.md +81 -0
- package/ru/dictionary/enumeration.md +221 -0
- package/ru/dictionary/file.md +209 -0
- package/ru/dictionary/function_fetching.md +188 -0
- package/ru/dictionary/get_started.md +311 -0
- package/ru/dictionary/insertion.md +161 -0
- package/ru/dictionary/markdown.md +339 -0
- package/ru/dictionary/nesting.md +249 -0
- package/ru/dictionary/translation.md +322 -0
- package/ru/environment/angular.md +3 -0
- package/ru/header.md +7 -0
- package/ru/how_works_intlayer.md +217 -0
- package/ru/index.md +125 -0
- package/ru/interest_of_intlayer.md +132 -0
- package/ru/intlayer_CMS.md +334 -0
- package/ru/intlayer_cli.md +274 -0
- package/ru/intlayer_visual_editor.md +210 -0
- package/ru/intlayer_with_angular.md +3 -0
- package/ru/intlayer_with_create_react_app.md +1196 -0
- package/ru/intlayer_with_express.md +273 -0
- package/ru/intlayer_with_lynx+react.md +482 -0
- package/ru/intlayer_with_nextjs_14.md +1274 -0
- package/ru/intlayer_with_nextjs_15.md +1318 -0
- package/ru/intlayer_with_nextjs_page_router.md +1100 -0
- package/ru/intlayer_with_react_native+expo.md +537 -0
- package/ru/intlayer_with_vite+preact.md +1663 -0
- package/ru/intlayer_with_vite+react.md +1546 -0
- package/ru/intlayer_with_vite+solid.md +3 -0
- package/ru/intlayer_with_vite+svelte.md +3 -0
- package/ru/intlayer_with_vite+vue.md +987 -0
- package/ru/introduction.md +190 -0
- package/ru/mcp_server.md +152 -0
- package/ru/packages/@intlayer/api/index.md +31 -0
- package/ru/packages/@intlayer/chokidar/index.md +31 -0
- package/ru/packages/@intlayer/cli/index.md +23 -0
- package/ru/packages/@intlayer/config/index.md +116 -0
- package/ru/packages/@intlayer/core/index.md +25 -0
- package/ru/packages/@intlayer/design-system/index.md +21 -0
- package/ru/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/ru/packages/@intlayer/editor/index.md +21 -0
- package/ru/packages/@intlayer/editor-react/index.md +21 -0
- package/ru/packages/@intlayer/webpack/index.md +35 -0
- package/ru/packages/angular-intlayer/index.md +3 -0
- package/ru/packages/express-intlayer/index.md +235 -0
- package/ru/packages/express-intlayer/t.md +445 -0
- package/ru/packages/intlayer/getConfiguration.md +120 -0
- package/ru/packages/intlayer/getEnumeration.md +140 -0
- package/ru/packages/intlayer/getHTMLTextDir.md +97 -0
- package/ru/packages/intlayer/getLocaleLang.md +59 -0
- package/ru/packages/intlayer/getLocaleName.md +93 -0
- package/ru/packages/intlayer/getLocalizedUrl.md +221 -0
- package/ru/packages/intlayer/getMultilingualUrls.md +198 -0
- package/ru/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/ru/packages/intlayer/getTranslation.md +177 -0
- package/ru/packages/intlayer/getTranslationContent.md +175 -0
- package/ru/packages/intlayer/index.md +275 -0
- package/ru/packages/intlayer-cli/index.md +41 -0
- package/ru/packages/intlayer-editor/index.md +115 -0
- package/ru/packages/lynx-intlayer/index.md +58 -0
- package/ru/packages/next-intlayer/index.md +267 -0
- package/ru/packages/next-intlayer/t.md +340 -0
- package/ru/packages/next-intlayer/useDictionary.md +248 -0
- package/ru/packages/next-intlayer/useIntlayer.md +237 -0
- package/ru/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/ru/packages/next-intlayer/useLocale.md +105 -0
- package/ru/packages/preact-intlayer/index.md +3 -0
- package/ru/packages/react-intlayer/index.md +261 -0
- package/ru/packages/react-intlayer/t.md +289 -0
- package/ru/packages/react-intlayer/useDictionary.md +268 -0
- package/ru/packages/react-intlayer/useIntlayer.md +225 -0
- package/ru/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/ru/packages/react-intlayer/useLocale.md +184 -0
- package/ru/packages/react-native-intlayer/index.md +57 -0
- package/ru/packages/react-scripts-intlayer/index.md +57 -0
- package/ru/packages/solid-intlayer/index.md +3 -0
- package/ru/packages/svelte-intlayer/index.md +3 -0
- package/ru/packages/vite-intlayer/index.md +53 -0
- package/ru/packages/vue-intlayer/index.md +3 -0
- package/ru/per_locale_file.md +298 -0
- package/ru/privacy_notice.md +61 -0
- package/ru/roadmap.md +206 -0
- package/ru/terms_of_service.md +33 -0
- package/ru/vs_code_extension.md +139 -0
- package/zh/CI_CD.md +149 -0
- package/zh/autoFill.md +157 -0
- package/zh/configuration.md +484 -0
- package/zh/dictionary/condition.md +213 -0
- package/zh/dictionary/content_extention_customization.md +81 -0
- package/zh/dictionary/enumeration.md +221 -0
- package/zh/dictionary/file.md +209 -0
- package/zh/dictionary/function_fetching.md +188 -0
- package/zh/dictionary/get_started.md +490 -0
- package/zh/dictionary/insertion.md +161 -0
- package/zh/dictionary/markdown.md +342 -0
- package/zh/dictionary/nesting.md +249 -0
- package/zh/dictionary/translation.md +287 -0
- package/zh/header.md +7 -0
- package/zh/how_works_intlayer.md +217 -0
- package/zh/index.md +125 -0
- package/zh/interest_of_intlayer.md +132 -0
- package/zh/intlayer_CMS.md +334 -0
- package/zh/intlayer_cli.md +274 -0
- package/zh/intlayer_visual_editor.md +210 -0
- package/zh/intlayer_with_angular.md +3 -0
- package/zh/intlayer_with_create_react_app.md +1196 -0
- package/zh/intlayer_with_express.md +267 -0
- package/zh/intlayer_with_lynx+react.md +484 -0
- package/zh/intlayer_with_nextjs_14.md +1286 -0
- package/zh/intlayer_with_nextjs_15.md +1322 -0
- package/zh/intlayer_with_nextjs_page_router.md +1097 -0
- package/zh/intlayer_with_react_native+expo.md +539 -0
- package/zh/intlayer_with_vite+preact.md +1681 -0
- package/zh/intlayer_with_vite+react.md +1577 -0
- package/zh/intlayer_with_vite+solid.md +3 -0
- package/zh/intlayer_with_vite+svelte.md +3 -0
- package/zh/intlayer_with_vite+vue.md +988 -0
- package/zh/introduction.md +186 -0
- package/zh/mcp_server.md +152 -0
- package/zh/packages/@intlayer/api/index.md +31 -0
- package/zh/packages/@intlayer/chokidar/index.md +31 -0
- package/zh/packages/@intlayer/cli/index.md +21 -0
- package/zh/packages/@intlayer/config/index.md +116 -0
- package/zh/packages/@intlayer/core/index.md +25 -0
- package/zh/packages/@intlayer/design-system/index.md +21 -0
- package/zh/packages/@intlayer/dictionary-entry/index.md +21 -0
- package/zh/packages/@intlayer/editor/index.md +21 -0
- package/zh/packages/@intlayer/editor-react/index.md +21 -0
- package/zh/packages/@intlayer/webpack/index.md +35 -0
- package/zh/packages/angular-intlayer/index.md +3 -0
- package/zh/packages/express-intlayer/index.md +229 -0
- package/zh/packages/express-intlayer/t.md +432 -0
- package/zh/packages/intlayer/getConfiguration.md +120 -0
- package/zh/packages/intlayer/getEnumeration.md +140 -0
- package/zh/packages/intlayer/getHTMLTextDir.md +97 -0
- package/zh/packages/intlayer/getLocaleLang.md +57 -0
- package/zh/packages/intlayer/getLocaleName.md +93 -0
- package/zh/packages/intlayer/getLocalizedUrl.md +221 -0
- package/zh/packages/intlayer/getMultilingualUrls.md +198 -0
- package/zh/packages/intlayer/getPathWithoutLocale.md +50 -0
- package/zh/packages/intlayer/getTranslation.md +166 -0
- package/zh/packages/intlayer/getTranslationContent.md +166 -0
- package/zh/packages/intlayer/index.md +360 -0
- package/zh/packages/intlayer-cli/index.md +41 -0
- package/zh/packages/intlayer-editor/index.md +113 -0
- package/zh/packages/lynx-intlayer/index.md +60 -0
- package/zh/packages/next-intlayer/index.md +267 -0
- package/zh/packages/next-intlayer/t.md +338 -0
- package/zh/packages/next-intlayer/useDictionary.md +242 -0
- package/zh/packages/next-intlayer/useIntlayer.md +237 -0
- package/zh/packages/next-intlayer/useIntlayerAsync.md +211 -0
- package/zh/packages/next-intlayer/useLocale.md +105 -0
- package/zh/packages/preact-intlayer/index.md +3 -0
- package/zh/packages/react-intlayer/index.md +257 -0
- package/zh/packages/react-intlayer/t.md +271 -0
- package/zh/packages/react-intlayer/useDictionary.md +260 -0
- package/zh/packages/react-intlayer/useIntlayer.md +225 -0
- package/zh/packages/react-intlayer/useIntlayerAsync.md +226 -0
- package/zh/packages/react-intlayer/useLocale.md +184 -0
- package/zh/packages/react-native-intlayer/index.md +57 -0
- package/zh/packages/react-scripts-intlayer/index.md +57 -0
- package/zh/packages/solid-intlayer/index.md +3 -0
- package/zh/packages/svelte-intlayer/index.md +3 -0
- package/zh/packages/vite-intlayer/index.md +53 -0
- package/zh/packages/vue-intlayer/index.md +3 -0
- package/zh/per_locale_file.md +298 -0
- package/zh/privacy_notice.md +61 -0
- package/zh/roadmap.md +206 -0
- package/zh/terms_of_service.md +33 -0
- package/zh/vs_code_extension.md +139 -0
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
# Getting Started Internationalizing (i18n) with Intlayer and Vite and Vue
|
|
2
|
+
|
|
3
|
+
See [Application Template](https://github.com/aymericzip/intlayer-vite-vue-template) on GitHub.
|
|
4
|
+
|
|
5
|
+
## What is Intlayer?
|
|
6
|
+
|
|
7
|
+
**Intlayer** is an innovative, open-source internationalization (i18n) library designed to simplify multilingual support in modern web applications.
|
|
8
|
+
|
|
9
|
+
With Intlayer, you can:
|
|
10
|
+
|
|
11
|
+
- **Easily manage translations** using declarative dictionaries at the component level.
|
|
12
|
+
- **Dynamically localize metadata**, routes, and content.
|
|
13
|
+
- **Ensure TypeScript support** with autogenerated types, improving autocompletion and error detection.
|
|
14
|
+
- **Benefit from advanced features**, like dynamic locale detection and switching.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Step-by-Step Guide to Set Up Intlayer in a Vite and Vue Application
|
|
19
|
+
|
|
20
|
+
### Step 1: Install Dependencies
|
|
21
|
+
|
|
22
|
+
Install the necessary packages using npm:
|
|
23
|
+
|
|
24
|
+
```bash packageManager="npm"
|
|
25
|
+
npm install intlayer vue-intlayer vite-intlayer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```bash packageManager="pnpm"
|
|
29
|
+
pnpm add intlayer vue-intlayer vite-intlayer
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```bash packageManager="yarn"
|
|
33
|
+
yarn add intlayer vue-intlayer vite-intlayer
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **intlayer**
|
|
37
|
+
|
|
38
|
+
The core package that provides internationalization tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/en/dictionary/get_started.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_cli.md).
|
|
39
|
+
|
|
40
|
+
- **vue-intlayer**
|
|
41
|
+
The package that integrates Intlayer with Vue application. It provides context providers and composables for Vue internationalization.
|
|
42
|
+
|
|
43
|
+
- **vite-intlayer**
|
|
44
|
+
Includes the Vite plugin for integrating Intlayer with the [Vite bundler](https://vite.dev/guide/why.html#why-bundle-for-production), as well as middleware for detecting the user's preferred locale, managing cookies, and handling URL redirection.
|
|
45
|
+
|
|
46
|
+
### Step 2: Configuration of your project
|
|
47
|
+
|
|
48
|
+
Create a config file to configure the languages of your application:
|
|
49
|
+
|
|
50
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
51
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
52
|
+
|
|
53
|
+
const config: IntlayerConfig = {
|
|
54
|
+
internationalization: {
|
|
55
|
+
locales: [
|
|
56
|
+
Locales.ENGLISH,
|
|
57
|
+
Locales.FRENCH,
|
|
58
|
+
Locales.SPANISH,
|
|
59
|
+
// Your other locales
|
|
60
|
+
],
|
|
61
|
+
defaultLocale: Locales.ENGLISH,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default config;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
69
|
+
import { Locales } from "intlayer";
|
|
70
|
+
|
|
71
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
72
|
+
const config = {
|
|
73
|
+
internationalization: {
|
|
74
|
+
locales: [
|
|
75
|
+
Locales.ENGLISH,
|
|
76
|
+
Locales.FRENCH,
|
|
77
|
+
Locales.SPANISH,
|
|
78
|
+
// Your other locales
|
|
79
|
+
],
|
|
80
|
+
defaultLocale: Locales.ENGLISH,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default config;
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
88
|
+
const { Locales } = require("intlayer");
|
|
89
|
+
|
|
90
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
91
|
+
const config = {
|
|
92
|
+
internationalization: {
|
|
93
|
+
locales: [
|
|
94
|
+
Locales.ENGLISH,
|
|
95
|
+
Locales.FRENCH,
|
|
96
|
+
Locales.SPANISH,
|
|
97
|
+
// Your other locales
|
|
98
|
+
],
|
|
99
|
+
defaultLocale: Locales.ENGLISH,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
module.exports = config;
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
> Through this configuration file, you can set up localized URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en/configuration.md).
|
|
107
|
+
|
|
108
|
+
### Step 3: Integrate Intlayer in Your Vite Configuration
|
|
109
|
+
|
|
110
|
+
Add the intlayer plugin into your configuration.
|
|
111
|
+
|
|
112
|
+
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
113
|
+
import { defineConfig } from "vite";
|
|
114
|
+
import vue from "@vitejs/plugin-vue";
|
|
115
|
+
import { intlayerPlugin } from "vite-intlayer";
|
|
116
|
+
|
|
117
|
+
// https://vitejs.dev/config/
|
|
118
|
+
export default defineConfig({
|
|
119
|
+
plugins: [vue(), intlayerPlugin()],
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
124
|
+
import { defineConfig } from "vite";
|
|
125
|
+
import vue from "@vitejs/plugin-vue";
|
|
126
|
+
import { intlayerPlugin } from "vite-intlayer";
|
|
127
|
+
|
|
128
|
+
// https://vitejs.dev/config/
|
|
129
|
+
export default defineConfig({
|
|
130
|
+
plugins: [vue(), intlayerPlugin()],
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
135
|
+
const { defineConfig } = require("vite");
|
|
136
|
+
const vue = require("@vitejs/plugin-vue");
|
|
137
|
+
const { intlayerPlugin } = require("vite-intlayer");
|
|
138
|
+
|
|
139
|
+
// https://vitejs.dev/config/
|
|
140
|
+
module.exports = defineConfig({
|
|
141
|
+
plugins: [vue(), intlayerPlugin()],
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
> The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimize performance.
|
|
146
|
+
|
|
147
|
+
### Step 4: Declare Your Content
|
|
148
|
+
|
|
149
|
+
Create and manage your content declarations to store translations:
|
|
150
|
+
|
|
151
|
+
```tsx fileName="src/helloWorld.content.ts" contentDeclarationFormat="typescript"
|
|
152
|
+
import { t, type Dictionary } from "intlayer";
|
|
153
|
+
|
|
154
|
+
const helloWorldContent = {
|
|
155
|
+
key: "helloworld",
|
|
156
|
+
content: {
|
|
157
|
+
count: t({ en: "count is ", fr: "le compte est ", es: "el recuento es " }),
|
|
158
|
+
edit: t({
|
|
159
|
+
en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
|
|
160
|
+
fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
|
|
161
|
+
es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
|
|
162
|
+
}),
|
|
163
|
+
checkOut: t({ en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
|
|
164
|
+
officialStarter: t({
|
|
165
|
+
en: ", the official Vue + Vite starter",
|
|
166
|
+
fr: ", le starter officiel Vue + Vite",
|
|
167
|
+
es: ", el starter oficial Vue + Vite",
|
|
168
|
+
}),
|
|
169
|
+
learnMore: t({
|
|
170
|
+
en: "Learn more about IDE Support for Vue in the ",
|
|
171
|
+
fr: "En savoir plus sur le support IDE pour Vue dans le ",
|
|
172
|
+
es: "Aprenda más sobre el soporte IDE para Vue en el ",
|
|
173
|
+
}),
|
|
174
|
+
vueDocs: t({
|
|
175
|
+
en: "Vue Docs Scaling up Guide",
|
|
176
|
+
fr: "Vue Docs Scaling up Guide",
|
|
177
|
+
es: "Vue Docs Scaling up Guide",
|
|
178
|
+
}),
|
|
179
|
+
readTheDocs: t({
|
|
180
|
+
en: "Click on the Vite and Vue logos to learn more",
|
|
181
|
+
fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
|
|
182
|
+
es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
|
|
183
|
+
}),
|
|
184
|
+
},
|
|
185
|
+
} satisfies Dictionary;
|
|
186
|
+
|
|
187
|
+
export default helloWorldContent;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
```javascript fileName="src/helloWorld.content.mjs" contentDeclarationFormat="esm"
|
|
191
|
+
import { t } from "intlayer";
|
|
192
|
+
|
|
193
|
+
/** @type {import('intlayer').Dictionary} */
|
|
194
|
+
const helloWorldContent = {
|
|
195
|
+
key: "helloworld",
|
|
196
|
+
content: {
|
|
197
|
+
count: t({ en: "count is ", fr: "le compte est ", es: "el recuento es " }),
|
|
198
|
+
edit: t({
|
|
199
|
+
en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
|
|
200
|
+
fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
|
|
201
|
+
es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
|
|
202
|
+
}),
|
|
203
|
+
checkOut: t({ en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
|
|
204
|
+
officialStarter: t({
|
|
205
|
+
en: "the official Vue + Vite starter",
|
|
206
|
+
fr: "le starter officiel Vue + Vite",
|
|
207
|
+
es: "el starter oficial Vue + Vite",
|
|
208
|
+
}),
|
|
209
|
+
learnMore: t({
|
|
210
|
+
en: "Learn more about IDE Support for Vue in the ",
|
|
211
|
+
fr: "En savoir plus sur le support IDE pour Vue dans le ",
|
|
212
|
+
es: "Aprenda más sobre el soporte IDE para Vue en el ",
|
|
213
|
+
}),
|
|
214
|
+
vueDocs: t({
|
|
215
|
+
en: "Vue Docs Scaling up Guide",
|
|
216
|
+
fr: "Vue Docs Scaling up Guide",
|
|
217
|
+
es: "Vue Docs Scaling up Guide",
|
|
218
|
+
}),
|
|
219
|
+
readTheDocs: t({
|
|
220
|
+
en: "Click on the Vite and Vue logos to learn more",
|
|
221
|
+
fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
|
|
222
|
+
es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
|
|
223
|
+
}),
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export default helloWorldContent;
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
```javascript fileName="src/helloWorld.content.cjs" contentDeclarationFormat="commonjs"
|
|
231
|
+
const { t } = require("intlayer");
|
|
232
|
+
|
|
233
|
+
/** @type {import('intlayer').Dictionary} */
|
|
234
|
+
const appContent = {
|
|
235
|
+
key: "helloworld",
|
|
236
|
+
content: {
|
|
237
|
+
count: t({ en: "count is ", fr: "le compte est ", es: "el recuento es " }),
|
|
238
|
+
edit: t({
|
|
239
|
+
en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
|
|
240
|
+
fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
|
|
241
|
+
es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
|
|
242
|
+
}),
|
|
243
|
+
checkOut: t({ en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
|
|
244
|
+
officialStarter: t({
|
|
245
|
+
en: "the official Vue + Vite starter",
|
|
246
|
+
fr: "le starter officiel Vue + Vite",
|
|
247
|
+
es: "el starter oficial Vue + Vite",
|
|
248
|
+
}),
|
|
249
|
+
learnMore: t({
|
|
250
|
+
en: "Learn more about IDE Support for Vue in the ",
|
|
251
|
+
fr: "En savoir plus sur le support IDE pour Vue dans le ",
|
|
252
|
+
es: "Aprenda más sobre el soporte IDE para Vue en el ",
|
|
253
|
+
}),
|
|
254
|
+
vueDocs: t({
|
|
255
|
+
en: "Vue Docs Scaling up Guide",
|
|
256
|
+
fr: "Vue Docs Scaling up Guide",
|
|
257
|
+
es: "Vue Docs Scaling up Guide",
|
|
258
|
+
}),
|
|
259
|
+
readTheDocs: t({
|
|
260
|
+
en: "Click on the Vite and Vue logos to learn more",
|
|
261
|
+
fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
|
|
262
|
+
es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
|
|
263
|
+
}),
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
module.exports = appContent;
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
```json fileName="src/helloWorld.content.json" contentDeclarationFormat="json"
|
|
271
|
+
{
|
|
272
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
273
|
+
"key": "helloworld",
|
|
274
|
+
"content": {
|
|
275
|
+
"count": {
|
|
276
|
+
"nodeType": "translation",
|
|
277
|
+
"translation": {
|
|
278
|
+
"en": "count is ",
|
|
279
|
+
"fr": "le compte est ",
|
|
280
|
+
"es": "el recuento es "
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"edit": {
|
|
284
|
+
"nodeType": "translation",
|
|
285
|
+
"translation": {
|
|
286
|
+
"en": "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
|
|
287
|
+
"fr": "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
|
|
288
|
+
"es": "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"checkOut": {
|
|
292
|
+
"nodeType": "translation",
|
|
293
|
+
"translation": {
|
|
294
|
+
"en": "Check out ",
|
|
295
|
+
"fr": "Vérifiez ",
|
|
296
|
+
"es": "Compruebe "
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"officialStarter": {
|
|
300
|
+
"nodeType": "translation",
|
|
301
|
+
"translation": {
|
|
302
|
+
"en": "the official Vue + Vite starter",
|
|
303
|
+
"fr": "le starter officiel Vue + Vite",
|
|
304
|
+
"es": "el starter oficial Vue + Vite"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"learnMore": {
|
|
308
|
+
"nodeType": "translation",
|
|
309
|
+
"translation": {
|
|
310
|
+
"en": "Learn more about IDE Support for Vue in the ",
|
|
311
|
+
"fr": "En savoir plus sur le support IDE pour Vue dans le ",
|
|
312
|
+
"es": "Aprenda más sobre el soporte IDE para Vue en el "
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"vueDocs": {
|
|
316
|
+
"nodeType": "translation",
|
|
317
|
+
"translation": {
|
|
318
|
+
"en": "Vue Docs Scaling up Guide",
|
|
319
|
+
"fr": "Vue Docs Scaling up Guide",
|
|
320
|
+
"es": "Vue Docs Scaling up Guide"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"readTheDocs": {
|
|
324
|
+
"nodeType": "translation",
|
|
325
|
+
"translation": {
|
|
326
|
+
"en": "Click on the Vite and Vue logos to learn more",
|
|
327
|
+
"fr": "Cliquez sur les logos Vite et Vue pour en savoir plus",
|
|
328
|
+
"es": "Haga clic en los logotipos de Vite y Vue para obtener más información"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
> Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
|
|
336
|
+
|
|
337
|
+
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en/dictionary/get_started.md).
|
|
338
|
+
|
|
339
|
+
### Step 5: Utilize Intlayer in Your Code
|
|
340
|
+
|
|
341
|
+
To utilize Intlayer's internationalization features throughout your Vue application, you first need to register the Intlayer singleton instance in your main file. This step is crucial as it provides the internationalization context to all components in your application, making translations accessible anywhere in your component tree.
|
|
342
|
+
|
|
343
|
+
```javascript fileName=main.js
|
|
344
|
+
import { createApp } from "vue";
|
|
345
|
+
import { installIntlayer } from "vue-intlayer";
|
|
346
|
+
import App from "./App.vue";
|
|
347
|
+
import "./style.css";
|
|
348
|
+
|
|
349
|
+
const app = createApp(App);
|
|
350
|
+
|
|
351
|
+
// Inject the provider at the top level
|
|
352
|
+
installIntlayer(app);
|
|
353
|
+
|
|
354
|
+
// Mount the app
|
|
355
|
+
app.mount("#app");
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Access your content dictionaries throughout your application by creating a main Vue component and using the `useIntlayer` composables:
|
|
359
|
+
|
|
360
|
+
```vue fileName="src/HelloWord.vue"
|
|
361
|
+
<script setup lang="ts">
|
|
362
|
+
import { ref } from "vue";
|
|
363
|
+
import { useIntlayer } from "vue-intlayer";
|
|
364
|
+
|
|
365
|
+
defineProps({
|
|
366
|
+
msg: String,
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
const {
|
|
370
|
+
count,
|
|
371
|
+
edit,
|
|
372
|
+
checkOut,
|
|
373
|
+
officialStarter,
|
|
374
|
+
learnMore,
|
|
375
|
+
vueDocs,
|
|
376
|
+
readTheDocs,
|
|
377
|
+
} = useIntlayer("helloworld");
|
|
378
|
+
const countRef = ref(0);
|
|
379
|
+
</script>
|
|
380
|
+
|
|
381
|
+
<template>
|
|
382
|
+
<h1>{{ msg }}</h1>
|
|
383
|
+
|
|
384
|
+
<div class="card">
|
|
385
|
+
<button type="button" @click="countRef++">
|
|
386
|
+
<count />
|
|
387
|
+
{{ countRef }}
|
|
388
|
+
</button>
|
|
389
|
+
<p v-html="edit"></p>
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<p>
|
|
393
|
+
<checkOut />
|
|
394
|
+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
395
|
+
>create-vue</a
|
|
396
|
+
>, <officialStarter />
|
|
397
|
+
</p>
|
|
398
|
+
<p>
|
|
399
|
+
<learnMore />
|
|
400
|
+
<a
|
|
401
|
+
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
402
|
+
target="_blank"
|
|
403
|
+
><vueDocs /></a
|
|
404
|
+
>.
|
|
405
|
+
</p>
|
|
406
|
+
<p class="read-the-docs"><readTheDocs /></p>
|
|
407
|
+
<p class="read-the-docs">{{ readTheDocs }}</p>
|
|
408
|
+
</template>
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
#### Accessing Content in Intlayer
|
|
412
|
+
|
|
413
|
+
Intlayer offers two APIs to access your content:
|
|
414
|
+
|
|
415
|
+
- **Component-based syntax** (recommended):
|
|
416
|
+
Use the `<myContent />` syntax to render content as an Intlayer Node. This integrates seamlessly with the [Visual Editor](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_visual_editor.md) and [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_CMS.md).
|
|
417
|
+
|
|
418
|
+
- **String-based syntax**:
|
|
419
|
+
Use `{{ myContent }}` to render the content as plain text, without any interactivity.
|
|
420
|
+
|
|
421
|
+
### (Optional) Step 6: Change the language of your content
|
|
422
|
+
|
|
423
|
+
To change the language of your content, you can use the `setLocale` function provided by the `useLocale` composable. This function allows you to set the locale of the application and update the content accordingly.
|
|
424
|
+
|
|
425
|
+
Create a component to switch between languages:
|
|
426
|
+
|
|
427
|
+
```vue fileName="src/components/LocaleSwitcher.vue"
|
|
428
|
+
<template>
|
|
429
|
+
<div class="locale-switcher">
|
|
430
|
+
<select v-model="selectedLocale" @change="changeLocale">
|
|
431
|
+
<option v-for="loc in availableLocales" :key="loc" :value="loc">
|
|
432
|
+
{{ getLocaleName(loc) }}
|
|
433
|
+
</option>
|
|
434
|
+
</select>
|
|
435
|
+
</div>
|
|
436
|
+
</template>
|
|
437
|
+
|
|
438
|
+
<script setup lang="ts">
|
|
439
|
+
import { ref, watch } from "vue";
|
|
440
|
+
import { getLocaleName } from "intlayer";
|
|
441
|
+
import { useLocale } from "vue-intlayer";
|
|
442
|
+
|
|
443
|
+
// Get locale information and setLocale function
|
|
444
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
445
|
+
|
|
446
|
+
// Track the selected locale with a ref
|
|
447
|
+
const selectedLocale = ref(locale.value);
|
|
448
|
+
|
|
449
|
+
// Update the locale when the selection changes
|
|
450
|
+
const changeLocale = () => setLocale(selectedLocale.value);
|
|
451
|
+
|
|
452
|
+
// Keep the selectedLocale in sync with the global locale
|
|
453
|
+
watch(
|
|
454
|
+
() => locale.value,
|
|
455
|
+
(newLocale) => {
|
|
456
|
+
selectedLocale.value = newLocale;
|
|
457
|
+
}
|
|
458
|
+
);
|
|
459
|
+
</script>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Then, use this component in your App.vue:
|
|
463
|
+
|
|
464
|
+
```vue fileName="src/App.vue"
|
|
465
|
+
<script setup lang="ts">
|
|
466
|
+
import { useIntlayer } from "vue-intlayer";
|
|
467
|
+
import HelloWorld from "@components/HelloWorld.vue";
|
|
468
|
+
import LocaleSwitcher from "@components/LocaleSwitcher.vue";
|
|
469
|
+
import { ref, watch } from "vue";
|
|
470
|
+
|
|
471
|
+
const content = useIntlayer("app"); // Create related intlayer declaration file
|
|
472
|
+
</script>
|
|
473
|
+
|
|
474
|
+
<template>
|
|
475
|
+
<div>
|
|
476
|
+
<LocaleSwitcher />
|
|
477
|
+
<a href="https://vite.dev" target="_blank">
|
|
478
|
+
<img src="/vite.svg" class="logo" :alt="content.viteLogo" />
|
|
479
|
+
</a>
|
|
480
|
+
<a href="https://vuejs.org/" target="_blank">
|
|
481
|
+
<img src="./assets/vue.svg" class="logo vue" :alt="content.vueLogo" />
|
|
482
|
+
</a>
|
|
483
|
+
</div>
|
|
484
|
+
<HelloWorld :msg="content.title" />
|
|
485
|
+
</template>
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### (Optional) Step 7: Add localized Routing to your application
|
|
489
|
+
|
|
490
|
+
Adding localized routing in a Vue application typically involves using Vue Router with locale prefixes. This makes unique routes for each language, which is useful for SEO and SEO-friendly URLs.
|
|
491
|
+
|
|
492
|
+
Example:
|
|
493
|
+
|
|
494
|
+
```plaintext
|
|
495
|
+
- https://example.com/about
|
|
496
|
+
- https://example.com/es/about
|
|
497
|
+
- https://example.com/fr/about
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
First, install Vue Router:
|
|
501
|
+
|
|
502
|
+
```bash packageManager="npm"
|
|
503
|
+
npm install intlayer vue-router
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
```bash packageManager="pnpm"
|
|
507
|
+
pnpm add intlayer vue-router
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
```bash packageManager="yarn"
|
|
511
|
+
yarn add intlayer vue-router
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Then, create a router configuration that handles locale-based routing:
|
|
515
|
+
|
|
516
|
+
```js fileName="src/router/index.ts"
|
|
517
|
+
import {
|
|
518
|
+
configuration,
|
|
519
|
+
getPathWithoutLocale,
|
|
520
|
+
localeFlatMap,
|
|
521
|
+
type Locales,
|
|
522
|
+
} from 'intlayer';
|
|
523
|
+
import { createIntlayerClient } from 'vue-intlayer';
|
|
524
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
525
|
+
import HomeView from './views/home/HomeView.vue';
|
|
526
|
+
import RootView from './views/root/Root.vue';
|
|
527
|
+
|
|
528
|
+
// Get internationalization configuration
|
|
529
|
+
const { internationalization, middleware } = configuration;
|
|
530
|
+
const { defaultLocale } = internationalization;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Declare the routes with locale-specific paths and metadata.
|
|
534
|
+
*/
|
|
535
|
+
const routes = localeFlatMap((localizedData) => [
|
|
536
|
+
{
|
|
537
|
+
path: `${localizedData.urlPrefix}/`,
|
|
538
|
+
name: `Root-${localizedData.locale}`,
|
|
539
|
+
component: RootView,
|
|
540
|
+
meta: {
|
|
541
|
+
locale: localizedData.locale,
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
path: `${localizedData.urlPrefix}/home`,
|
|
546
|
+
name: `Home-${localizedData.locale}`,
|
|
547
|
+
component: HomeView,
|
|
548
|
+
meta: {
|
|
549
|
+
locale: localizedData.locale,
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
]);
|
|
553
|
+
|
|
554
|
+
// Create the router instance
|
|
555
|
+
export const router = createRouter({
|
|
556
|
+
history: createWebHistory(),
|
|
557
|
+
routes,
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// Add navigation guard for locale handling
|
|
561
|
+
router.beforeEach((to, _from, next) => {
|
|
562
|
+
const client = createIntlayerClient();
|
|
563
|
+
|
|
564
|
+
const metaLocale = to.meta.locale as Locales | undefined;
|
|
565
|
+
|
|
566
|
+
if (metaLocale) {
|
|
567
|
+
// Reuse the locale defined in the route meta
|
|
568
|
+
client.setLocale(metaLocale);
|
|
569
|
+
next();
|
|
570
|
+
} else {
|
|
571
|
+
// Fallback: no locale in meta, possibly unmatched route
|
|
572
|
+
// Optional: handle 404 or redirect to default locale
|
|
573
|
+
client.setLocale(defaultLocale);
|
|
574
|
+
|
|
575
|
+
if (middleware.prefixDefault) {
|
|
576
|
+
next(`/${defaultLocale}${getPathWithoutLocale(to.path)}`);
|
|
577
|
+
} else {
|
|
578
|
+
next(getPathWithoutLocale(to.path));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
> The name is used to identify the route in the router. It should be unique across all routes to avoid conflicts and ensure proper navigation and linking.
|
|
585
|
+
|
|
586
|
+
Then, register the router in your main.js file:
|
|
587
|
+
|
|
588
|
+
```js fileName="src/main.ts"
|
|
589
|
+
import { createApp } from "vue";
|
|
590
|
+
import App from "./App.vue";
|
|
591
|
+
import { router } from "./router";
|
|
592
|
+
import "./style.css";
|
|
593
|
+
|
|
594
|
+
const app = createApp(App);
|
|
595
|
+
|
|
596
|
+
// Add the router to the app
|
|
597
|
+
app.use(router);
|
|
598
|
+
|
|
599
|
+
// Mount the app
|
|
600
|
+
app.mount("#app");
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Then update your `App.vue` file to render the RouterView component. This component will display the matched component for the current route.
|
|
604
|
+
|
|
605
|
+
```vue fileName="src/App.vue"
|
|
606
|
+
<script setup lang="ts">
|
|
607
|
+
import LocaleSwitcher from "@components/LocaleSwitcher.vue";
|
|
608
|
+
</script>
|
|
609
|
+
|
|
610
|
+
<template>
|
|
611
|
+
<nav>
|
|
612
|
+
<LocaleSwitcher />
|
|
613
|
+
</nav>
|
|
614
|
+
<RouterView />
|
|
615
|
+
</template>
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
In parallel, you can also use the `intLayerMiddlewarePlugin` to add server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
|
|
619
|
+
|
|
620
|
+
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
621
|
+
import { defineConfig } from "vite";
|
|
622
|
+
import vue from "@vitejs/plugin-vue";
|
|
623
|
+
import { intlayerPlugin, intLayerMiddlewarePlugin } from "vite-intlayer";
|
|
624
|
+
|
|
625
|
+
// https://vitejs.dev/config/
|
|
626
|
+
export default defineConfig({
|
|
627
|
+
plugins: [vue(), intlayerPlugin(), intLayerMiddlewarePlugin()],
|
|
628
|
+
});
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
632
|
+
import { defineConfig } from "vite";
|
|
633
|
+
import vue from "@vitejs/plugin-vue";
|
|
634
|
+
import { intlayerPlugin, intLayerMiddlewarePlugin } from "vite-intlayer";
|
|
635
|
+
|
|
636
|
+
// https://vitejs.dev/config/
|
|
637
|
+
export default defineConfig({
|
|
638
|
+
plugins: [vue(), intlayerPlugin(), intLayerMiddlewarePlugin()],
|
|
639
|
+
});
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
643
|
+
const { defineConfig } = require("vite");
|
|
644
|
+
const vue = require("@vitejs/plugin-vue");
|
|
645
|
+
const { intlayerPlugin, intLayerMiddlewarePlugin } = require("vite-intlayer");
|
|
646
|
+
|
|
647
|
+
// https://vitejs.dev/config/
|
|
648
|
+
module.exports = defineConfig({
|
|
649
|
+
plugins: [vue(), intlayerPlugin(), intLayerMiddlewarePlugin()],
|
|
650
|
+
});
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
### (Optional) Step 8: Change the URL when the locale changes
|
|
654
|
+
|
|
655
|
+
To automatically update the URL when the user changes the language, you can modify the `LocaleSwitcher` component to use Vue Router:
|
|
656
|
+
|
|
657
|
+
```vue fileName="src/components/LocaleSwitcher.vue"
|
|
658
|
+
<template>
|
|
659
|
+
<div class="locale-switcher">
|
|
660
|
+
<select v-model="selectedLocale" @change="changeLocale">
|
|
661
|
+
<option v-for="loc in availableLocales" :key="loc" :value="loc">
|
|
662
|
+
{{ getLocaleName(loc) }}
|
|
663
|
+
</option>
|
|
664
|
+
</select>
|
|
665
|
+
</div>
|
|
666
|
+
</template>
|
|
667
|
+
|
|
668
|
+
<script setup lang="ts">
|
|
669
|
+
import { ref, watch } from "vue";
|
|
670
|
+
import { useRouter } from "vue-router";
|
|
671
|
+
import { Locales, getLocaleName, getLocalizedUrl } from "intlayer";
|
|
672
|
+
import { useLocale } from "vue-intlayer";
|
|
673
|
+
|
|
674
|
+
// Get Vue Router
|
|
675
|
+
const router = useRouter();
|
|
676
|
+
|
|
677
|
+
// Get locale information and setLocale function
|
|
678
|
+
const { locale, availableLocales, setLocale } = useLocale({
|
|
679
|
+
onLocaleChange: (newLocale) => {
|
|
680
|
+
// Get current route and create a localized URL
|
|
681
|
+
const currentPath = router.currentRoute.value.fullPath;
|
|
682
|
+
const localizedPath = getLocalizedUrl(currentPath, newLocale);
|
|
683
|
+
|
|
684
|
+
// Navigate to the localized route without reloading the page
|
|
685
|
+
router.push(localizedPath);
|
|
686
|
+
},
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
// Track the selected locale with a ref
|
|
690
|
+
const selectedLocale = ref(locale.value);
|
|
691
|
+
|
|
692
|
+
// Update the locale when the selection changes
|
|
693
|
+
const changeLocale = () => {
|
|
694
|
+
setLocale(selectedLocale.value);
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
// Keep the selectedLocale in sync with the global locale
|
|
698
|
+
watch(
|
|
699
|
+
() => locale.value,
|
|
700
|
+
(newLocale) => {
|
|
701
|
+
selectedLocale.value = newLocale;
|
|
702
|
+
}
|
|
703
|
+
);
|
|
704
|
+
</script>
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Tip: For better SEO and accessibility, use tags as `<a href="/fr/home" hreflang="fr">` to link to localized pages, as shown in Step 10. This allows search engines to discover and index language-specific URLs properly. To preserve SPA behavior, you can prevent the default navigation with @click.prevent, change the locale using useLocale, and programmatically navigate using Vue Router.
|
|
708
|
+
|
|
709
|
+
```html
|
|
710
|
+
<ol class="divide-text/20 divide-y divide-dashed overflow-y-auto p-1">
|
|
711
|
+
<li>
|
|
712
|
+
<a
|
|
713
|
+
hreflang="x-default"
|
|
714
|
+
aria-label="Switch to English"
|
|
715
|
+
target="_self"
|
|
716
|
+
aria-current="page"
|
|
717
|
+
href="/doc/get-started"
|
|
718
|
+
>
|
|
719
|
+
<div>
|
|
720
|
+
<span dir="ltr" lang="en">English</span>
|
|
721
|
+
<span>English</span>
|
|
722
|
+
<span>EN</span>
|
|
723
|
+
</div>
|
|
724
|
+
</a>
|
|
725
|
+
</li>
|
|
726
|
+
<li>
|
|
727
|
+
<a
|
|
728
|
+
hreflang="es"
|
|
729
|
+
aria-label="Switch to Spanish"
|
|
730
|
+
target="_self"
|
|
731
|
+
href="/es/doc/get-started"
|
|
732
|
+
>
|
|
733
|
+
<div>
|
|
734
|
+
<span dir="ltr" lang="es">Español</span>
|
|
735
|
+
<span>Spanish</span>
|
|
736
|
+
<span>ES</span>
|
|
737
|
+
</div>
|
|
738
|
+
</a>
|
|
739
|
+
</li>
|
|
740
|
+
</ol>
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
### (Optional) Step 9: Switch the HTML Language and Direction Attributes
|
|
744
|
+
|
|
745
|
+
When your application supports multiple languages, it's crucial to update the `<html>` tag's `lang` and `dir` attributes to match the current locale. Doing so ensures:
|
|
746
|
+
|
|
747
|
+
- **Accessibility**: Screen readers and assistive technologies rely on the correct `lang` attribute to pronounce and interpret content accurately.
|
|
748
|
+
- **Text Rendering**: The `dir` (direction) attribute ensures that text is rendered in the proper order (e.g., left-to-right for English, right-to-left for Arabic or Hebrew), which is essential for readability.
|
|
749
|
+
- **SEO**: Search engines use the `lang` attribute to determine the language of your page, helping to serve the right localized content in search results.
|
|
750
|
+
|
|
751
|
+
By updating these attributes dynamically when the locale changes, you guarantee a consistent and accessible experience for users across all supported languages.
|
|
752
|
+
|
|
753
|
+
```js fileName="src/composables/useI18nHTMLAttributes.ts"
|
|
754
|
+
import { watch } from "vue";
|
|
755
|
+
import { useLocale } from "vue-intlayer";
|
|
756
|
+
import { getHTMLTextDir } from "intlayer";
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Composable that updates the HTML <html> element's `lang` and `dir` attributes
|
|
760
|
+
* based on the current locale.
|
|
761
|
+
*
|
|
762
|
+
* @example
|
|
763
|
+
* // In your App.vue or a global component
|
|
764
|
+
* import { useI18nHTMLAttributes } from './composables/useI18nHTMLAttributes'
|
|
765
|
+
*
|
|
766
|
+
* useI18nHTMLAttributes()
|
|
767
|
+
*/
|
|
768
|
+
export const useI18nHTMLAttributes = () => {
|
|
769
|
+
const { locale } = useLocale();
|
|
770
|
+
|
|
771
|
+
// Update the HTML attributes whenever the locale changes
|
|
772
|
+
watch(
|
|
773
|
+
() => locale.value,
|
|
774
|
+
(newLocale) => {
|
|
775
|
+
if (!newLocale) return;
|
|
776
|
+
|
|
777
|
+
// Update the language attribute
|
|
778
|
+
document.documentElement.lang = newLocale;
|
|
779
|
+
|
|
780
|
+
// Set the text direction (ltr for most languages, rtl for Arabic, Hebrew, etc.)
|
|
781
|
+
document.documentElement.dir = getHTMLTextDir(newLocale);
|
|
782
|
+
},
|
|
783
|
+
{ immediate: true }
|
|
784
|
+
);
|
|
785
|
+
};
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
Use this composable in your `App.vue` or a global component:
|
|
789
|
+
|
|
790
|
+
```vue fileName="src/App.vue"
|
|
791
|
+
<script setup lang="ts">
|
|
792
|
+
import { useI18nHTMLAttributes } from "@composables/useI18nHTMLAttributes";
|
|
793
|
+
|
|
794
|
+
// Apply the HTML attributes based on the current locale
|
|
795
|
+
useI18nHTMLAttributes();
|
|
796
|
+
</script>
|
|
797
|
+
|
|
798
|
+
<template>
|
|
799
|
+
<!-- Your app template -->
|
|
800
|
+
</template>
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
### (Optional) Step 10: Creating a Localized Link Component
|
|
804
|
+
|
|
805
|
+
To ensure that your application’s navigation respects the current locale, you can create a custom `Link` component. This component automatically prefixes internal URLs with the current language, so that. For example, when a French-speaking user clicks on a link to the "About" page, they are redirected to `/fr/about` instead of `/about`.
|
|
806
|
+
|
|
807
|
+
This behavior is useful for several reasons:
|
|
808
|
+
|
|
809
|
+
- **SEO and User Experience**: Localized URLs help search engines index language-specific pages correctly and provide users with content in their preferred language.
|
|
810
|
+
- **Consistency**: By using a localized link throughout your application, you guarantee that navigation stays within the current locale, preventing unexpected language switches.
|
|
811
|
+
- **Maintainability**: Centralizing the localization logic in a single component simplifies the management of URLs, making your codebase easier to maintain and extend as your application grows.
|
|
812
|
+
|
|
813
|
+
```vue fileName="src/components/Link.vue"
|
|
814
|
+
<template>
|
|
815
|
+
<a :href="localizedHref" v-bind="$attrs">
|
|
816
|
+
<slot />
|
|
817
|
+
</a>
|
|
818
|
+
</template>
|
|
819
|
+
|
|
820
|
+
<script setup lang="ts">
|
|
821
|
+
import { computed } from "vue";
|
|
822
|
+
import { getLocalizedUrl } from "intlayer";
|
|
823
|
+
import { useLocale } from "vue-intlayer";
|
|
824
|
+
|
|
825
|
+
const props = defineProps({
|
|
826
|
+
href: {
|
|
827
|
+
type: String,
|
|
828
|
+
required: true,
|
|
829
|
+
},
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
const { locale } = useLocale();
|
|
833
|
+
|
|
834
|
+
// Check if the link is external
|
|
835
|
+
const isExternalLink = computed(() => /^https?:\/\//.test(props.href || ""));
|
|
836
|
+
|
|
837
|
+
// Create a localized href for internal links
|
|
838
|
+
const localizedHref = computed(() =>
|
|
839
|
+
isExternalLink.value ? props.href : getLocalizedUrl(props.href, locale.value)
|
|
840
|
+
);
|
|
841
|
+
</script>
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
For use with Vue Router, create a router-specific version:
|
|
845
|
+
|
|
846
|
+
```vue fileName="src/components/RouterLink.vue"
|
|
847
|
+
<template>
|
|
848
|
+
<router-link :to="localizedTo" v-bind="$attrs">
|
|
849
|
+
<slot />
|
|
850
|
+
</router-link>
|
|
851
|
+
</template>
|
|
852
|
+
|
|
853
|
+
<script setup lang="ts">
|
|
854
|
+
import { computed } from "vue";
|
|
855
|
+
import { getLocalizedUrl } from "intlayer";
|
|
856
|
+
import { useLocale } from "vue-intlayer";
|
|
857
|
+
|
|
858
|
+
const props = defineProps({
|
|
859
|
+
to: {
|
|
860
|
+
type: [String, Object],
|
|
861
|
+
required: true,
|
|
862
|
+
},
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
const { locale } = useLocale();
|
|
866
|
+
|
|
867
|
+
// Create localized to-prop for router-link
|
|
868
|
+
const localizedTo = computed(() => {
|
|
869
|
+
if (typeof props.to === "string") {
|
|
870
|
+
return getLocalizedUrl(props.to, locale.value);
|
|
871
|
+
} else {
|
|
872
|
+
// If 'to' is an object, localize the path property
|
|
873
|
+
return {
|
|
874
|
+
...props.to,
|
|
875
|
+
path: getLocalizedUrl(props.to.path ?? "/", locale.value),
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
</script>
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Use these components in your application:
|
|
883
|
+
|
|
884
|
+
```vue fileName="src/App.vue"
|
|
885
|
+
<template>
|
|
886
|
+
<div>
|
|
887
|
+
<!-- Vue router -->
|
|
888
|
+
<RouterLink to="/">Root</RouterLink>
|
|
889
|
+
<RouterLink to="/home">Home</RouterLink>
|
|
890
|
+
<!-- Other -->
|
|
891
|
+
<Link href="/">Root</Link>
|
|
892
|
+
<Link href="/home">Home</Link>
|
|
893
|
+
</div>
|
|
894
|
+
</template>
|
|
895
|
+
|
|
896
|
+
<script setup lang="ts">
|
|
897
|
+
import Link from "@components/Link.vue";
|
|
898
|
+
import RouterLink from "@components/RouterLink.vue";
|
|
899
|
+
</script>
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
### (Optional) Step 11: Render Markdown
|
|
903
|
+
|
|
904
|
+
Intlayer supports rendering Markdown content directly in your Vue application. By default, Markdown is treated as plain text. To convert Markdown into rich HTML, you can integrate [markdown-it](https://github.com/markdown-it/markdown-it), a Markdown parser.
|
|
905
|
+
|
|
906
|
+
This is particularly useful when your translations include formatted content like lists, links, or emphasis.
|
|
907
|
+
|
|
908
|
+
By default Intlayer render markdown as string. But Intlayer also provides a way to render markdown into HTML using the `installIntlayerMarkdown` function.
|
|
909
|
+
|
|
910
|
+
> To see how to declare markdown content using the `intlayer` package, see the [markdown doc](https://github.com/aymericzip/intlayer/tree/main/docs/en/dictionary/markdown.md).
|
|
911
|
+
|
|
912
|
+
```ts filename="main.ts"
|
|
913
|
+
import MarkdownIt from "markdown-it";
|
|
914
|
+
import { createApp, h } from "vue";
|
|
915
|
+
import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|
|
916
|
+
|
|
917
|
+
const app = createApp(App);
|
|
918
|
+
|
|
919
|
+
installIntlayer(app);
|
|
920
|
+
|
|
921
|
+
const md = new MarkdownIt({
|
|
922
|
+
html: true, // allow HTML tags
|
|
923
|
+
linkify: true, // auto-link URLs
|
|
924
|
+
typographer: true, // enable smart quotes, dashes, etc.
|
|
925
|
+
});
|
|
926
|
+
|
|
927
|
+
// Tell Intlayer to use md.render() whenever it needs to turn markdown into HTML
|
|
928
|
+
installIntlayerMarkdown(app, (markdown) => {
|
|
929
|
+
const html = md.render(markdown);
|
|
930
|
+
return h("div", { innerHTML: html });
|
|
931
|
+
});
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
Once registered, you can use the component-based syntax to display the Markdown content directly:
|
|
935
|
+
|
|
936
|
+
```vue
|
|
937
|
+
<template>
|
|
938
|
+
<div>
|
|
939
|
+
<myMarkdownContent />
|
|
940
|
+
</div>
|
|
941
|
+
</template>
|
|
942
|
+
|
|
943
|
+
<script setup lang="ts">
|
|
944
|
+
import { useIntlayer } from "vue-intlayer";
|
|
945
|
+
|
|
946
|
+
const { myMarkdownContent } = useIntlayer("my-component");
|
|
947
|
+
</script>
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
### Configure TypeScript
|
|
951
|
+
|
|
952
|
+
Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
953
|
+
|
|
954
|
+

|
|
955
|
+
|
|
956
|
+

|
|
957
|
+
|
|
958
|
+
Ensure your TypeScript configuration includes the autogenerated types.
|
|
959
|
+
|
|
960
|
+
```json5 fileName="tsconfig.json"
|
|
961
|
+
{
|
|
962
|
+
// ... Your existing TypeScript configurations
|
|
963
|
+
"include": [
|
|
964
|
+
// ... Your existing TypeScript configurations
|
|
965
|
+
".intlayer/**/*.ts", // Include the auto-generated types
|
|
966
|
+
],
|
|
967
|
+
}
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
### Git Configuration
|
|
971
|
+
|
|
972
|
+
It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
|
|
973
|
+
|
|
974
|
+
To do this, you can add the following instructions to your `.gitignore` file:
|
|
975
|
+
|
|
976
|
+
```plaintext
|
|
977
|
+
# Ignore the files generated by Intlayer
|
|
978
|
+
.intlayer
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
### VS Code Extension
|
|
982
|
+
|
|
983
|
+
To improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.
|
|
984
|
+
|
|
985
|
+
[Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
986
|
+
|
|
987
|
+
This extension provides:
|
|
988
|
+
|
|
989
|
+
- **Autocompletion** for translation keys.
|
|
990
|
+
- **Real-time error detection** for missing translations.
|
|
991
|
+
- **Inline previews** of translated content.
|
|
992
|
+
- **Quick actions** to easily create and update translations.
|
|
993
|
+
|
|
994
|
+
For more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
|
|
995
|
+
|
|
996
|
+
---
|
|
997
|
+
|
|
998
|
+
### Go Further
|
|
999
|
+
|
|
1000
|
+
To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_visual_editor.md) or externalize your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_CMS.md).
|