@intlayer/docs 5.5.11 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/intlayer_with_next-intl.md +0 -1
- package/blog/ar/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/ar/what_is_internationalization.md +2 -2
- package/blog/de/intlayer_with_next-intl.md +0 -1
- package/blog/de/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/de/what_is_internationalization.md +2 -2
- package/blog/en/intlayer_with_next-intl.md +0 -1
- package/blog/en/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/en/what_is_internationalization.md +2 -2
- package/blog/en-GB/intlayer_with_next-intl.md +0 -1
- package/blog/en-GB/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/en-GB/what_is_internationalization.md +2 -2
- package/blog/es/intlayer_with_next-intl.md +0 -1
- package/blog/es/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/es/what_is_internationalization.md +2 -2
- package/blog/fr/intlayer_with_next-intl.md +0 -1
- package/blog/fr/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/fr/what_is_internationalization.md +2 -2
- package/blog/hi/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/hi/what_is_internationalization.md +2 -2
- package/blog/it/intlayer_with_next-intl.md +0 -1
- package/blog/it/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/it/what_is_internationalization.md +2 -2
- package/blog/ja/intlayer_with_next-intl.md +0 -1
- package/blog/ja/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/ja/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/ja/what_is_internationalization.md +2 -2
- package/blog/ko/intlayer_with_next-intl.md +0 -1
- package/blog/ko/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/ko/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/ko/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/ko/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/ko/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/pt/intlayer_with_next-intl.md +0 -1
- package/blog/pt/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/pt/what_is_internationalization.md +2 -2
- package/blog/ru/intlayer_with_next-intl.md +0 -1
- package/blog/ru/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/ru/what_is_internationalization.md +2 -2
- package/blog/zh/intlayer_with_next-intl.md +0 -1
- package/blog/zh/list_i18n_technologies/CMS/wordpress.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/angular.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/flutter.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/react-native.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/react.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/svelte.md +1 -1
- package/blog/zh/list_i18n_technologies/frameworks/vue.md +1 -1
- package/blog/zh/what_is_internationalization.md +2 -2
- package/dist/cjs/blog.cjs +2 -2
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +17 -6
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs +2 -2
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs +2 -2
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +1152 -252
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +3778 -1124
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +794 -161
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +32 -31
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/legal.cjs +2 -2
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs +2 -2
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +17 -6
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs +2 -2
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs +2 -2
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +1151 -252
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +3777 -1124
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +793 -161
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +31 -31
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/legal.mjs +2 -2
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/blog.d.ts +2 -2
- package/dist/types/blog.d.ts.map +1 -1
- package/dist/types/common.d.ts +5 -2
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/doc.d.ts +2 -2
- package/dist/types/doc.d.ts.map +1 -1
- package/dist/types/frequentQuestions.d.ts +2 -2
- package/dist/types/frequentQuestions.d.ts.map +1 -1
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/dist/types/legal.d.ts +2 -2
- package/dist/types/legal.d.ts.map +1 -1
- package/docs/ar/intlayer_CMS.md +1 -0
- package/docs/ar/intlayer_cli.md +292 -177
- package/docs/ar/intlayer_visual_editor.md +1 -0
- package/docs/ar/intlayer_with_angular.md +1 -0
- package/docs/ar/intlayer_with_create_react_app.md +1 -0
- package/docs/ar/intlayer_with_lynx+react.md +1 -0
- package/docs/ar/intlayer_with_nextjs_14.md +1 -0
- package/docs/ar/intlayer_with_nextjs_15.md +3 -1
- package/docs/ar/intlayer_with_nuxt.md +1 -0
- package/docs/ar/intlayer_with_react_native+expo.md +1 -0
- package/docs/ar/intlayer_with_vite+preact.md +4 -3
- package/docs/ar/intlayer_with_vite+react.md +108 -112
- package/docs/ar/intlayer_with_vite+solid.md +4 -3
- package/docs/ar/intlayer_with_vite+svelte.md +4 -3
- package/docs/ar/intlayer_with_vite+vue.md +5 -4
- package/docs/ar/mcp_server.md +126 -92
- package/docs/de/intlayer_CMS.md +1 -0
- package/docs/de/intlayer_cli.md +291 -171
- package/docs/de/intlayer_visual_editor.md +1 -0
- package/docs/de/intlayer_with_angular.md +1 -0
- package/docs/de/intlayer_with_create_react_app.md +1 -0
- package/docs/de/intlayer_with_lynx+react.md +1 -0
- package/docs/de/intlayer_with_nextjs_14.md +1 -0
- package/docs/de/intlayer_with_nextjs_15.md +3 -1
- package/docs/de/intlayer_with_nuxt.md +1 -0
- package/docs/de/intlayer_with_react_native+expo.md +1 -0
- package/docs/de/intlayer_with_vite+preact.md +4 -3
- package/docs/de/intlayer_with_vite+react.md +128 -146
- package/docs/de/intlayer_with_vite+solid.md +4 -3
- package/docs/de/intlayer_with_vite+svelte.md +4 -3
- package/docs/de/intlayer_with_vite+vue.md +5 -4
- package/docs/de/mcp_server.md +116 -112
- package/docs/en/CI_CD.md +3 -1
- package/docs/en/autoFill.md +3 -1
- package/docs/en/configuration.md +7 -3
- package/docs/en/dictionary/condition.md +3 -1
- package/docs/en/dictionary/content_extention_customization.md +3 -1
- package/docs/en/dictionary/enumeration.md +3 -1
- package/docs/en/dictionary/file.md +3 -1
- package/docs/en/dictionary/function_fetching.md +3 -1
- package/docs/en/dictionary/get_started.md +3 -1
- package/docs/en/dictionary/insertion.md +3 -1
- package/docs/en/dictionary/markdown.md +3 -1
- package/docs/en/dictionary/nesting.md +3 -1
- package/docs/en/dictionary/translation.md +3 -1
- package/docs/en/how_works_intlayer.md +3 -1
- package/docs/en/index.md +3 -1
- package/docs/en/interest_of_intlayer.md +3 -1
- package/docs/en/intlayer_CMS.md +4 -1
- package/docs/en/intlayer_cli.md +246 -136
- package/docs/en/intlayer_visual_editor.md +4 -1
- package/docs/en/intlayer_with_angular.md +4 -1
- package/docs/en/intlayer_with_create_react_app.md +4 -1
- package/docs/en/intlayer_with_express.md +3 -1
- package/docs/en/intlayer_with_lynx+react.md +4 -1
- package/docs/en/intlayer_with_nextjs_14.md +7 -1
- package/docs/en/intlayer_with_nextjs_15.md +8 -2
- package/docs/en/intlayer_with_nextjs_page_router.md +5 -1
- package/docs/en/intlayer_with_nuxt.md +4 -1
- package/docs/en/intlayer_with_react_native+expo.md +4 -1
- package/docs/en/intlayer_with_vite+preact.md +9 -4
- package/docs/en/intlayer_with_vite+react.md +18 -10
- package/docs/en/intlayer_with_vite+solid.md +7 -4
- package/docs/en/intlayer_with_vite+svelte.md +7 -4
- package/docs/en/intlayer_with_vite+vue.md +10 -5
- package/docs/en/introduction.md +3 -1
- package/docs/en/mcp_server.md +114 -80
- package/docs/en/packages/@intlayer/api/index.md +3 -1
- package/docs/en/packages/@intlayer/chokidar/index.md +3 -1
- package/docs/en/packages/@intlayer/cli/index.md +3 -1
- package/docs/en/packages/@intlayer/config/index.md +3 -1
- package/docs/en/packages/@intlayer/core/index.md +3 -1
- package/docs/en/packages/@intlayer/design-system/index.md +3 -1
- package/docs/en/packages/@intlayer/dictionary-entry/index.md +3 -1
- package/docs/en/packages/@intlayer/editor/index.md +3 -1
- package/docs/en/packages/@intlayer/editor-react/index.md +3 -1
- package/docs/en/packages/@intlayer/webpack/index.md +3 -1
- package/docs/en/packages/angular-intlayer/index.md +3 -1
- package/docs/en/packages/express-intlayer/index.md +3 -1
- package/docs/en/packages/express-intlayer/t.md +3 -1
- package/docs/en/packages/intlayer/getConfiguration.md +3 -1
- package/docs/en/packages/intlayer/getEnumeration.md +3 -1
- package/docs/en/packages/intlayer/getHTMLTextDir.md +3 -1
- package/docs/en/packages/intlayer/getLocaleLang.md +3 -1
- package/docs/en/packages/intlayer/getLocaleName.md +3 -1
- package/docs/en/packages/intlayer/getLocalizedUrl.md +3 -1
- package/docs/en/packages/intlayer/getMultilingualUrls.md +3 -1
- package/docs/en/packages/intlayer/getPathWithoutLocale.md +3 -1
- package/docs/en/packages/intlayer/getTranslation.md +3 -1
- package/docs/en/packages/intlayer/getTranslationContent.md +3 -1
- package/docs/en/packages/intlayer/index.md +3 -1
- package/docs/en/packages/intlayer-cli/index.md +3 -1
- package/docs/en/packages/intlayer-editor/index.md +3 -1
- package/docs/en/packages/lynx-intlayer/index.md +3 -1
- package/docs/en/packages/next-intlayer/index.md +3 -1
- package/docs/en/packages/next-intlayer/t.md +3 -1
- package/docs/en/packages/next-intlayer/useDictionary.md +3 -1
- package/docs/en/packages/next-intlayer/useIntlayer.md +3 -1
- package/docs/en/packages/next-intlayer/useIntlayerAsync.md +3 -1
- package/docs/en/packages/next-intlayer/useLocale.md +3 -1
- package/docs/en/packages/nuxt-intlayer/index.md +3 -1
- package/docs/en/packages/preact-intlayer/index.md +3 -1
- package/docs/en/packages/react-intlayer/index.md +3 -1
- package/docs/en/packages/react-intlayer/t.md +3 -1
- package/docs/en/packages/react-intlayer/useDictionary.md +3 -1
- package/docs/en/packages/react-intlayer/useIntlayer.md +3 -1
- package/docs/en/packages/react-intlayer/useIntlayerAsync.md +3 -1
- package/docs/en/packages/react-intlayer/useLocale.md +3 -1
- package/docs/en/packages/react-native-intlayer/index.md +3 -1
- package/docs/en/packages/react-scripts-intlayer/index.md +3 -1
- package/docs/en/packages/solid-intlayer/index.md +3 -1
- package/docs/en/packages/svelte-intlayer/index.md +3 -1
- package/docs/en/packages/vite-intlayer/index.md +3 -1
- package/docs/en/packages/vue-intlayer/index.md +3 -1
- package/docs/en/per_locale_file.md +3 -1
- package/docs/en/roadmap.md +5 -2
- package/docs/en/vs_code_extension.md +3 -1
- package/docs/en-GB/intlayer_CMS.md +1 -0
- package/docs/en-GB/intlayer_cli.md +257 -138
- package/docs/en-GB/intlayer_visual_editor.md +1 -0
- package/docs/en-GB/intlayer_with_angular.md +1 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +1 -0
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -0
- package/docs/en-GB/intlayer_with_nextjs_14.md +1 -0
- package/docs/en-GB/intlayer_with_nextjs_15.md +3 -1
- package/docs/en-GB/intlayer_with_nuxt.md +1 -0
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -0
- package/docs/en-GB/intlayer_with_vite+preact.md +4 -3
- package/docs/en-GB/intlayer_with_vite+react.md +71 -87
- package/docs/en-GB/intlayer_with_vite+solid.md +4 -3
- package/docs/en-GB/intlayer_with_vite+svelte.md +4 -3
- package/docs/en-GB/intlayer_with_vite+vue.md +5 -4
- package/docs/en-GB/mcp_server.md +116 -82
- package/docs/es/intlayer_CMS.md +1 -0
- package/docs/es/intlayer_cli.md +283 -164
- package/docs/es/intlayer_visual_editor.md +1 -0
- package/docs/es/intlayer_with_angular.md +1 -0
- package/docs/es/intlayer_with_create_react_app.md +1 -0
- package/docs/es/intlayer_with_lynx+react.md +1 -0
- package/docs/es/intlayer_with_nextjs_14.md +1 -0
- package/docs/es/intlayer_with_nextjs_15.md +3 -1
- package/docs/es/intlayer_with_nuxt.md +1 -0
- package/docs/es/intlayer_with_react_native+expo.md +1 -0
- package/docs/es/intlayer_with_vite+preact.md +4 -3
- package/docs/es/intlayer_with_vite+react.md +98 -98
- package/docs/es/intlayer_with_vite+solid.md +4 -3
- package/docs/es/intlayer_with_vite+svelte.md +4 -3
- package/docs/es/intlayer_with_vite+vue.md +5 -4
- package/docs/es/mcp_server.md +120 -86
- package/docs/es/vs_code_extension.md +1 -0
- package/docs/fr/intlayer_CMS.md +1 -0
- package/docs/fr/intlayer_cli.md +280 -184
- package/docs/fr/intlayer_visual_editor.md +1 -0
- package/docs/fr/intlayer_with_angular.md +1 -0
- package/docs/fr/intlayer_with_create_react_app.md +1 -0
- package/docs/fr/intlayer_with_lynx+react.md +1 -0
- package/docs/fr/intlayer_with_nextjs_14.md +1 -0
- package/docs/fr/intlayer_with_nextjs_15.md +3 -1
- package/docs/fr/intlayer_with_nuxt.md +1 -0
- package/docs/fr/intlayer_with_react_native+expo.md +1 -0
- package/docs/fr/intlayer_with_vite+preact.md +5 -4
- package/docs/fr/intlayer_with_vite+react.md +80 -69
- package/docs/fr/intlayer_with_vite+solid.md +4 -3
- package/docs/fr/intlayer_with_vite+svelte.md +4 -3
- package/docs/fr/intlayer_with_vite+vue.md +5 -4
- package/docs/fr/mcp_server.md +121 -87
- package/docs/hi/intlayer_CMS.md +1 -0
- package/docs/hi/intlayer_cli.md +295 -174
- package/docs/hi/intlayer_visual_editor.md +1 -0
- package/docs/hi/intlayer_with_angular.md +1 -0
- package/docs/hi/intlayer_with_create_react_app.md +1 -0
- package/docs/hi/intlayer_with_lynx+react.md +1 -0
- package/docs/hi/intlayer_with_nextjs_14.md +1 -0
- package/docs/hi/intlayer_with_nextjs_15.md +3 -1
- package/docs/hi/intlayer_with_nuxt.md +1 -0
- package/docs/hi/intlayer_with_react_native+expo.md +1 -0
- package/docs/hi/intlayer_with_vite+preact.md +4 -3
- package/docs/hi/intlayer_with_vite+react.md +114 -111
- package/docs/hi/intlayer_with_vite+solid.md +4 -3
- package/docs/hi/intlayer_with_vite+svelte.md +4 -3
- package/docs/hi/intlayer_with_vite+vue.md +5 -4
- package/docs/hi/mcp_server.md +118 -84
- package/docs/it/intlayer_CMS.md +1 -0
- package/docs/it/intlayer_cli.md +282 -167
- package/docs/it/intlayer_visual_editor.md +1 -0
- package/docs/it/intlayer_with_angular.md +1 -0
- package/docs/it/intlayer_with_create_react_app.md +1 -0
- package/docs/it/intlayer_with_lynx+react.md +1 -0
- package/docs/it/intlayer_with_nextjs_14.md +1 -0
- package/docs/it/intlayer_with_nextjs_15.md +3 -1
- package/docs/it/intlayer_with_nuxt.md +1 -0
- package/docs/it/intlayer_with_react_native+expo.md +1 -0
- package/docs/it/intlayer_with_vite+preact.md +4 -3
- package/docs/it/intlayer_with_vite+react.md +163 -116
- package/docs/it/intlayer_with_vite+solid.md +4 -3
- package/docs/it/intlayer_with_vite+svelte.md +4 -3
- package/docs/it/intlayer_with_vite+vue.md +4 -4
- package/docs/it/mcp_server.md +120 -86
- package/docs/ja/intlayer_CMS.md +1 -0
- package/docs/ja/intlayer_cli.md +285 -168
- package/docs/ja/intlayer_visual_editor.md +1 -0
- package/docs/ja/intlayer_with_angular.md +1 -0
- package/docs/ja/intlayer_with_create_react_app.md +1 -0
- package/docs/ja/intlayer_with_lynx+react.md +1 -0
- package/docs/ja/intlayer_with_nextjs_14.md +1 -0
- package/docs/ja/intlayer_with_nextjs_15.md +3 -1
- package/docs/ja/intlayer_with_nuxt.md +1 -0
- package/docs/ja/intlayer_with_react_native+expo.md +1 -0
- package/docs/ja/intlayer_with_vite+preact.md +4 -3
- package/docs/ja/intlayer_with_vite+react.md +160 -222
- package/docs/ja/intlayer_with_vite+solid.md +4 -3
- package/docs/ja/intlayer_with_vite+svelte.md +4 -3
- package/docs/ja/intlayer_with_vite+vue.md +5 -4
- package/docs/ja/mcp_server.md +121 -85
- package/docs/ko/intlayer_CMS.md +1 -0
- package/docs/ko/intlayer_cli.md +291 -175
- package/docs/ko/intlayer_visual_editor.md +1 -0
- package/docs/ko/intlayer_with_angular.md +1 -0
- package/docs/ko/intlayer_with_create_react_app.md +1 -0
- package/docs/ko/intlayer_with_lynx+react.md +1 -0
- package/docs/ko/intlayer_with_nextjs_14.md +1 -0
- package/docs/ko/intlayer_with_nextjs_15.md +3 -1
- package/docs/ko/intlayer_with_nuxt.md +1 -0
- package/docs/ko/intlayer_with_react_native+expo.md +1 -0
- package/docs/ko/intlayer_with_vite+preact.md +4 -3
- package/docs/ko/intlayer_with_vite+react.md +123 -152
- package/docs/ko/intlayer_with_vite+solid.md +4 -3
- package/docs/ko/intlayer_with_vite+svelte.md +4 -3
- package/docs/ko/intlayer_with_vite+vue.md +5 -4
- package/docs/ko/mcp_server.md +117 -83
- package/docs/ko/packages/intlayer/getLocalizedUrl.md +1 -23
- package/docs/pt/intlayer_CMS.md +1 -0
- package/docs/pt/intlayer_cli.md +274 -154
- package/docs/pt/intlayer_visual_editor.md +1 -0
- package/docs/pt/intlayer_with_angular.md +1 -0
- package/docs/pt/intlayer_with_create_react_app.md +1 -0
- package/docs/pt/intlayer_with_lynx+react.md +1 -0
- package/docs/pt/intlayer_with_nextjs_14.md +1 -0
- package/docs/pt/intlayer_with_nextjs_15.md +3 -1
- package/docs/pt/intlayer_with_nuxt.md +1 -0
- package/docs/pt/intlayer_with_react_native+expo.md +1 -0
- package/docs/pt/intlayer_with_vite+preact.md +4 -3
- package/docs/pt/intlayer_with_vite+react.md +117 -136
- package/docs/pt/intlayer_with_vite+solid.md +4 -3
- package/docs/pt/intlayer_with_vite+svelte.md +4 -3
- package/docs/pt/intlayer_with_vite+vue.md +4 -4
- package/docs/pt/mcp_server.md +121 -87
- package/docs/ru/intlayer_CMS.md +1 -0
- package/docs/ru/intlayer_cli.md +287 -170
- package/docs/ru/intlayer_visual_editor.md +1 -0
- package/docs/ru/intlayer_with_angular.md +1 -0
- package/docs/ru/intlayer_with_create_react_app.md +1 -0
- package/docs/ru/intlayer_with_lynx+react.md +1 -0
- package/docs/ru/intlayer_with_nextjs_14.md +1 -0
- package/docs/ru/intlayer_with_nextjs_15.md +3 -1
- package/docs/ru/intlayer_with_nuxt.md +1 -0
- package/docs/ru/intlayer_with_react_native+expo.md +1 -0
- package/docs/ru/intlayer_with_vite+preact.md +4 -3
- package/docs/ru/intlayer_with_vite+react.md +105 -87
- package/docs/ru/intlayer_with_vite+solid.md +4 -3
- package/docs/ru/intlayer_with_vite+svelte.md +4 -3
- package/docs/ru/intlayer_with_vite+vue.md +5 -4
- package/docs/ru/mcp_server.md +119 -85
- package/docs/zh/intlayer_CMS.md +1 -0
- package/docs/zh/intlayer_cli.md +275 -155
- package/docs/zh/intlayer_visual_editor.md +1 -0
- package/docs/zh/intlayer_with_angular.md +1 -0
- package/docs/zh/intlayer_with_create_react_app.md +1 -0
- package/docs/zh/intlayer_with_lynx+react.md +1 -0
- package/docs/zh/intlayer_with_nextjs_14.md +1 -0
- package/docs/zh/intlayer_with_nextjs_15.md +3 -1
- package/docs/zh/intlayer_with_nuxt.md +1 -0
- package/docs/zh/intlayer_with_react_native+expo.md +1 -0
- package/docs/zh/intlayer_with_vite+preact.md +4 -3
- package/docs/zh/intlayer_with_vite+react.md +154 -188
- package/docs/zh/intlayer_with_vite+solid.md +4 -3
- package/docs/zh/intlayer_with_vite+svelte.md +4 -3
- package/docs/zh/intlayer_with_vite+vue.md +5 -4
- package/docs/zh/mcp_server.md +119 -86
- package/docs/zh/packages/intlayer/getLocalizedUrl.md +1 -23
- package/frequent_questions/ar/build_error_CI_CD.md +75 -0
- package/frequent_questions/de/build_error_CI_CD.md +75 -0
- package/frequent_questions/en/build_error_CI_CD.md +75 -0
- package/frequent_questions/en-GB/build_error_CI_CD.md +75 -0
- package/frequent_questions/es/build_error_CI_CD.md +75 -0
- package/frequent_questions/fr/build_error_CI_CD.md +75 -0
- package/frequent_questions/hi/build_error_CI_CD.md +75 -0
- package/frequent_questions/it/build_error_CI_CD.md +75 -0
- package/frequent_questions/ja/build_error_CI_CD.md +75 -0
- package/frequent_questions/ja/intlayer_command_undefined.md +3 -3
- package/frequent_questions/ko/build_error_CI_CD.md +75 -0
- package/frequent_questions/ko/intlayer_command_undefined.md +3 -3
- package/frequent_questions/pt/build_error_CI_CD.md +75 -0
- package/frequent_questions/ru/build_error_CI_CD.md +75 -0
- package/frequent_questions/zh/build_error_CI_CD.md +75 -0
- package/frequent_questions/zh/intlayer_command_undefined.md +3 -3
- package/legal/ar/privacy_notice.md +83 -0
- package/legal/ar/terms_of_service.md +55 -0
- package/legal/de/privacy_notice.md +83 -0
- package/legal/de/terms_of_service.md +55 -0
- package/legal/en/privacy_notice.md +83 -0
- package/legal/en/terms_of_service.md +55 -0
- package/legal/en-GB/privacy_notice.md +83 -0
- package/legal/en-GB/terms_of_service.md +55 -0
- package/legal/es/privacy_notice.md +83 -0
- package/legal/es/terms_of_service.md +55 -0
- package/legal/fr/privacy_notice.md +83 -0
- package/legal/fr/terms_of_service.md +55 -0
- package/legal/hi/privacy_notice.md +83 -0
- package/legal/hi/terms_of_service.md +55 -0
- package/legal/it/privacy_notice.md +83 -0
- package/legal/it/terms_of_service.md +55 -0
- package/legal/ja/privacy_notice.md +83 -0
- package/legal/ja/terms_of_service.md +55 -0
- package/legal/ko/privacy_notice.md +83 -0
- package/legal/ko/terms_of_service.md +55 -0
- package/legal/pt/privacy_notice.md +83 -0
- package/legal/pt/terms_of_service.md +55 -0
- package/legal/ru/privacy_notice.md +83 -0
- package/legal/ru/terms_of_service.md +55 -0
- package/legal/zh/privacy_notice.md +83 -0
- package/legal/zh/terms_of_service.md +55 -0
- package/package.json +12 -11
- package/src/blog.ts +6 -4
- package/src/common.ts +25 -7
- package/src/doc.ts +6 -4
- package/src/frequentQuestions.ts +6 -4
- package/src/generated/blog.entry.ts +1177 -280
- package/src/generated/docs.entry.ts +3868 -1217
- package/src/generated/frequentQuestions.entry.ts +808 -178
- package/src/generated/legal.entry.ts +34 -36
- package/src/legal.ts +6 -4
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt:
|
|
4
|
-
title:
|
|
5
|
-
description:
|
|
2
|
+
createdAt: 2024-03-07
|
|
3
|
+
updatedAt: 2024-03-07
|
|
4
|
+
title: Getting Started with Intlayer in Vite + React
|
|
5
|
+
description: Learn how to add internationalisation (i18n) to your Vite and React application using Intlayer. Follow this guide to make your app multilingual.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internationalisation
|
|
8
8
|
- Documentation
|
|
9
9
|
- Intlayer
|
|
10
10
|
- Vite
|
|
11
11
|
- React
|
|
12
|
-
-
|
|
12
|
+
- i18n
|
|
13
13
|
- JavaScript
|
|
14
14
|
slugs:
|
|
15
15
|
- doc
|
|
16
16
|
- environment
|
|
17
|
-
-
|
|
18
|
-
|
|
17
|
+
- vite-and-react
|
|
18
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
19
|
+
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4---
|
|
19
20
|
|
|
20
21
|
# Getting Started Internationalising (i18n) with Intlayer and Vite and React
|
|
21
22
|
|
|
23
|
+
<iframe title="The best i18n solution for Vite and React? Discover Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
|
|
24
|
+
|
|
22
25
|
See [Application Template](https://github.com/aymericzip/intlayer-vite-react-template) on GitHub.
|
|
23
26
|
|
|
24
27
|
## What is Intlayer?
|
|
@@ -42,17 +45,17 @@ Install the necessary packages using npm:
|
|
|
42
45
|
|
|
43
46
|
```bash packageManager="npm"
|
|
44
47
|
npm install intlayer react-intlayer
|
|
45
|
-
npm install --save-dev
|
|
48
|
+
npm install vite-intlayer --save-dev
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
```bash packageManager="pnpm"
|
|
49
52
|
pnpm add intlayer react-intlayer
|
|
50
|
-
pnpm add --save-dev
|
|
53
|
+
pnpm add vite-intlayer --save-dev
|
|
51
54
|
```
|
|
52
55
|
|
|
53
56
|
```bash packageManager="yarn"
|
|
54
57
|
yarn add intlayer react-intlayer
|
|
55
|
-
yarn add --save-dev
|
|
58
|
+
yarn add vite-intlayer --save-dev
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
- **intlayer**
|
|
@@ -242,13 +245,13 @@ const appContent = {
|
|
|
242
245
|
key: "app",
|
|
243
246
|
content: {
|
|
244
247
|
viteLogo: t({
|
|
245
|
-
|
|
248
|
+
'en-GB': "Vite logo",
|
|
246
249
|
en: "Vite logo",
|
|
247
250
|
fr: "Logo Vite",
|
|
248
251
|
es: "Logo Vite",
|
|
249
252
|
}),
|
|
250
253
|
reactLogo: t({
|
|
251
|
-
|
|
254
|
+
'en-GB': "React logo",
|
|
252
255
|
en: "React logo",
|
|
253
256
|
fr: "Logo React",
|
|
254
257
|
es: "Logo React",
|
|
@@ -257,19 +260,24 @@ const appContent = {
|
|
|
257
260
|
title: "Vite + React",
|
|
258
261
|
|
|
259
262
|
count: t({
|
|
260
|
-
|
|
263
|
+
'en-GB': "count is ",
|
|
261
264
|
en: "count is ",
|
|
262
265
|
fr: "le compte est ",
|
|
263
266
|
es: "el recuento es ",
|
|
264
267
|
}),
|
|
265
268
|
|
|
266
|
-
edit:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
edit: t<ReactNode>({
|
|
270
|
+
// Remember to import React if you use a React node in your content
|
|
271
|
+
'en-GB': (
|
|
272
|
+
<>
|
|
273
|
+
Edit <code>src/App.tsx</code> and save to test HMR
|
|
274
|
+
</>
|
|
275
|
+
),
|
|
276
|
+
en: (
|
|
277
|
+
<>
|
|
278
|
+
Edit <code>src/App.tsx</code> and save to test HMR
|
|
279
|
+
</>
|
|
280
|
+
),
|
|
273
281
|
Edit <code>src/App.tsx</code> and save to test HMR
|
|
274
282
|
</>
|
|
275
283
|
),
|
|
@@ -286,7 +294,7 @@ const appContent = {
|
|
|
286
294
|
},
|
|
287
295
|
|
|
288
296
|
readTheDocs: t({
|
|
289
|
-
|
|
297
|
+
'en-GB': "Click on the Vite and React logos to learn more",
|
|
290
298
|
en: "Click on the Vite and React logos to learn more",
|
|
291
299
|
fr: "Cliquez sur les logos Vite et React pour en savoir plus",
|
|
292
300
|
es: "Haga clic en los logotipos de Vite y React para obtener más información",
|
|
@@ -306,11 +314,13 @@ const appContent = {
|
|
|
306
314
|
content: {
|
|
307
315
|
viteLogo: t({
|
|
308
316
|
"en-GB": "Vite logo",
|
|
317
|
+
en: "Vite logo",
|
|
309
318
|
fr: "Logo Vite",
|
|
310
319
|
es: "Logo Vite",
|
|
311
320
|
}),
|
|
312
321
|
reactLogo: t({
|
|
313
322
|
"en-GB": "React logo",
|
|
323
|
+
en: "React logo",
|
|
314
324
|
fr: "Logo React",
|
|
315
325
|
es: "Logo React",
|
|
316
326
|
}),
|
|
@@ -319,6 +329,7 @@ const appContent = {
|
|
|
319
329
|
|
|
320
330
|
count: t({
|
|
321
331
|
"en-GB": "count is ",
|
|
332
|
+
en: "count is ",
|
|
322
333
|
fr: "le compte est ",
|
|
323
334
|
es: "el recuento es ",
|
|
324
335
|
}),
|
|
@@ -333,6 +344,11 @@ const appContent = {
|
|
|
333
344
|
Edit <code>src/App.tsx</code> and save to test HMR
|
|
334
345
|
</>
|
|
335
346
|
),
|
|
347
|
+
en: (
|
|
348
|
+
<>
|
|
349
|
+
Edit <code>src/App.tsx</code> and save to test HMR
|
|
350
|
+
</>
|
|
351
|
+
),
|
|
336
352
|
fr: (
|
|
337
353
|
<>
|
|
338
354
|
Éditez <code>src/App.tsx</code> et enregistrez pour tester HMR
|
|
@@ -347,6 +363,7 @@ const appContent = {
|
|
|
347
363
|
|
|
348
364
|
readTheDocs: t({
|
|
349
365
|
"en-GB": "Click on the Vite and React logos to learn more",
|
|
366
|
+
en: "Click on the Vite and React logos to learn more",
|
|
350
367
|
fr: "Cliquez sur les logos Vite et React pour en savoir plus",
|
|
351
368
|
es: "Haga clic en los logotipos de Vite y React para obtener más información",
|
|
352
369
|
}),
|
|
@@ -365,6 +382,7 @@ module.exports = appContent;
|
|
|
365
382
|
"nodeType": "translation",
|
|
366
383
|
"translation": {
|
|
367
384
|
"en-GB": "Vite logo",
|
|
385
|
+
"en": "Vite logo",
|
|
368
386
|
"fr": "Logo Vite",
|
|
369
387
|
"es": "Logo Vite"
|
|
370
388
|
}
|
|
@@ -373,6 +391,7 @@ module.exports = appContent;
|
|
|
373
391
|
"nodeType": "translation",
|
|
374
392
|
"translation": {
|
|
375
393
|
"en-GB": "React logo",
|
|
394
|
+
"en": "React logo",
|
|
376
395
|
"fr": "Logo React",
|
|
377
396
|
"es": "Logo React"
|
|
378
397
|
}
|
|
@@ -381,6 +400,7 @@ module.exports = appContent;
|
|
|
381
400
|
"nodeType": "translation",
|
|
382
401
|
"translation": {
|
|
383
402
|
"en-GB": "Vite + React",
|
|
403
|
+
"en": "Vite + React",
|
|
384
404
|
"fr": "Vite + React",
|
|
385
405
|
"es": "Vite + React"
|
|
386
406
|
}
|
|
@@ -389,6 +409,7 @@ module.exports = appContent;
|
|
|
389
409
|
"nodeType": "translation",
|
|
390
410
|
"translation": {
|
|
391
411
|
"en-GB": "count is ",
|
|
412
|
+
"en": "count is ",
|
|
392
413
|
"fr": "le compte est ",
|
|
393
414
|
"es": "el recuento es "
|
|
394
415
|
}
|
|
@@ -397,6 +418,7 @@ module.exports = appContent;
|
|
|
397
418
|
"nodeType": "translation",
|
|
398
419
|
"translation": {
|
|
399
420
|
"en-GB": "Edit src/App.tsx and save to test HMR",
|
|
421
|
+
"en": "Edit src/App.tsx and save to test HMR",
|
|
400
422
|
"fr": "Éditez src/App.tsx et enregistrez pour tester HMR",
|
|
401
423
|
"es": "Edita src/App.tsx y guarda para probar HMR"
|
|
402
424
|
}
|
|
@@ -405,6 +427,7 @@ module.exports = appContent;
|
|
|
405
427
|
"nodeType": "translation",
|
|
406
428
|
"translation": {
|
|
407
429
|
"en-GB": "Click on the Vite and React logos to learn more",
|
|
430
|
+
"en": "Click on the Vite and React logos to learn more",
|
|
408
431
|
"fr": "Cliquez sur les logos Vite et React pour en savoir plus",
|
|
409
432
|
"es": "Haga clic en los logotipos de Vite y React para obtener más información"
|
|
410
433
|
}
|
|
@@ -413,7 +436,7 @@ module.exports = appContent;
|
|
|
413
436
|
}
|
|
414
437
|
```
|
|
415
438
|
|
|
416
|
-
> Your content declarations can be defined anywhere in your application as soon as they are included
|
|
439
|
+
> Your content declarations can be defined anywhere in your application as soon as they are included in 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}`).
|
|
417
440
|
|
|
418
441
|
> For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/dictionary/get_started.md).
|
|
419
442
|
|
|
@@ -635,9 +658,9 @@ Example:
|
|
|
635
658
|
- https://example.com/fr/about
|
|
636
659
|
```
|
|
637
660
|
|
|
638
|
-
> By default, the routes are not prefixed for the default locale. If you
|
|
661
|
+
> By default, the routes are not prefixed for the default locale. If you want to prefix the default locale, you can set the `middleware.prefixDefault` option to `true` in your configuration. See the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md) for more information.
|
|
639
662
|
|
|
640
|
-
To add localised routing to your application, you can create a `LocaleRouter` component that wraps your application's routes and
|
|
663
|
+
To add localised routing to your application, you can create a `LocaleRouter` component that wraps your application's routes and handles locale-based routing. Here is an example using [React Router](https://reactrouter.com/home):
|
|
641
664
|
|
|
642
665
|
```tsx fileName="src/components/LocaleRouter.tsx" codeFormat="typescript"
|
|
643
666
|
// Importing necessary dependencies and functions
|
|
@@ -772,6 +795,7 @@ const { locales, defaultLocale } = internationalization;
|
|
|
772
795
|
|
|
773
796
|
/**
|
|
774
797
|
* A component that handles localisation and wraps children with the appropriate locale context.
|
|
798
|
+
/**
|
|
775
799
|
* It manages URL-based locale detection and validation.
|
|
776
800
|
*/
|
|
777
801
|
const AppLocalized = ({ children, locale }) => {
|
|
@@ -807,7 +831,7 @@ const AppLocalized = ({ children, locale }) => {
|
|
|
807
831
|
} else {
|
|
808
832
|
/**
|
|
809
833
|
* When middleware.prefixDefault is false, the default locale is not prefixed.
|
|
810
|
-
* Ensure that the current locale is valid and
|
|
834
|
+
* Ensure that the current locale is valid and not the default locale.
|
|
811
835
|
*/
|
|
812
836
|
if (
|
|
813
837
|
currentLocale.toString() !== defaultLocale.toString() &&
|
|
@@ -876,25 +900,6 @@ const {
|
|
|
876
900
|
useLocation,
|
|
877
901
|
} = require("react-router-dom"); // Router components for managing navigation
|
|
878
902
|
|
|
879
|
-
// Destructuring configuration from Intlayer
|
|
880
|
-
const { internationalisation, middleware } = configuration;
|
|
881
|
-
const { locales, defaultLocale } = internationalisation;
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* A component that handles localisation and wraps children with the appropriate locale context.
|
|
885
|
-
* It manages URL-based locale detection and validation.
|
|
886
|
-
*/
|
|
887
|
-
// Importing necessary dependencies and functions
|
|
888
|
-
const { configuration, getPathWithoutLocale } = require("intlayer"); // Utility functions and types from 'intlayer'
|
|
889
|
-
const { IntlayerProvider, useLocale } = require("react-intlayer"); // Provider for internationalisation context
|
|
890
|
-
const {
|
|
891
|
-
BrowserRouter,
|
|
892
|
-
Routes,
|
|
893
|
-
Route,
|
|
894
|
-
Navigate,
|
|
895
|
-
useLocation,
|
|
896
|
-
} = require("react-router-dom"); // Router components for managing navigation
|
|
897
|
-
|
|
898
903
|
// Destructuring configuration from Intlayer
|
|
899
904
|
const { internationalization, middleware } = configuration;
|
|
900
905
|
const { locales, defaultLocale } = internationalization;
|
|
@@ -936,7 +941,7 @@ const AppLocalized = ({ children, locale }) => {
|
|
|
936
941
|
} else {
|
|
937
942
|
/**
|
|
938
943
|
* When middleware.prefixDefault is false, the default locale is not prefixed.
|
|
939
|
-
* Ensure that the current locale is valid and
|
|
944
|
+
* Ensure that the current locale is valid and not the default locale.
|
|
940
945
|
*/
|
|
941
946
|
if (
|
|
942
947
|
currentLocale.toString() !== defaultLocale.toString() &&
|
|
@@ -1271,9 +1276,9 @@ const LocaleSwitcher = () => {
|
|
|
1271
1276
|
> - [`getLocalizedUrl` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/{{locale}}/packages/intlayer/getLocalizedUrl.md)
|
|
1272
1277
|
> - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/intlayer/getHTMLTextDir.md)
|
|
1273
1278
|
> - [`hrefLang` attribute](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
|
|
1274
|
-
> - [`lang` attribute`](https://developer.mozilla.org/en-
|
|
1275
|
-
> - [`dir` attribute`](https://developer.mozilla.org/en-
|
|
1276
|
-
> - [`aria-current` attribute`](https://developer.mozilla.org/en-
|
|
1279
|
+
> - [`lang` attribute`](https://developer.mozilla.org/en-GB/docs/Web/HTML/Global_attributes/lang)
|
|
1280
|
+
> - [`dir` attribute`](https://developer.mozilla.org/en-GB/docs/Web/HTML/Global_attributes/dir)
|
|
1281
|
+
> - [`aria-current` attribute`](https://developer.mozilla.org/en-GB/docs/Web/Accessibility/ARIA/Attributes/aria-current)
|
|
1277
1282
|
|
|
1278
1283
|
Below is the updated **Step 9** with added explanations and refined code examples:
|
|
1279
1284
|
|
|
@@ -1285,7 +1290,7 @@ When your application supports multiple languages, it is crucial to update the `
|
|
|
1285
1290
|
|
|
1286
1291
|
- **Accessibility**: Screen readers and assistive technologies depend on the correct `lang` attribute to pronounce and interpret content accurately.
|
|
1287
1292
|
- **Text Rendering**: The `dir` (direction) attribute guarantees that text is rendered in the correct order (e.g., left-to-right for English, right-to-left for Arabic or Hebrew), which is essential for readability.
|
|
1288
|
-
- **SEO**: Search engines use the `lang` attribute to identify the language of your page,
|
|
1293
|
+
- **SEO**: Search engines use the `lang` attribute to identify the language of your page, helping to deliver the appropriate localised content in search results.
|
|
1289
1294
|
|
|
1290
1295
|
By updating these attributes dynamically when the locale changes, you guarantee a consistent and accessible experience for users across all supported languages.
|
|
1291
1296
|
|
|
@@ -1396,33 +1401,6 @@ const App: FC = () => (
|
|
|
1396
1401
|
export default App;
|
|
1397
1402
|
```
|
|
1398
1403
|
|
|
1399
|
-
````jsx fileName="src/App.msx" codeFormat="esm"
|
|
1400
|
-
#### Using the Hook in Your Application
|
|
1401
|
-
|
|
1402
|
-
Integrate the hook into your main component so that the HTML attributes update whenever the locale changes:
|
|
1403
|
-
|
|
1404
|
-
```tsx fileName="src/App.tsx" codeFormat="typescript"
|
|
1405
|
-
import type { FC } from "react";
|
|
1406
|
-
import { IntlayerProvider, useIntlayer } from "react-intlayer";
|
|
1407
|
-
import { useI18nHTMLAttributes } from "./hooks/useI18nHTMLAttributes";
|
|
1408
|
-
import "./App.css";
|
|
1409
|
-
|
|
1410
|
-
const AppContent: FC = () => {
|
|
1411
|
-
// Apply the hook to update the <html> tag's lang and dir attributes based on the locale.
|
|
1412
|
-
useI18nHTMLAttributes();
|
|
1413
|
-
|
|
1414
|
-
// ... Rest of your component
|
|
1415
|
-
};
|
|
1416
|
-
|
|
1417
|
-
const App: FC = () => (
|
|
1418
|
-
<IntlayerProvider>
|
|
1419
|
-
<AppContent />
|
|
1420
|
-
</IntlayerProvider>
|
|
1421
|
-
);
|
|
1422
|
-
|
|
1423
|
-
export default App;
|
|
1424
|
-
````
|
|
1425
|
-
|
|
1426
1404
|
```jsx fileName="src/App.msx" codeFormat="esm"
|
|
1427
1405
|
import { IntlayerProvider, useIntlayer } from "react-intlayer";
|
|
1428
1406
|
import { useI18nHTMLAttributes } from "./hooks/useI18nHTMLAttributes";
|
|
@@ -1474,21 +1452,27 @@ By applying these changes, your application will:
|
|
|
1474
1452
|
|
|
1475
1453
|
### (Optional) Step 10: Creating a Localised Link Component
|
|
1476
1454
|
|
|
1477
|
-
|
|
1478
|
-
|
|
1455
|
+
```tsx fileName="src/App.tsx" codeFormat="typescript"
|
|
1456
|
+
import type { FC } from "react";
|
|
1457
|
+
import { IntlayerProvider, useIntlayer } from "react-intlayer";
|
|
1458
|
+
import { useI18nHTMLAttributes } from "./hooks/useI18nHTMLAttributes";
|
|
1459
|
+
import "./App.css";
|
|
1479
1460
|
|
|
1480
|
-
|
|
1461
|
+
const AppContent: FC = () => {
|
|
1462
|
+
// Apply the hook to update the <html> tag's lang and dir attributes based on the locale.
|
|
1463
|
+
useI18nHTMLAttributes();
|
|
1464
|
+
|
|
1465
|
+
// ... Rest of your component
|
|
1481
1466
|
};
|
|
1482
1467
|
|
|
1483
1468
|
const App = () => (
|
|
1484
|
-
<IntlayerProvider>
|
|
1485
|
-
<AppContent />
|
|
1486
|
-
</IntlayerProvider>
|
|
1469
|
+
<IntlayerProvider>
|
|
1470
|
+
<AppContent />
|
|
1471
|
+
</IntlayerProvider>
|
|
1487
1472
|
);
|
|
1488
1473
|
|
|
1489
1474
|
module.exports = App;
|
|
1490
|
-
|
|
1491
|
-
````
|
|
1475
|
+
```
|
|
1492
1476
|
|
|
1493
1477
|
By applying these changes, your application will:
|
|
1494
1478
|
|
|
@@ -1553,7 +1537,7 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
|
|
|
1553
1537
|
);
|
|
1554
1538
|
|
|
1555
1539
|
Link.displayName = "Link";
|
|
1556
|
-
|
|
1540
|
+
```
|
|
1557
1541
|
|
|
1558
1542
|
```jsx fileName="src/components/Link.mjx" codeFormat="esm"
|
|
1559
1543
|
import { getLocalizedUrl } from "intlayer";
|
|
@@ -1604,7 +1588,7 @@ const checkIsExternalLink = (href) => /^https?:\/\//.test(href ?? "");
|
|
|
1604
1588
|
/**
|
|
1605
1589
|
* A custom Link component that adapts the href attribute based on the current locale.
|
|
1606
1590
|
* For internal links, it uses `getLocalizedUrl` to prefix the URL with the locale (e.g., /fr/about).
|
|
1607
|
-
* This ensures that navigation
|
|
1591
|
+
* This ensures that navigation stays within the same locale context.
|
|
1608
1592
|
*/
|
|
1609
1593
|
const Link = forwardRef(({ href, children, ...props }, ref) => {
|
|
1610
1594
|
const { locale } = useLocale();
|
|
@@ -1642,7 +1626,7 @@ Link.displayName = "Link";
|
|
|
1642
1626
|
- **Returning the Link**:
|
|
1643
1627
|
The component returns an `<a>` element with the localised URL, ensuring that navigation is consistent with the locale.
|
|
1644
1628
|
|
|
1645
|
-
By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience
|
|
1629
|
+
By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience while also benefiting from improved SEO and usability.
|
|
1646
1630
|
|
|
1647
1631
|
### Configure TypeScript
|
|
1648
1632
|
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-solid
|
|
17
|
+
# applicationTemplate: https://github.com/aymericzip/intlayer-vite-solid-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalising (i18n) with Intlayer and Vite and Solid
|
|
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
|
|
|
43
44
|
|
|
44
45
|
```bash packageManager="npm"
|
|
45
46
|
npm install intlayer solid-intlayer
|
|
46
|
-
npm install --save-dev
|
|
47
|
+
npm install vite-intlayer --save-dev
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
```bash packageManager="pnpm"
|
|
50
51
|
pnpm add intlayer solid-intlayer
|
|
51
|
-
pnpm add --save-dev
|
|
52
|
+
pnpm add vite-intlayer --save-dev
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
```bash packageManager="yarn"
|
|
55
56
|
yarn add intlayer solid-intlayer
|
|
56
|
-
yarn add --save-dev
|
|
57
|
+
yarn add vite-intlayer --save-dev
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- **intlayer**
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-svelte
|
|
17
|
+
# applicationTemplate: https://github.com/aymericzip/intlayer-vite-svelte-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalising (i18n) with Intlayer and Vite and Svelte
|
|
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
|
|
|
43
44
|
|
|
44
45
|
```bash packageManager="npm"
|
|
45
46
|
npm install intlayer svelte-intlayer
|
|
46
|
-
npm install --save-dev
|
|
47
|
+
npm install vite-intlayer --save-dev
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
```bash packageManager="pnpm"
|
|
50
51
|
pnpm add intlayer svelte-intlayer
|
|
51
|
-
pnpm add --save-dev
|
|
52
|
+
pnpm add vite-intlayer --save-dev
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
```bash packageManager="yarn"
|
|
55
56
|
yarn add intlayer svelte-intlayer
|
|
56
|
-
yarn add --save-dev
|
|
57
|
+
yarn add vite-intlayer --save-dev
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- **intlayer**
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-vue
|
|
17
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-vite-vue-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalising (i18n) with Intlayer and Vite and Vue
|
|
@@ -41,17 +42,17 @@ Install the necessary packages using npm:
|
|
|
41
42
|
|
|
42
43
|
```bash packageManager="npm"
|
|
43
44
|
npm install intlayer vue-intlayer
|
|
44
|
-
npm install --save-dev
|
|
45
|
+
npm install vite-intlayer --save-dev
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
```bash packageManager="pnpm"
|
|
48
49
|
pnpm add intlayer vue-intlayer
|
|
49
|
-
pnpm add --save-dev
|
|
50
|
+
pnpm add vite-intlayer --save-dev
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
```bash packageManager="yarn"
|
|
53
54
|
yarn add intlayer vue-intlayer
|
|
54
|
-
yarn add --save-dev
|
|
55
|
+
yarn add vite-intlayer --save-dev
|
|
55
56
|
```
|
|
56
57
|
|
|
57
58
|
- **intlayer**
|
|
@@ -1020,7 +1021,7 @@ By default, Intlayer renders Markdown as a string. However, Intlayer also provid
|
|
|
1020
1021
|
|
|
1021
1022
|
> To see how to declare Markdown content using the `intlayer` package, see the [markdown doc](https://github.com/aymericzip/intlayer/tree/main/docs/docs/en-GB/dictionary/markdown.md).
|
|
1022
1023
|
|
|
1023
|
-
```ts
|
|
1024
|
+
```ts fileName="main.ts"
|
|
1024
1025
|
import MarkdownIt from "markdown-it";
|
|
1025
1026
|
import { createApp, h } from "vue";
|
|
1026
1027
|
import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|