@intlayer/docs 8.5.1 → 8.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_i18next.md +1 -1
- package/blog/ar/intlayer_with_next-i18next.md +1 -1
- package/blog/ar/intlayer_with_next-intl.md +1 -1
- package/blog/ar/intlayer_with_react-i18next.md +1 -1
- package/blog/ar/intlayer_with_react-intl.md +1 -1
- package/blog/ar/intlayer_with_vue-i18n.md +1 -1
- package/blog/de/intlayer_with_i18next.md +1 -1
- package/blog/de/intlayer_with_next-i18next.md +1 -1
- package/blog/de/intlayer_with_next-intl.md +1 -1
- package/blog/de/intlayer_with_react-i18next.md +1 -1
- package/blog/de/intlayer_with_react-intl.md +1 -1
- package/blog/de/intlayer_with_vue-i18n.md +1 -1
- package/blog/en/intlayer_with_i18next.md +1 -1
- package/blog/en/intlayer_with_next-i18next.md +1 -1
- package/blog/en/intlayer_with_next-intl.md +1 -1
- package/blog/en/intlayer_with_react-i18next.md +1 -1
- package/blog/en/intlayer_with_react-intl.md +1 -1
- package/blog/en/intlayer_with_vue-i18n.md +1 -1
- package/blog/en-GB/intlayer_with_i18next.md +1 -1
- package/blog/en-GB/intlayer_with_next-i18next.md +1 -1
- package/blog/en-GB/intlayer_with_next-intl.md +1 -1
- package/blog/en-GB/intlayer_with_react-i18next.md +1 -1
- package/blog/en-GB/intlayer_with_react-intl.md +1 -1
- package/blog/en-GB/intlayer_with_vue-i18n.md +1 -1
- package/blog/es/intlayer_with_i18next.md +1 -1
- package/blog/es/intlayer_with_next-i18next.md +1 -1
- package/blog/es/intlayer_with_next-intl.md +1 -1
- package/blog/es/intlayer_with_react-i18next.md +1 -1
- package/blog/es/intlayer_with_react-intl.md +1 -1
- package/blog/es/intlayer_with_vue-i18n.md +1 -1
- package/blog/fr/intlayer_with_i18next.md +1 -1
- package/blog/fr/intlayer_with_next-i18next.md +1 -1
- package/blog/fr/intlayer_with_next-intl.md +1 -1
- package/blog/fr/intlayer_with_react-i18next.md +1 -1
- package/blog/fr/intlayer_with_react-intl.md +1 -1
- package/blog/fr/intlayer_with_vue-i18n.md +1 -1
- package/blog/hi/intlayer_with_i18next.md +1 -1
- package/blog/hi/intlayer_with_next-i18next.md +1 -1
- package/blog/hi/intlayer_with_next-intl.md +1 -1
- package/blog/hi/intlayer_with_react-i18next.md +1 -1
- package/blog/hi/intlayer_with_react-intl.md +1 -1
- package/blog/hi/intlayer_with_vue-i18n.md +1 -1
- package/blog/id/intlayer_with_i18next.md +1 -1
- package/blog/id/intlayer_with_next-i18next.md +1 -1
- package/blog/id/intlayer_with_next-intl.md +1 -1
- package/blog/id/intlayer_with_react-i18next.md +1 -1
- package/blog/id/intlayer_with_react-intl.md +1 -1
- package/blog/id/intlayer_with_vue-i18n.md +1 -1
- package/blog/it/intlayer_with_i18next.md +1 -1
- package/blog/it/intlayer_with_next-i18next.md +1 -1
- package/blog/it/intlayer_with_next-intl.md +1 -1
- package/blog/it/intlayer_with_react-i18next.md +1 -1
- package/blog/it/intlayer_with_react-intl.md +1 -1
- package/blog/it/intlayer_with_vue-i18n.md +1 -1
- package/blog/ja/intlayer_with_i18next.md +1 -1
- package/blog/ja/intlayer_with_next-i18next.md +1 -1
- package/blog/ja/intlayer_with_next-intl.md +1 -1
- package/blog/ja/intlayer_with_react-i18next.md +1 -1
- package/blog/ja/intlayer_with_react-intl.md +1 -1
- package/blog/ja/intlayer_with_vue-i18n.md +1 -1
- package/blog/ko/intlayer_with_i18next.md +1 -1
- package/blog/ko/intlayer_with_next-i18next.md +1 -1
- package/blog/ko/intlayer_with_next-intl.md +1 -1
- package/blog/ko/intlayer_with_react-i18next.md +1 -1
- package/blog/ko/intlayer_with_react-intl.md +1 -1
- package/blog/ko/intlayer_with_vue-i18n.md +1 -1
- package/blog/pl/intlayer_with_i18next.md +1 -1
- package/blog/pl/intlayer_with_next-i18next.md +1 -1
- package/blog/pl/intlayer_with_next-intl.md +1 -1
- package/blog/pl/intlayer_with_react-i18next.md +1 -1
- package/blog/pl/intlayer_with_react-intl.md +1 -1
- package/blog/pl/intlayer_with_vue-i18n.md +1 -1
- package/blog/pt/intlayer_with_i18next.md +1 -1
- package/blog/pt/intlayer_with_next-i18next.md +1 -1
- package/blog/pt/intlayer_with_next-intl.md +1 -1
- package/blog/pt/intlayer_with_react-i18next.md +1 -1
- package/blog/pt/intlayer_with_react-intl.md +1 -1
- package/blog/pt/intlayer_with_vue-i18n.md +1 -1
- package/blog/ru/intlayer_with_i18next.md +1 -1
- package/blog/ru/intlayer_with_next-i18next.md +1 -1
- package/blog/ru/intlayer_with_next-intl.md +1 -1
- package/blog/ru/intlayer_with_react-i18next.md +1 -1
- package/blog/ru/intlayer_with_react-intl.md +1 -1
- package/blog/ru/intlayer_with_vue-i18n.md +1 -1
- package/blog/tr/intlayer_with_i18next.md +1 -1
- package/blog/tr/intlayer_with_next-i18next.md +1 -1
- package/blog/tr/intlayer_with_next-intl.md +1 -1
- package/blog/tr/intlayer_with_react-i18next.md +1 -1
- package/blog/tr/intlayer_with_react-intl.md +1 -1
- package/blog/tr/intlayer_with_vue-i18n.md +1 -1
- package/blog/uk/intlayer_with_i18next.md +1 -1
- package/blog/uk/intlayer_with_next-i18next.md +1 -1
- package/blog/uk/intlayer_with_next-intl.md +1 -1
- package/blog/uk/intlayer_with_react-i18next.md +1 -1
- package/blog/uk/intlayer_with_react-intl.md +1 -1
- package/blog/uk/intlayer_with_vue-i18n.md +1 -1
- package/blog/vi/intlayer_with_i18next.md +1 -1
- package/blog/vi/intlayer_with_next-i18next.md +1 -1
- package/blog/vi/intlayer_with_next-intl.md +1 -1
- package/blog/vi/intlayer_with_react-i18next.md +1 -1
- package/blog/vi/intlayer_with_react-intl.md +1 -1
- package/blog/vi/intlayer_with_vue-i18n.md +1 -1
- package/blog/zh/intlayer_with_i18next.md +1 -1
- package/blog/zh/intlayer_with_next-i18next.md +1 -1
- package/blog/zh/intlayer_with_next-intl.md +1 -1
- package/blog/zh/intlayer_with_react-i18next.md +1 -1
- package/blog/zh/intlayer_with_react-intl.md +1 -1
- package/blog/zh/intlayer_with_vue-i18n.md +1 -1
- package/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/intlayer_CMS.md +1 -1
- package/docs/ar/intlayer_with_adonisjs.md +1 -1
- package/docs/ar/intlayer_with_analog.md +1 -1
- package/docs/ar/intlayer_with_angular.md +1 -1
- package/docs/ar/intlayer_with_create_react_app.md +1 -1
- package/docs/ar/intlayer_with_express.md +1 -1
- package/docs/ar/intlayer_with_fastify.md +1 -1
- package/docs/ar/intlayer_with_hono.md +1 -1
- package/docs/ar/intlayer_with_lynx+react.md +1 -1
- package/docs/ar/intlayer_with_nestjs.md +1 -1
- package/docs/ar/intlayer_with_next-i18next.md +1 -1
- package/docs/ar/intlayer_with_next-intl.md +1 -1
- package/docs/ar/intlayer_with_nextjs_14.md +1 -1
- package/docs/ar/intlayer_with_nextjs_15.md +1 -1
- package/docs/ar/intlayer_with_nextjs_16.md +2 -2
- package/docs/ar/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ar/intlayer_with_nuxt.md +1 -1
- package/docs/ar/intlayer_with_react_native+expo.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7.md +4 -6
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/ar/intlayer_with_svelte_kit.md +5 -5
- package/docs/ar/intlayer_with_tanstack+solid.md +894 -0
- package/docs/ar/intlayer_with_tanstack.md +2 -10
- package/docs/ar/intlayer_with_vite+lit.md +1 -2
- package/docs/ar/intlayer_with_vite+preact.md +2 -2
- package/docs/ar/intlayer_with_vite+react.md +2 -2
- package/docs/ar/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/ar/intlayer_with_vite+solid.md +2 -3
- package/docs/ar/intlayer_with_vite+svelte.md +3 -3
- package/docs/ar/intlayer_with_vite+vanilla.md +2 -2
- package/docs/ar/intlayer_with_vite+vue.md +2 -2
- package/docs/bn/intlayer_with_fastify.md +1 -1
- package/docs/bn/intlayer_with_hono.md +1 -1
- package/docs/bn/intlayer_with_vite+lit.md +1 -2
- package/docs/bn/intlayer_with_vite+vanilla.md +2 -2
- package/docs/cs/intlayer_with_fastify.md +1 -1
- package/docs/cs/intlayer_with_hono.md +1 -1
- package/docs/cs/intlayer_with_vite+lit.md +1 -2
- package/docs/cs/intlayer_with_vite+vanilla.md +2 -2
- package/docs/de/intlayer_CMS.md +1 -1
- package/docs/de/intlayer_with_adonisjs.md +1 -1
- package/docs/de/intlayer_with_analog.md +1 -1
- package/docs/de/intlayer_with_angular.md +1 -1
- package/docs/de/intlayer_with_create_react_app.md +1 -1
- package/docs/de/intlayer_with_express.md +1 -1
- package/docs/de/intlayer_with_fastify.md +1 -1
- package/docs/de/intlayer_with_hono.md +1 -1
- package/docs/de/intlayer_with_lynx+react.md +1 -1
- package/docs/de/intlayer_with_nestjs.md +1 -1
- package/docs/de/intlayer_with_next-i18next.md +1 -1
- package/docs/de/intlayer_with_next-intl.md +1 -1
- package/docs/de/intlayer_with_nextjs_14.md +1 -1
- package/docs/de/intlayer_with_nextjs_15.md +1 -1
- package/docs/de/intlayer_with_nextjs_16.md +2 -2
- package/docs/de/intlayer_with_nextjs_compiler.md +1 -1
- package/docs/de/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/de/intlayer_with_nuxt.md +1 -1
- package/docs/de/intlayer_with_react_router_v7.md +4 -6
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +2 -3
- package/docs/de/intlayer_with_svelte_kit.md +5 -5
- package/docs/de/intlayer_with_tanstack+solid.md +970 -0
- package/docs/de/intlayer_with_tanstack.md +98 -30
- package/docs/de/intlayer_with_vite+lit.md +1 -2
- package/docs/de/intlayer_with_vite+preact.md +2 -2
- package/docs/de/intlayer_with_vite+react.md +2 -2
- package/docs/de/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/de/intlayer_with_vite+solid.md +2 -3
- package/docs/de/intlayer_with_vite+svelte.md +3 -3
- package/docs/de/intlayer_with_vite+vanilla.md +2 -2
- package/docs/de/intlayer_with_vite+vue.md +2 -2
- package/docs/en/intlayer_CMS.md +1 -1
- package/docs/en/intlayer_with_adonisjs.md +1 -1
- package/docs/en/intlayer_with_analog.md +1 -1
- package/docs/en/intlayer_with_angular.md +1 -1
- package/docs/en/intlayer_with_create_react_app.md +1 -1
- package/docs/en/intlayer_with_express.md +1 -1
- package/docs/en/intlayer_with_fastify.md +1 -1
- package/docs/en/intlayer_with_hono.md +1 -1
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_nestjs.md +1 -1
- package/docs/en/intlayer_with_next-i18next.md +1 -1
- package/docs/en/intlayer_with_next-intl.md +1 -1
- package/docs/en/intlayer_with_nextjs_14.md +1 -1
- package/docs/en/intlayer_with_nextjs_15.md +1 -1
- package/docs/en/intlayer_with_nextjs_16.md +2 -2
- package/docs/en/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/en/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en/intlayer_with_nuxt.md +1 -1
- package/docs/en/intlayer_with_react_native+expo.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +3 -4
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/en/intlayer_with_svelte_kit.md +4 -4
- package/docs/en/intlayer_with_tanstack+solid.md +973 -0
- package/docs/en/intlayer_with_tanstack.md +83 -12
- package/docs/en/intlayer_with_vite+lit.md +1 -2
- package/docs/en/intlayer_with_vite+preact.md +2 -2
- package/docs/en/intlayer_with_vite+react.md +2 -2
- package/docs/en/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/en/intlayer_with_vite+solid.md +2 -3
- package/docs/en/intlayer_with_vite+svelte.md +7 -8
- package/docs/en/intlayer_with_vite+vanilla.md +2 -2
- package/docs/en/intlayer_with_vite+vue.md +2 -2
- package/docs/en-GB/intlayer_CMS.md +1 -1
- package/docs/en-GB/intlayer_with_adonisjs.md +1 -1
- package/docs/en-GB/intlayer_with_analog.md +1 -1
- package/docs/en-GB/intlayer_with_angular.md +1 -1
- package/docs/en-GB/intlayer_with_create_react_app.md +2 -2
- package/docs/en-GB/intlayer_with_express.md +1 -1
- package/docs/en-GB/intlayer_with_fastify.md +1 -1
- package/docs/en-GB/intlayer_with_hono.md +1 -1
- package/docs/en-GB/intlayer_with_lynx+react.md +2 -2
- package/docs/en-GB/intlayer_with_nestjs.md +1 -1
- package/docs/en-GB/intlayer_with_next-i18next.md +1 -1
- package/docs/en-GB/intlayer_with_next-intl.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_15.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_16.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_compiler.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en-GB/intlayer_with_nuxt.md +1 -1
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7.md +3 -5
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +3 -5
- package/docs/en-GB/intlayer_with_svelte_kit.md +4 -4
- package/docs/en-GB/intlayer_with_tanstack+solid.md +968 -0
- package/docs/en-GB/intlayer_with_tanstack.md +75 -10
- package/docs/en-GB/intlayer_with_vite+lit.md +1 -2
- package/docs/en-GB/intlayer_with_vite+preact.md +1 -1
- package/docs/en-GB/intlayer_with_vite+react.md +1 -1
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/en-GB/intlayer_with_vite+solid.md +1 -2
- package/docs/en-GB/intlayer_with_vite+svelte.md +2 -2
- package/docs/en-GB/intlayer_with_vite+vanilla.md +2 -2
- package/docs/en-GB/intlayer_with_vite+vue.md +1 -1
- package/docs/es/intlayer_CMS.md +1 -1
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_analog.md +1 -1
- package/docs/es/intlayer_with_angular.md +1 -1
- package/docs/es/intlayer_with_create_react_app.md +1 -1
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_fastify.md +1 -1
- package/docs/es/intlayer_with_hono.md +1 -1
- package/docs/es/intlayer_with_lynx+react.md +1 -1
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_next-i18next.md +1 -1
- package/docs/es/intlayer_with_next-intl.md +1 -1
- package/docs/es/intlayer_with_nextjs_14.md +1 -1
- package/docs/es/intlayer_with_nextjs_15.md +1 -1
- package/docs/es/intlayer_with_nextjs_16.md +2 -2
- package/docs/es/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/es/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_native+expo.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +4 -6
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/es/intlayer_with_svelte_kit.md +5 -5
- package/docs/es/intlayer_with_tanstack+solid.md +970 -0
- package/docs/es/intlayer_with_tanstack.md +98 -30
- package/docs/es/intlayer_with_vite+lit.md +1 -2
- package/docs/es/intlayer_with_vite+preact.md +2 -2
- package/docs/es/intlayer_with_vite+react.md +2 -2
- package/docs/es/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/es/intlayer_with_vite+solid.md +2 -3
- package/docs/es/intlayer_with_vite+svelte.md +3 -3
- package/docs/es/intlayer_with_vite+vanilla.md +2 -2
- package/docs/es/intlayer_with_vite+vue.md +2 -2
- package/docs/es/packages/next-intlayer/index.md +1 -1
- package/docs/es/packages/react-intlayer/index.md +1 -1
- package/docs/fr/intlayer_CMS.md +1 -1
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_analog.md +1 -1
- package/docs/fr/intlayer_with_angular.md +1 -1
- package/docs/fr/intlayer_with_create_react_app.md +1 -1
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_fastify.md +1 -1
- package/docs/fr/intlayer_with_hono.md +1 -1
- package/docs/fr/intlayer_with_lynx+react.md +1 -1
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_next-i18next.md +1 -1
- package/docs/fr/intlayer_with_next-intl.md +1 -1
- package/docs/fr/intlayer_with_nextjs_14.md +1 -1
- package/docs/fr/intlayer_with_nextjs_15.md +1 -1
- package/docs/fr/intlayer_with_nextjs_16.md +2 -2
- package/docs/fr/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/fr/intlayer_with_nuxt.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7.md +4 -6
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/fr/intlayer_with_svelte_kit.md +6 -6
- package/docs/fr/intlayer_with_tanstack+solid.md +970 -0
- package/docs/fr/intlayer_with_tanstack.md +98 -30
- package/docs/fr/intlayer_with_vite+lit.md +1 -2
- package/docs/fr/intlayer_with_vite+preact.md +2 -2
- package/docs/fr/intlayer_with_vite+react.md +2 -2
- package/docs/fr/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/fr/intlayer_with_vite+solid.md +2 -3
- package/docs/fr/intlayer_with_vite+svelte.md +3 -3
- package/docs/fr/intlayer_with_vite+vanilla.md +2 -2
- package/docs/fr/intlayer_with_vite+vue.md +2 -2
- package/docs/fr/packages/react-intlayer/index.md +1 -1
- package/docs/hi/intlayer_CMS.md +1 -1
- package/docs/hi/intlayer_with_adonisjs.md +1 -1
- package/docs/hi/intlayer_with_analog.md +1 -1
- package/docs/hi/intlayer_with_angular.md +1 -1
- package/docs/hi/intlayer_with_create_react_app.md +1 -1
- package/docs/hi/intlayer_with_express.md +1 -1
- package/docs/hi/intlayer_with_fastify.md +1 -1
- package/docs/hi/intlayer_with_hono.md +1 -1
- package/docs/hi/intlayer_with_lynx+react.md +1 -1
- package/docs/hi/intlayer_with_nestjs.md +1 -1
- package/docs/hi/intlayer_with_next-i18next.md +1 -1
- package/docs/hi/intlayer_with_next-intl.md +1 -1
- package/docs/hi/intlayer_with_nextjs_14.md +1 -1
- package/docs/hi/intlayer_with_nextjs_15.md +1 -1
- package/docs/hi/intlayer_with_nextjs_16.md +2 -2
- package/docs/hi/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/hi/intlayer_with_nuxt.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7.md +4 -6
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/hi/intlayer_with_svelte_kit.md +5 -5
- package/docs/hi/intlayer_with_tanstack+solid.md +894 -0
- package/docs/hi/intlayer_with_tanstack.md +2 -10
- package/docs/hi/intlayer_with_vite+lit.md +1 -2
- package/docs/hi/intlayer_with_vite+preact.md +2 -2
- package/docs/hi/intlayer_with_vite+react.md +2 -2
- package/docs/hi/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/hi/intlayer_with_vite+solid.md +2 -3
- package/docs/hi/intlayer_with_vite+svelte.md +3 -3
- package/docs/hi/intlayer_with_vite+vanilla.md +2 -2
- package/docs/hi/intlayer_with_vite+vue.md +2 -2
- package/docs/hi/packages/intlayer/index.md +1 -1
- package/docs/id/intlayer_CMS.md +1 -1
- package/docs/id/intlayer_with_adonisjs.md +1 -1
- package/docs/id/intlayer_with_analog.md +1 -1
- package/docs/id/intlayer_with_angular.md +1 -1
- package/docs/id/intlayer_with_create_react_app.md +1 -1
- package/docs/id/intlayer_with_express.md +1 -1
- package/docs/id/intlayer_with_fastify.md +1 -1
- package/docs/id/intlayer_with_hono.md +1 -1
- package/docs/id/intlayer_with_lynx+react.md +1 -1
- package/docs/id/intlayer_with_nestjs.md +1 -1
- package/docs/id/intlayer_with_next-i18next.md +1 -1
- package/docs/id/intlayer_with_next-intl.md +1 -1
- package/docs/id/intlayer_with_nextjs_14.md +1 -1
- package/docs/id/intlayer_with_nextjs_15.md +1 -1
- package/docs/id/intlayer_with_nextjs_16.md +2 -2
- package/docs/id/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/id/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/id/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/id/intlayer_with_nuxt.md +1 -1
- package/docs/id/intlayer_with_react_native+expo.md +1 -1
- package/docs/id/intlayer_with_react_router_v7.md +4 -6
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/id/intlayer_with_svelte_kit.md +5 -5
- package/docs/id/intlayer_with_tanstack+solid.md +894 -0
- package/docs/id/intlayer_with_tanstack.md +2 -10
- package/docs/id/intlayer_with_vite+lit.md +1 -2
- package/docs/id/intlayer_with_vite+preact.md +2 -2
- package/docs/id/intlayer_with_vite+react.md +2 -2
- package/docs/id/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/id/intlayer_with_vite+solid.md +2 -3
- package/docs/id/intlayer_with_vite+svelte.md +3 -3
- package/docs/id/intlayer_with_vite+vanilla.md +2 -2
- package/docs/id/intlayer_with_vite+vue.md +2 -2
- package/docs/it/intlayer_CMS.md +1 -1
- package/docs/it/intlayer_with_adonisjs.md +1 -1
- package/docs/it/intlayer_with_analog.md +1 -1
- package/docs/it/intlayer_with_angular.md +1 -1
- package/docs/it/intlayer_with_create_react_app.md +1 -1
- package/docs/it/intlayer_with_express.md +1 -1
- package/docs/it/intlayer_with_fastify.md +1 -1
- package/docs/it/intlayer_with_hono.md +1 -1
- package/docs/it/intlayer_with_lynx+react.md +1 -1
- package/docs/it/intlayer_with_nestjs.md +1 -1
- package/docs/it/intlayer_with_next-i18next.md +1 -1
- package/docs/it/intlayer_with_next-intl.md +1 -1
- package/docs/it/intlayer_with_nextjs_14.md +1 -1
- package/docs/it/intlayer_with_nextjs_15.md +1 -1
- package/docs/it/intlayer_with_nextjs_16.md +2 -2
- package/docs/it/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/it/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/it/intlayer_with_nuxt.md +1 -1
- package/docs/it/intlayer_with_react_native+expo.md +1 -1
- package/docs/it/intlayer_with_react_router_v7.md +4 -6
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/it/intlayer_with_svelte_kit.md +6 -6
- package/docs/it/intlayer_with_tanstack+solid.md +970 -0
- package/docs/it/intlayer_with_tanstack.md +98 -32
- package/docs/it/intlayer_with_vite+lit.md +1 -2
- package/docs/it/intlayer_with_vite+preact.md +2 -2
- package/docs/it/intlayer_with_vite+react.md +2 -2
- package/docs/it/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/it/intlayer_with_vite+solid.md +2 -3
- package/docs/it/intlayer_with_vite+svelte.md +3 -3
- package/docs/it/intlayer_with_vite+vanilla.md +2 -2
- package/docs/it/intlayer_with_vite+vue.md +2 -2
- package/docs/ja/intlayer_CMS.md +1 -1
- package/docs/ja/intlayer_with_adonisjs.md +1 -1
- package/docs/ja/intlayer_with_analog.md +1 -1
- package/docs/ja/intlayer_with_angular.md +1 -1
- package/docs/ja/intlayer_with_create_react_app.md +1 -1
- package/docs/ja/intlayer_with_express.md +1 -1
- package/docs/ja/intlayer_with_fastify.md +1 -1
- package/docs/ja/intlayer_with_hono.md +1 -1
- package/docs/ja/intlayer_with_lynx+react.md +1 -1
- package/docs/ja/intlayer_with_nestjs.md +1 -1
- package/docs/ja/intlayer_with_next-i18next.md +1 -1
- package/docs/ja/intlayer_with_next-intl.md +1 -1
- package/docs/ja/intlayer_with_nextjs_14.md +1 -1
- package/docs/ja/intlayer_with_nextjs_15.md +1 -1
- package/docs/ja/intlayer_with_nextjs_16.md +2 -2
- package/docs/ja/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ja/intlayer_with_nuxt.md +1 -1
- package/docs/ja/intlayer_with_react_router_v7.md +2 -3
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/ja/intlayer_with_svelte_kit.md +1 -1
- package/docs/ja/intlayer_with_tanstack+solid.md +972 -0
- package/docs/ja/intlayer_with_tanstack.md +780 -94
- package/docs/ja/intlayer_with_vite+lit.md +1 -2
- package/docs/ja/intlayer_with_vite+preact.md +1 -1
- package/docs/ja/intlayer_with_vite+react.md +1 -1
- package/docs/ja/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/ja/intlayer_with_vite+solid.md +2 -3
- package/docs/ja/intlayer_with_vite+svelte.md +3 -3
- package/docs/ja/intlayer_with_vite+vanilla.md +2 -2
- package/docs/ja/intlayer_with_vite+vue.md +2 -2
- package/docs/ko/intlayer_CMS.md +1 -1
- package/docs/ko/intlayer_with_adonisjs.md +1 -1
- package/docs/ko/intlayer_with_analog.md +1 -1
- package/docs/ko/intlayer_with_angular.md +1 -1
- package/docs/ko/intlayer_with_create_react_app.md +1 -1
- package/docs/ko/intlayer_with_express.md +1 -1
- package/docs/ko/intlayer_with_fastify.md +1 -1
- package/docs/ko/intlayer_with_hono.md +1 -1
- package/docs/ko/intlayer_with_lynx+react.md +1 -1
- package/docs/ko/intlayer_with_nestjs.md +1 -1
- package/docs/ko/intlayer_with_next-i18next.md +1 -1
- package/docs/ko/intlayer_with_next-intl.md +1 -1
- package/docs/ko/intlayer_with_nextjs_14.md +1 -1
- package/docs/ko/intlayer_with_nextjs_15.md +1 -1
- package/docs/ko/intlayer_with_nextjs_16.md +2 -2
- package/docs/ko/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ko/intlayer_with_nuxt.md +1 -1
- package/docs/ko/intlayer_with_react_native+expo.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7.md +4 -6
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/ko/intlayer_with_svelte_kit.md +5 -5
- package/docs/ko/intlayer_with_tanstack+solid.md +970 -0
- package/docs/ko/intlayer_with_tanstack.md +97 -103
- package/docs/ko/intlayer_with_vite+lit.md +1 -2
- package/docs/ko/intlayer_with_vite+preact.md +2 -2
- package/docs/ko/intlayer_with_vite+react.md +2 -2
- package/docs/ko/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/ko/intlayer_with_vite+solid.md +2 -3
- package/docs/ko/intlayer_with_vite+svelte.md +3 -3
- package/docs/ko/intlayer_with_vite+vanilla.md +2 -2
- package/docs/ko/intlayer_with_vite+vue.md +2 -2
- package/docs/nl/intlayer_with_fastify.md +1 -1
- package/docs/nl/intlayer_with_hono.md +1 -1
- package/docs/nl/intlayer_with_vite+lit.md +1 -2
- package/docs/nl/intlayer_with_vite+vanilla.md +2 -2
- package/docs/pl/intlayer_CMS.md +1 -1
- package/docs/pl/intlayer_with_adonisjs.md +1 -1
- package/docs/pl/intlayer_with_analog.md +1 -1
- package/docs/pl/intlayer_with_angular.md +1 -1
- package/docs/pl/intlayer_with_create_react_app.md +1 -1
- package/docs/pl/intlayer_with_express.md +1 -1
- package/docs/pl/intlayer_with_fastify.md +1 -1
- package/docs/pl/intlayer_with_hono.md +1 -1
- package/docs/pl/intlayer_with_lynx+react.md +1 -1
- package/docs/pl/intlayer_with_nestjs.md +1 -1
- package/docs/pl/intlayer_with_next-i18next.md +1 -1
- package/docs/pl/intlayer_with_next-intl.md +1 -1
- package/docs/pl/intlayer_with_nextjs_14.md +1 -1
- package/docs/pl/intlayer_with_nextjs_15.md +1 -1
- package/docs/pl/intlayer_with_nextjs_16.md +2 -2
- package/docs/pl/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/pl/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/pl/intlayer_with_nuxt.md +1 -1
- package/docs/pl/intlayer_with_react_native+expo.md +1 -1
- package/docs/pl/intlayer_with_react_router_v7.md +4 -6
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/pl/intlayer_with_svelte_kit.md +5 -5
- package/docs/pl/intlayer_with_tanstack+solid.md +894 -0
- package/docs/pl/intlayer_with_tanstack.md +2 -10
- package/docs/pl/intlayer_with_vite+lit.md +1 -2
- package/docs/pl/intlayer_with_vite+preact.md +2 -2
- package/docs/pl/intlayer_with_vite+react.md +2 -2
- package/docs/pl/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/pl/intlayer_with_vite+solid.md +2 -3
- package/docs/pl/intlayer_with_vite+svelte.md +3 -3
- package/docs/pl/intlayer_with_vite+vanilla.md +2 -2
- package/docs/pl/intlayer_with_vite+vue.md +2 -2
- package/docs/pt/intlayer_CMS.md +1 -1
- package/docs/pt/intlayer_with_adonisjs.md +1 -1
- package/docs/pt/intlayer_with_analog.md +1 -1
- package/docs/pt/intlayer_with_angular.md +1 -1
- package/docs/pt/intlayer_with_create_react_app.md +1 -1
- package/docs/pt/intlayer_with_express.md +1 -1
- package/docs/pt/intlayer_with_fastify.md +1 -1
- package/docs/pt/intlayer_with_hono.md +1 -1
- package/docs/pt/intlayer_with_lynx+react.md +1 -1
- package/docs/pt/intlayer_with_nestjs.md +1 -1
- package/docs/pt/intlayer_with_next-i18next.md +1 -1
- package/docs/pt/intlayer_with_next-intl.md +1 -1
- package/docs/pt/intlayer_with_nextjs_14.md +1 -1
- package/docs/pt/intlayer_with_nextjs_15.md +1 -1
- package/docs/pt/intlayer_with_nextjs_16.md +2 -2
- package/docs/pt/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/pt/intlayer_with_nuxt.md +1 -1
- package/docs/pt/intlayer_with_react_native+expo.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7.md +3 -4
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/pt/intlayer_with_svelte_kit.md +6 -6
- package/docs/pt/intlayer_with_tanstack+solid.md +970 -0
- package/docs/pt/intlayer_with_tanstack.md +98 -32
- package/docs/pt/intlayer_with_vite+lit.md +1 -2
- package/docs/pt/intlayer_with_vite+preact.md +2 -2
- package/docs/pt/intlayer_with_vite+react.md +2 -2
- package/docs/pt/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/pt/intlayer_with_vite+solid.md +2 -3
- package/docs/pt/intlayer_with_vite+svelte.md +3 -3
- package/docs/pt/intlayer_with_vite+vanilla.md +2 -2
- package/docs/pt/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/intlayer_CMS.md +1 -1
- package/docs/ru/intlayer_with_adonisjs.md +1 -1
- package/docs/ru/intlayer_with_analog.md +1 -1
- package/docs/ru/intlayer_with_angular.md +1 -1
- package/docs/ru/intlayer_with_create_react_app.md +1 -1
- package/docs/ru/intlayer_with_express.md +1 -1
- package/docs/ru/intlayer_with_fastify.md +1 -1
- package/docs/ru/intlayer_with_hono.md +1 -1
- package/docs/ru/intlayer_with_lynx+react.md +1 -1
- package/docs/ru/intlayer_with_nestjs.md +1 -1
- package/docs/ru/intlayer_with_next-i18next.md +1 -1
- package/docs/ru/intlayer_with_next-intl.md +1 -1
- package/docs/ru/intlayer_with_nextjs_14.md +1 -1
- package/docs/ru/intlayer_with_nextjs_15.md +1 -1
- package/docs/ru/intlayer_with_nextjs_16.md +2 -2
- package/docs/ru/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ru/intlayer_with_nuxt.md +1 -1
- package/docs/ru/intlayer_with_react_native+expo.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7.md +4 -6
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/ru/intlayer_with_svelte_kit.md +5 -5
- package/docs/ru/intlayer_with_tanstack+solid.md +970 -0
- package/docs/ru/intlayer_with_tanstack.md +101 -35
- package/docs/ru/intlayer_with_vite+lit.md +1 -2
- package/docs/ru/intlayer_with_vite+preact.md +2 -2
- package/docs/ru/intlayer_with_vite+react.md +2 -2
- package/docs/ru/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/ru/intlayer_with_vite+solid.md +2 -3
- package/docs/ru/intlayer_with_vite+svelte.md +3 -3
- package/docs/ru/intlayer_with_vite+vanilla.md +2 -2
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/tr/intlayer_CMS.md +1 -1
- package/docs/tr/intlayer_with_adonisjs.md +1 -1
- package/docs/tr/intlayer_with_analog.md +1 -1
- package/docs/tr/intlayer_with_angular.md +1 -1
- package/docs/tr/intlayer_with_create_react_app.md +1 -1
- package/docs/tr/intlayer_with_express.md +1 -1
- package/docs/tr/intlayer_with_fastify.md +1 -1
- package/docs/tr/intlayer_with_hono.md +1 -1
- package/docs/tr/intlayer_with_lynx+react.md +1 -1
- package/docs/tr/intlayer_with_nestjs.md +1 -1
- package/docs/tr/intlayer_with_next-i18next.md +1 -1
- package/docs/tr/intlayer_with_next-intl.md +1 -1
- package/docs/tr/intlayer_with_nextjs_14.md +1 -1
- package/docs/tr/intlayer_with_nextjs_15.md +1 -1
- package/docs/tr/intlayer_with_nextjs_16.md +2 -2
- package/docs/tr/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/tr/intlayer_with_nuxt.md +1 -1
- package/docs/tr/intlayer_with_react_native+expo.md +1 -1
- package/docs/tr/intlayer_with_react_router_v7.md +4 -6
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/tr/intlayer_with_svelte_kit.md +5 -5
- package/docs/tr/intlayer_with_tanstack+solid.md +895 -0
- package/docs/tr/intlayer_with_tanstack.md +2 -10
- package/docs/tr/intlayer_with_vite+lit.md +1 -2
- package/docs/tr/intlayer_with_vite+preact.md +2 -2
- package/docs/tr/intlayer_with_vite+react.md +2 -2
- package/docs/tr/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/tr/intlayer_with_vite+solid.md +2 -3
- package/docs/tr/intlayer_with_vite+svelte.md +3 -3
- package/docs/tr/intlayer_with_vite+vanilla.md +2 -2
- package/docs/tr/intlayer_with_vite+vue.md +2 -2
- package/docs/uk/intlayer_CMS.md +1 -1
- package/docs/uk/intlayer_with_adonisjs.md +1 -1
- package/docs/uk/intlayer_with_analog.md +1 -1
- package/docs/uk/intlayer_with_angular.md +1 -1
- package/docs/uk/intlayer_with_create_react_app.md +1 -1
- package/docs/uk/intlayer_with_express.md +1 -1
- package/docs/uk/intlayer_with_fastify.md +1 -1
- package/docs/uk/intlayer_with_hono.md +1 -1
- package/docs/uk/intlayer_with_lynx+react.md +1 -1
- package/docs/uk/intlayer_with_nestjs.md +1 -1
- package/docs/uk/intlayer_with_next-i18next.md +1 -1
- package/docs/uk/intlayer_with_next-intl.md +1 -1
- package/docs/uk/intlayer_with_nextjs_14.md +1 -1
- package/docs/uk/intlayer_with_nextjs_15.md +1 -1
- package/docs/uk/intlayer_with_nextjs_16.md +2 -2
- package/docs/uk/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/uk/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/uk/intlayer_with_nuxt.md +1 -1
- package/docs/uk/intlayer_with_react_native+expo.md +1 -1
- package/docs/uk/intlayer_with_react_router_v7.md +3 -4
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/uk/intlayer_with_svelte_kit.md +4 -4
- package/docs/uk/intlayer_with_tanstack+solid.md +894 -0
- package/docs/uk/intlayer_with_tanstack.md +2 -10
- package/docs/uk/intlayer_with_vite+lit.md +1 -2
- package/docs/uk/intlayer_with_vite+preact.md +2 -2
- package/docs/uk/intlayer_with_vite+react.md +2 -2
- package/docs/uk/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/uk/intlayer_with_vite+solid.md +2 -3
- package/docs/uk/intlayer_with_vite+svelte.md +3 -3
- package/docs/uk/intlayer_with_vite+vanilla.md +2 -2
- package/docs/uk/intlayer_with_vite+vue.md +2 -2
- package/docs/ur/intlayer_with_fastify.md +1 -1
- package/docs/ur/intlayer_with_hono.md +1 -1
- package/docs/ur/intlayer_with_vite+lit.md +1 -2
- package/docs/ur/intlayer_with_vite+vanilla.md +1 -1
- package/docs/vi/cli/index.md +1 -1
- package/docs/vi/intlayer_CMS.md +1 -1
- package/docs/vi/intlayer_with_adonisjs.md +1 -1
- package/docs/vi/intlayer_with_analog.md +1 -1
- package/docs/vi/intlayer_with_angular.md +1 -1
- package/docs/vi/intlayer_with_create_react_app.md +1 -1
- package/docs/vi/intlayer_with_express.md +1 -1
- package/docs/vi/intlayer_with_fastify.md +1 -1
- package/docs/vi/intlayer_with_hono.md +1 -1
- package/docs/vi/intlayer_with_lynx+react.md +1 -1
- package/docs/vi/intlayer_with_nestjs.md +1 -1
- package/docs/vi/intlayer_with_next-i18next.md +1 -1
- package/docs/vi/intlayer_with_next-intl.md +1 -1
- package/docs/vi/intlayer_with_nextjs_14.md +1 -1
- package/docs/vi/intlayer_with_nextjs_15.md +1 -1
- package/docs/vi/intlayer_with_nextjs_16.md +2 -2
- package/docs/vi/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/vi/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/vi/intlayer_with_nuxt.md +1 -1
- package/docs/vi/intlayer_with_react_native+expo.md +1 -1
- package/docs/vi/intlayer_with_react_router_v7.md +4 -6
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/vi/intlayer_with_svelte_kit.md +5 -5
- package/docs/vi/intlayer_with_tanstack+solid.md +894 -0
- package/docs/vi/intlayer_with_tanstack.md +2 -10
- package/docs/vi/intlayer_with_vite+lit.md +1 -2
- package/docs/vi/intlayer_with_vite+preact.md +2 -2
- package/docs/vi/intlayer_with_vite+react.md +2 -2
- package/docs/vi/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/vi/intlayer_with_vite+solid.md +2 -3
- package/docs/vi/intlayer_with_vite+svelte.md +3 -3
- package/docs/vi/intlayer_with_vite+vanilla.md +2 -2
- package/docs/vi/intlayer_with_vite+vue.md +2 -2
- package/docs/zh/intlayer_CMS.md +1 -1
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_analog.md +1 -1
- package/docs/zh/intlayer_with_angular.md +1 -1
- package/docs/zh/intlayer_with_create_react_app.md +1 -1
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_fastify.md +1 -1
- package/docs/zh/intlayer_with_hono.md +1 -1
- package/docs/zh/intlayer_with_lynx+react.md +1 -1
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_next-i18next.md +1 -1
- package/docs/zh/intlayer_with_next-intl.md +1 -1
- package/docs/zh/intlayer_with_nextjs_14.md +1 -1
- package/docs/zh/intlayer_with_nextjs_15.md +1 -1
- package/docs/zh/intlayer_with_nextjs_16.md +2 -2
- package/docs/zh/intlayer_with_nextjs_compiler.md +2 -2
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/zh/intlayer_with_nuxt.md +1 -1
- package/docs/zh/intlayer_with_react_native+expo.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +4 -6
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +4 -6
- package/docs/zh/intlayer_with_svelte_kit.md +5 -5
- package/docs/zh/intlayer_with_tanstack+solid.md +970 -0
- package/docs/zh/intlayer_with_tanstack.md +98 -106
- package/docs/zh/intlayer_with_vite+lit.md +1 -2
- package/docs/zh/intlayer_with_vite+preact.md +2 -2
- package/docs/zh/intlayer_with_vite+react.md +2 -2
- package/docs/zh/intlayer_with_vite+react_compiler.md +1 -1
- package/docs/zh/intlayer_with_vite+solid.md +2 -3
- package/docs/zh/intlayer_with_vite+svelte.md +3 -3
- package/docs/zh/intlayer_with_vite+vanilla.md +2 -2
- package/docs/zh/intlayer_with_vite+vue.md +2 -2
- package/package.json +8 -8
- package/src/generated/docs.entry.ts +20 -0
|
@@ -0,0 +1,894 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-03-25
|
|
3
|
+
updatedAt: 2026-03-25
|
|
4
|
+
title: i18n Tanstack Start - Cách dịch ứng dụng Tanstack Start sử dụng Solid.js vào năm 2026
|
|
5
|
+
description: Tìm hiểu cách thêm đa ngôn ngữ (i18n) vào ứng dụng Tanstack Start của bạn bằng Intlayer và Solid.js. Làm theo hướng dẫn toàn diện này để tạo ứng dụng đa ngôn ngữ với điều hướng theo ngôn ngữ.
|
|
6
|
+
keywords:
|
|
7
|
+
- Đa ngôn ngữ
|
|
8
|
+
- Tài liệu
|
|
9
|
+
- Intlayer
|
|
10
|
+
- Tanstack Start
|
|
11
|
+
- Solid
|
|
12
|
+
- i18n
|
|
13
|
+
- TypeScript
|
|
14
|
+
- Điều hướng theo ngôn ngữ
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- environment
|
|
18
|
+
- tanstack-start
|
|
19
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-tanstack-start-solid-template
|
|
20
|
+
youtubeVideo: https://www.youtube.com/watch?v=_XTdKVWaeqg
|
|
21
|
+
history:
|
|
22
|
+
- version: 8.5.1
|
|
23
|
+
date: 2026-03-25
|
|
24
|
+
changes: "Đã thêm cho Tanstack Start Solid.js"
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Dịch website Tanstack Start + Solid.js của bạn bằng Intlayer | Đa ngôn ngữ (i18n)
|
|
28
|
+
|
|
29
|
+
## Mục lục
|
|
30
|
+
|
|
31
|
+
<TOC/>
|
|
32
|
+
|
|
33
|
+
Hướng dẫn này trình bày cách tích hợp **Intlayer** để đa ngôn ngữ hóa một cách liền mạch trong các dự án Tanstack Start với Solid.js, điều hướng theo ngôn ngữ (locale-aware routing), hỗ trợ TypeScript và các phương pháp phát triển hiện đại.
|
|
34
|
+
|
|
35
|
+
## Intlayer là gì?
|
|
36
|
+
|
|
37
|
+
**Intlayer** là một thư viện đa ngôn ngữ (i18n) sáng tạo, mã nguồn mở được thiết kế để đơn giản hóa việc hỗ trợ đa ngôn ngữ trong các ứng dụng web hiện đại.
|
|
38
|
+
|
|
39
|
+
Với Intlayer, bạn có thể:
|
|
40
|
+
|
|
41
|
+
- **Quản lý bản dịch dễ dàng** bằng các từ điển khai báo ở cấp độ component.
|
|
42
|
+
- **Bản địa hóa metadata, route và nội dung một cách linh hoạt**.
|
|
43
|
+
- **Đảm bảo hỗ trợ TypeScript** với các kiểu dữ liệu được tạo tự động, cải thiện tính năng tự động hoàn thành và phát hiện lỗi.
|
|
44
|
+
- **Hưởng lợi từ các tính năng nâng cao**, chẳng hạn như tự động phát hiện và chuyển đổi ngôn ngữ.
|
|
45
|
+
- **Kích hoạt điều hướng theo ngôn ngữ** với hệ thống điều hướng dựa trên tệp tin của Tanstack Start.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Hướng dẫn từng bước thiết lập Intlayer trong ứng dụng Tanstack Start
|
|
50
|
+
|
|
51
|
+
<Tabs defaultTab="video">
|
|
52
|
+
<Tab label="Video" value="video">
|
|
53
|
+
|
|
54
|
+
<iframe title="Giải pháp i18n tốt nhất cho Tanstack Start? Khám phá 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/_XTdKVWaeqg?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
55
|
+
|
|
56
|
+
</Tab>
|
|
57
|
+
<Tab label="Code" value="code">
|
|
58
|
+
|
|
59
|
+
<iframe
|
|
60
|
+
src="https://stackblitz.com/github/aymericzip/intlayer-tanstack-start-solid-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
61
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
62
|
+
title="Demo CodeSandbox - Cách đa ngôn ngữ hóa ứng dụng của bạn bằng Intlayer"
|
|
63
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
64
|
+
loading="lazy"
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
</Tab>
|
|
68
|
+
</Tabs>
|
|
69
|
+
|
|
70
|
+
Xem [Mẫu ứng dụng](https://github.com/aymericzip/intlayer-tanstack-start-solid-template) trên GitHub.
|
|
71
|
+
|
|
72
|
+
### Bước 1: Tạo dự án
|
|
73
|
+
|
|
74
|
+
Đầu tiên, tạo một dự án TanStack Start mới theo hướng dẫn [Bắt đầu dự án mới](https://tanstack.com/start/latest/docs/framework/solid/quick-start) trên trang web TanStack Start.
|
|
75
|
+
|
|
76
|
+
### Bước 2: Cài đặt các gói Intlayer
|
|
77
|
+
|
|
78
|
+
Cài đặt các gói cần thiết bằng trình quản lý gói ưa thích của bạn:
|
|
79
|
+
|
|
80
|
+
```bash packageManager="npm"
|
|
81
|
+
npm install intlayer solid-intlayer
|
|
82
|
+
npm install vite-intlayer --save-dev
|
|
83
|
+
npx intlayer init
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```bash packageManager="pnpm"
|
|
87
|
+
pnpm add intlayer solid-intlayer
|
|
88
|
+
pnpm add vite-intlayer --save-dev
|
|
89
|
+
pnpm intlayer init
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```bash packageManager="yarn"
|
|
93
|
+
yarn add intlayer solid-intlayer
|
|
94
|
+
yarn add vite-intlayer --save-dev
|
|
95
|
+
yarn intlayer init
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash packageManager="bun"
|
|
99
|
+
bun add intlayer solid-intlayer
|
|
100
|
+
bun add vite-intlayer --dev
|
|
101
|
+
bun x intlayer init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- **intlayer**
|
|
105
|
+
|
|
106
|
+
Gói cốt lõi cung cấp các công cụ đa ngôn ngữ để quản lý cấu hình, bản dịch, [khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md), chuyển đổi mã và [các lệnh CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/index.md).
|
|
107
|
+
|
|
108
|
+
- **solid-intlayer**
|
|
109
|
+
Gói tích hợp Intlayer vào ứng dụng Solid. Nó cung cấp các context provider và hook cho đa ngôn ngữ trong Solid.
|
|
110
|
+
|
|
111
|
+
- **vite-intlayer**
|
|
112
|
+
Bao gồm plugin Vite để tích hợp Intlayer với [Vite bundler](https://vite.dev/guide/why.html#why-bundle-for-production), cũng như middleware để phát hiện ngôn ngữ ưa thích của người dùng, quản lý cookie và xử lý chuyển hướng URL.
|
|
113
|
+
|
|
114
|
+
### Bước 3: Cấu hình dự án của bạn
|
|
115
|
+
|
|
116
|
+
Tạo tệp cấu hình để thiết lập các ngôn ngữ trong ứng dụng của bạn:
|
|
117
|
+
|
|
118
|
+
```typescript fileName="intlayer.config.ts"
|
|
119
|
+
import type { IntlayerConfig } from "intlayer";
|
|
120
|
+
|
|
121
|
+
import { Locales } from "intlayer";
|
|
122
|
+
|
|
123
|
+
const config: IntlayerConfig = {
|
|
124
|
+
internationalization: {
|
|
125
|
+
defaultLocale: Locales.ENGLISH,
|
|
126
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export default config;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
> Thông qua tệp cấu hình này, bạn có thể cấu hình các URL đa ngôn ngữ, chuyển hướng middleware, tên cookie, vị trí và phần mở rộng của các khai báo nội dung, tắt log của Intlayer trong console, v.v. Để biết danh sách đầy đủ các tham số khả dụng, hãy tham khảo [tài liệu cấu hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md).
|
|
134
|
+
|
|
135
|
+
### Bước 4: Tích hợp Intlayer vào cấu hình Vite
|
|
136
|
+
|
|
137
|
+
Thêm plugin intlayer vào cấu hình của bạn:
|
|
138
|
+
|
|
139
|
+
```typescript fileName="vite.config.ts"
|
|
140
|
+
import { intlayer } from "vite-intlayer";
|
|
141
|
+
import { defineConfig } from "vite";
|
|
142
|
+
import { devtools } from "@tanstack/devtools-vite";
|
|
143
|
+
import { tanstackStart } from "@tanstack/solid-start/plugin/vite";
|
|
144
|
+
import solidPlugin from "vite-plugin-solid";
|
|
145
|
+
|
|
146
|
+
export default defineConfig({
|
|
147
|
+
plugins: [
|
|
148
|
+
devtools(),
|
|
149
|
+
tanstackStart({
|
|
150
|
+
router: {
|
|
151
|
+
routeFileIgnorePattern:
|
|
152
|
+
".content.(ts|tsx|js|mjs|cjs|jsx|json|jsonc|json5)$",
|
|
153
|
+
},
|
|
154
|
+
}),
|
|
155
|
+
solidPlugin({ ssr: true }),
|
|
156
|
+
intlayer(),
|
|
157
|
+
],
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
> Plugin Vite `intlayer()` được sử dụng để tích hợp Intlayer với Vite. Nó đảm bảo việc xây dựng các tệp khai báo nội dung và theo dõi chúng trong chế độ phát triển. Nó định nghĩa các biến môi trường Intlayer trong ứng dụng Vite. Ngoài ra, nó cung cấp các alias để giảm chi phí hiệu năng.
|
|
162
|
+
|
|
163
|
+
### Bước 5: Tạo Root Layout
|
|
164
|
+
|
|
165
|
+
Cấu hình layout gốc của bạn để hỗ trợ đa ngôn ngữ bằng cách sử dụng `useMatches` để phát hiện ngôn ngữ hiện tại và thiết lập các thuộc tính `lang` và `dir` trên thẻ `html`.
|
|
166
|
+
|
|
167
|
+
```tsx fileName="src/routes/__root.tsx"
|
|
168
|
+
import {
|
|
169
|
+
HeadContent,
|
|
170
|
+
Outlet,
|
|
171
|
+
Scripts,
|
|
172
|
+
createRootRouteWithContext,
|
|
173
|
+
useMatches,
|
|
174
|
+
} from "@tanstack/solid-router";
|
|
175
|
+
import { TanStackRouterDevtools } from "@tanstack/solid-router-devtools";
|
|
176
|
+
import { HydrationScript } from "solid-js/web";
|
|
177
|
+
import { Suspense } from "solid-js";
|
|
178
|
+
import { IntlayerProvider } from "solid-intlayer";
|
|
179
|
+
import { defaultLocale, getHTMLTextDir, type Locale } from "intlayer";
|
|
180
|
+
|
|
181
|
+
export const Route = createRootRouteWithContext()({
|
|
182
|
+
shellComponent: RootComponent,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
type Params = {
|
|
186
|
+
locale: Locale;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
function RootComponent() {
|
|
190
|
+
const matches = useMatches();
|
|
191
|
+
|
|
192
|
+
// Thử tìm locale trong các tham số của bất kỳ match nào đang hoạt động
|
|
193
|
+
// Giả định rằng bạn sử dụng phần động "/{-$locale}" trong cây route của mình
|
|
194
|
+
const locale =
|
|
195
|
+
(
|
|
196
|
+
matches().find((match) => match.routeId === "/{-$locale}/")
|
|
197
|
+
?.params as Params
|
|
198
|
+
)?.locale ?? defaultLocale;
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<html dir={getHTMLTextDir(locale)} lang={locale}>
|
|
202
|
+
<head>
|
|
203
|
+
<HydrationScript />
|
|
204
|
+
</head>
|
|
205
|
+
<body>
|
|
206
|
+
<HeadContent />
|
|
207
|
+
<IntlayerProvider locale={locale}>
|
|
208
|
+
<Suspense>
|
|
209
|
+
<Outlet />
|
|
210
|
+
<TanStackRouterDevtools />
|
|
211
|
+
</Suspense>
|
|
212
|
+
</IntlayerProvider>
|
|
213
|
+
<Scripts />
|
|
214
|
+
</body>
|
|
215
|
+
</html>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Bước 6: Tạo Locale Layout (Tùy chọn)
|
|
221
|
+
|
|
222
|
+
Tạo một layout để xử lý tiền tố ngôn ngữ và thực hiện kiểm tra tính hợp lệ. Layout này sẽ đảm bảo chỉ các ngôn ngữ hợp lệ mới được xử lý.
|
|
223
|
+
|
|
224
|
+
> Bước này là tùy chọn nếu bạn không cần kiểm tra tiền tố ngôn ngữ ở cấp độ route.
|
|
225
|
+
|
|
226
|
+
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
227
|
+
import { createFileRoute, Outlet, redirect } from "@tanstack/solid-router";
|
|
228
|
+
import { validatePrefix } from "intlayer";
|
|
229
|
+
|
|
230
|
+
export const Route = createFileRoute("/{-$locale}")({
|
|
231
|
+
beforeLoad: ({ params }) => {
|
|
232
|
+
const localeParam = params.locale;
|
|
233
|
+
|
|
234
|
+
// Kiểm tra tiền tố ngôn ngữ
|
|
235
|
+
const { isValid, localePrefix } = validatePrefix(localeParam);
|
|
236
|
+
|
|
237
|
+
if (!isValid) {
|
|
238
|
+
throw redirect({
|
|
239
|
+
to: "/{-$locale}/404",
|
|
240
|
+
params: { locale: localePrefix },
|
|
241
|
+
replace: true,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
component: Outlet,
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
> Ở đây, `{-$locale}` là một tham số route động được thay thế bằng ngôn ngữ hiện tại. Ký hiệu này làm cho slot trở thành tùy chọn, cho phép nó hoạt động với các chế độ điều hướng như `'prefix-no-default'`, v.v.
|
|
250
|
+
|
|
251
|
+
> Hãy lưu ý rằng slot này có thể gây ra sự cố nếu bạn sử dụng nhiều phần động trong cùng một route (ví dụ: `/{-$locale}/other-path/$anotherDynamicPath/...`).
|
|
252
|
+
> Đối với chế độ `'prefix-all'`, bạn có thể thích chuyển slot thành `$locale`.
|
|
253
|
+
> Đối với chế độ `'no-prefix'` hoặc `'search-params'`, bạn có thể xóa hoàn toàn slot này.
|
|
254
|
+
|
|
255
|
+
### Bước 7: Khai báo nội dung của bạn
|
|
256
|
+
|
|
257
|
+
Tạo và quản lý các khai báo nội dung để lưu trữ bản dịch:
|
|
258
|
+
|
|
259
|
+
```tsx fileName="src/contents/page.content.ts"
|
|
260
|
+
import type { Dictionary } from "intlayer";
|
|
261
|
+
|
|
262
|
+
import { t } from "intlayer";
|
|
263
|
+
|
|
264
|
+
const appContent = {
|
|
265
|
+
content: {
|
|
266
|
+
links: {
|
|
267
|
+
about: t({
|
|
268
|
+
en: "About",
|
|
269
|
+
es: "Acerca de",
|
|
270
|
+
fr: "À propos",
|
|
271
|
+
}),
|
|
272
|
+
home: t({
|
|
273
|
+
en: "Home",
|
|
274
|
+
es: "Inicio",
|
|
275
|
+
fr: "Accueil",
|
|
276
|
+
}),
|
|
277
|
+
},
|
|
278
|
+
meta: {
|
|
279
|
+
title: t({
|
|
280
|
+
en: "Welcome to Intlayer + TanStack Router",
|
|
281
|
+
es: "Bienvenido a Intlayer + TanStack Router",
|
|
282
|
+
fr: "Bienvenue à Intlayer + TanStack Router",
|
|
283
|
+
}),
|
|
284
|
+
description: t({
|
|
285
|
+
en: "This is an example of using Intlayer with TanStack Router",
|
|
286
|
+
es: "Este es un ejemplo de uso de Intlayer con TanStack Router",
|
|
287
|
+
fr: "Ceci est un exemple d'utilisation d'Intlayer avec TanStack Router",
|
|
288
|
+
}),
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
key: "app",
|
|
292
|
+
} satisfies Dictionary;
|
|
293
|
+
|
|
294
|
+
export default appContent;
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
> Các khai báo nội dung của bạn có thể được định nghĩa ở bất kỳ đâu trong ứng dụng, miễn là chúng được bao gồm trong thư mục `contentDir` (mặc định là `./app`). Và khớp với phần mở rộng tệp khai báo nội dung (mặc định là `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
298
|
+
|
|
299
|
+
> Để biết thêm chi tiết, hãy tham khảo [tài liệu khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md).
|
|
300
|
+
|
|
301
|
+
### Bước 8: Sử dụng các Component và Hook theo ngôn ngữ
|
|
302
|
+
|
|
303
|
+
Tạo một component `LocalizedLink` để điều hướng theo ngôn ngữ:
|
|
304
|
+
|
|
305
|
+
```tsx fileName="src/components/LocalizedLink.tsx"
|
|
306
|
+
import { Link, type LinkProps } from "@tanstack/solid-router";
|
|
307
|
+
import { getPrefix } from "intlayer";
|
|
308
|
+
import { useLocale } from "solid-intlayer";
|
|
309
|
+
import type { JSX } from "solid-js";
|
|
310
|
+
|
|
311
|
+
export const LOCALE_ROUTE = "{-$locale}" as const;
|
|
312
|
+
|
|
313
|
+
export type RemoveLocaleParam<TVal> = TVal extends string
|
|
314
|
+
? RemoveLocaleFromString<TVal>
|
|
315
|
+
: TVal;
|
|
316
|
+
|
|
317
|
+
export type To = RemoveLocaleParam<LinkProps["to"]>;
|
|
318
|
+
|
|
319
|
+
type CollapseDoubleSlashes<TString extends string> =
|
|
320
|
+
TString extends `${infer THead}//${infer TTail}`
|
|
321
|
+
? CollapseDoubleSlashes<`${THead}/${TTail}`>
|
|
322
|
+
: TString;
|
|
323
|
+
|
|
324
|
+
export type LocalizedLinkProps = Omit<LinkProps, "to"> & {
|
|
325
|
+
to?: To;
|
|
326
|
+
} & JSX.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
327
|
+
|
|
328
|
+
type RemoveAll<
|
|
329
|
+
TString extends string,
|
|
330
|
+
TSub extends string,
|
|
331
|
+
> = TString extends `${infer THead}${TSub}${infer TTail}`
|
|
332
|
+
? RemoveAll<`${THead}${TTail}`, TSub>
|
|
333
|
+
: TString;
|
|
334
|
+
|
|
335
|
+
type RemoveLocaleFromString<TString extends string> = CollapseDoubleSlashes<
|
|
336
|
+
RemoveAll<TString, typeof LOCALE_ROUTE>
|
|
337
|
+
>;
|
|
338
|
+
|
|
339
|
+
export const LocalizedLink = (props: LocalizedLinkProps) => {
|
|
340
|
+
const { locale } = useLocale();
|
|
341
|
+
|
|
342
|
+
return (
|
|
343
|
+
<Link
|
|
344
|
+
{...props}
|
|
345
|
+
params={{
|
|
346
|
+
locale: getPrefix(locale()).localePrefix,
|
|
347
|
+
...(typeof props.params === "object" ? props.params : {}),
|
|
348
|
+
}}
|
|
349
|
+
to={`/${LOCALE_ROUTE}${props.to ?? ""}` as LinkProps["to"]}
|
|
350
|
+
/>
|
|
351
|
+
);
|
|
352
|
+
};
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Component này phục vụ hai mục đích:
|
|
356
|
+
|
|
357
|
+
- Xóa tiền tố `{-$locale}` không cần thiết khỏi URL.
|
|
358
|
+
- Chèn tham số ngôn ngữ vào URL để đảm bảo người dùng được chuyển hướng trực tiếp đến route đã được bản địa hóa.
|
|
359
|
+
|
|
360
|
+
Sau đó, chúng ta có thể tạo một hook `useLocalizedNavigate` để điều hướng bằng lập trình:
|
|
361
|
+
|
|
362
|
+
```tsx fileName="src/hooks/useLocalizedNavigate.tsx"
|
|
363
|
+
import { useNavigate } from "@tanstack/solid-router";
|
|
364
|
+
import { getLocalizedUrl } from "intlayer";
|
|
365
|
+
import { useLocale } from "solid-intlayer";
|
|
366
|
+
|
|
367
|
+
export const useLocalizedNavigate = () => {
|
|
368
|
+
const navigate = useNavigate();
|
|
369
|
+
const { locale } = useLocale();
|
|
370
|
+
|
|
371
|
+
const localizedNavigate = (to: string) => {
|
|
372
|
+
const localizedTo = getLocalizedUrl(to, locale());
|
|
373
|
+
return navigate({ to: localizedTo });
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
return localizedNavigate;
|
|
377
|
+
};
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Bước 9: Sử dụng Intlayer trong các trang của bạn
|
|
381
|
+
|
|
382
|
+
Truy cập các từ điển nội dung của bạn trong toàn bộ ứng dụng:
|
|
383
|
+
|
|
384
|
+
#### Trang chủ đa ngôn ngữ
|
|
385
|
+
|
|
386
|
+
```tsx fileName="src/routes/{-$locale}/index.tsx"
|
|
387
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
|
388
|
+
import { useIntlayer } from "solid-intlayer";
|
|
389
|
+
import { LocalizedLink } from "@/components/LocalizedLink";
|
|
390
|
+
|
|
391
|
+
export const Route = createFileRoute("/{-$locale}/")({
|
|
392
|
+
component: RouteComponent,
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
function RouteComponent() {
|
|
396
|
+
const content = useIntlayer("index-page");
|
|
397
|
+
|
|
398
|
+
return (
|
|
399
|
+
<main>
|
|
400
|
+
<h1>{content().heroTitle}</h1>
|
|
401
|
+
<p>{content().heroDesc}</p>
|
|
402
|
+
<div>
|
|
403
|
+
<LocalizedLink to="/">{content().navHome}</LocalizedLink>
|
|
404
|
+
<LocalizedLink to="/about">{content().navAbout}</LocalizedLink>
|
|
405
|
+
</div>
|
|
406
|
+
</main>
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
> Trong Solid, `useIntlayer` trả về một hàm **accessor** (ví dụ: `content()`). Bạn phải gọi hàm này để truy cập nội dung phản ứng.
|
|
412
|
+
>
|
|
413
|
+
> Để tìm hiểu thêm về hook `useIntlayer`, hãy tham khảo [tài liệu](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/solid-intlayer/useIntlayer.md).
|
|
414
|
+
|
|
415
|
+
### Bước 10: Tạo Component Chuyển đổi Ngôn ngữ
|
|
416
|
+
|
|
417
|
+
Tạo một component để cho phép người dùng thay đổi ngôn ngữ:
|
|
418
|
+
|
|
419
|
+
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
420
|
+
import { useLocation } from "@tanstack/solid-router";
|
|
421
|
+
import { getLocaleName, getPathWithoutLocale, getPrefix } from "intlayer";
|
|
422
|
+
import { For } from "solid-js";
|
|
423
|
+
import { useIntlayer, useLocale } from "solid-intlayer";
|
|
424
|
+
import { LocalizedLink, type To } from "./LocalizedLink";
|
|
425
|
+
|
|
426
|
+
export const LocaleSwitcher = () => {
|
|
427
|
+
const content = useIntlayer("locale-switcher");
|
|
428
|
+
const location = useLocation();
|
|
429
|
+
|
|
430
|
+
const { availableLocales, locale, setLocale } = useLocale();
|
|
431
|
+
|
|
432
|
+
const pathWithoutLocale = () => getPathWithoutLocale(location().pathname);
|
|
433
|
+
|
|
434
|
+
return (
|
|
435
|
+
<div class="flex flex-row gap-2">
|
|
436
|
+
<For each={availableLocales}>
|
|
437
|
+
{(localeEl) => (
|
|
438
|
+
<LocalizedLink
|
|
439
|
+
aria-current={localeEl === locale() ? "page" : undefined}
|
|
440
|
+
onClick={() => setLocale(localeEl)}
|
|
441
|
+
params={{ locale: getPrefix(localeEl).localePrefix }}
|
|
442
|
+
to={pathWithoutLocale() as To}
|
|
443
|
+
>
|
|
444
|
+
{getLocaleName(localeEl)}
|
|
445
|
+
</LocalizedLink>
|
|
446
|
+
)}
|
|
447
|
+
</For>
|
|
448
|
+
</div>
|
|
449
|
+
);
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
export default LocaleSwitcher;
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
> Trong các tệp Solid, `locale` từ `useLocale` là một **signal accessor**. Sử dụng `locale()` (với dấu ngoặc đơn) để đọc giá trị hiện tại của nó một cách phản ứng.
|
|
456
|
+
>
|
|
457
|
+
> Để tìm hiểu thêm về hook `useLocale`, hãy tham khảo [tài liệu](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/solid-intlayer/useLocale.md).
|
|
458
|
+
|
|
459
|
+
### Bước 11: Quản lý các thuộc tính HTML
|
|
460
|
+
|
|
461
|
+
Như đã thấy ở Bước 5, bạn có thể quản lý các thuộc tính `lang` và `dir` của thẻ `html` bằng cách sử dụng `useMatches` trong component gốc của mình. Điều này đảm bảo rằng các thuộc tính chính xác được thiết lập trên cả server và client.
|
|
462
|
+
|
|
463
|
+
```tsx fileName="src/routes/__root.tsx"
|
|
464
|
+
const RootComponent: ParentComponent = (props) => {
|
|
465
|
+
const matches = useMatches();
|
|
466
|
+
|
|
467
|
+
// Thử tìm locale trong các tham số của bất kỳ match nào đang hoạt động
|
|
468
|
+
const locale =
|
|
469
|
+
(
|
|
470
|
+
matches().find((match) => match.routeId === "/{-$locale}/")
|
|
471
|
+
?.params as Params
|
|
472
|
+
)?.locale ?? defaultLocale;
|
|
473
|
+
|
|
474
|
+
return (
|
|
475
|
+
<html dir={getHTMLTextDir(locale)} lang={locale}>
|
|
476
|
+
{/* ... */}
|
|
477
|
+
</html>
|
|
478
|
+
);
|
|
479
|
+
};
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
### Bước 12: Thêm Middleware (Tùy chọn)
|
|
485
|
+
|
|
486
|
+
Bạn cũng có thể sử dụng `intlayerProxy` để thêm điều hướng phía server cho ứng dụng của mình. Plugin này sẽ tự động phát hiện ngôn ngữ hiện tại dựa trên URL và thiết lập cookie ngôn ngữ phù hợp. Nếu không có ngôn ngữ nào được chỉ định, plugin sẽ xác định ngôn ngữ phù hợp nhất dựa trên tùy chọn ngôn ngữ trình duyệt của người dùng. Nếu không phát hiện được ngôn ngữ nào, nó sẽ chuyển hướng về ngôn ngữ mặc định.
|
|
487
|
+
|
|
488
|
+
> Lưu ý rằng để sử dụng `intlayerProxy` trong môi trường production, bạn cần chuyển gói `vite-intlayer` từ `devDependencies` sang `dependencies`.
|
|
489
|
+
|
|
490
|
+
```typescript {7,14-17} fileName="vite.config.ts"
|
|
491
|
+
import { tanstackStart } from "@tanstack/solid-start/plugin/vite";
|
|
492
|
+
import solid from "vite-plugin-solid";
|
|
493
|
+
import { nitro } from "nitro/vite";
|
|
494
|
+
import { defineConfig } from "vite";
|
|
495
|
+
import { intlayer, intlayerProxy } from "vite-intlayer";
|
|
496
|
+
|
|
497
|
+
export default defineConfig({
|
|
498
|
+
plugins: [
|
|
499
|
+
intlayerProxy(), // Proxy phải được đặt trước server nếu bạn sử dụng Nitro
|
|
500
|
+
nitro(),
|
|
501
|
+
intlayer(),
|
|
502
|
+
tanstackStart({
|
|
503
|
+
router: {
|
|
504
|
+
routeFileIgnorePattern:
|
|
505
|
+
".content.(ts|tsx|js|mjs|cjs|jsx|json|jsonc|json5)$",
|
|
506
|
+
},
|
|
507
|
+
}),
|
|
508
|
+
solid(),
|
|
509
|
+
],
|
|
510
|
+
});
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
### Bước 13: Đa ngôn ngữ hóa Metadata của bạn (Tùy chọn)
|
|
516
|
+
|
|
517
|
+
Bạn cũng có thể sử dụng hàm `getIntlayer` để truy cập các từ điển nội dung của mình trong hàm load `head` cho metadata theo ngôn ngữ:
|
|
518
|
+
|
|
519
|
+
```tsx fileName="src/routes/{-$locale}/index.tsx"
|
|
520
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
|
521
|
+
import { getIntlayer } from "intlayer";
|
|
522
|
+
|
|
523
|
+
export const Route = createFileRoute("/{-$locale}/")({
|
|
524
|
+
component: RouteComponent,
|
|
525
|
+
head: ({ params }) => {
|
|
526
|
+
const { locale } = params;
|
|
527
|
+
const metaContent = getIntlayer("page-metadata", locale);
|
|
528
|
+
|
|
529
|
+
return {
|
|
530
|
+
meta: [
|
|
531
|
+
{ title: metaContent.title },
|
|
532
|
+
{ content: metaContent.description, name: "description" },
|
|
533
|
+
],
|
|
534
|
+
};
|
|
535
|
+
},
|
|
536
|
+
});
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
### Bước 14: Lấy ngôn ngữ trong các server action của bạn (Tùy chọn)
|
|
542
|
+
|
|
543
|
+
Bạn có thể muốn truy cập ngôn ngữ hiện tại từ bên trong các server action hoặc API endpoint của mình.
|
|
544
|
+
Bạn có thể làm điều này bằng cách sử dụng helper `getLocale` từ `intlayer`.
|
|
545
|
+
|
|
546
|
+
Dưới đây là một ví dụ sử dụng các hàm server của TanStack Start:
|
|
547
|
+
|
|
548
|
+
```tsx fileName="src/routes/{-$locale}/index.tsx"
|
|
549
|
+
import { createServerFn } from "@tanstack/solid-start";
|
|
550
|
+
import {
|
|
551
|
+
getRequestHeader,
|
|
552
|
+
getRequestHeaders,
|
|
553
|
+
} from "@tanstack/solid-start/server";
|
|
554
|
+
import { getCookie, getIntlayer, getLocale } from "intlayer";
|
|
555
|
+
|
|
556
|
+
export const getLocaleServer = createServerFn().handler(async () => {
|
|
557
|
+
const locale = await getLocale({
|
|
558
|
+
// Lấy cookie từ request (mặc định: 'INTLAYER_LOCALE')
|
|
559
|
+
getCookie: (name) => {
|
|
560
|
+
const cookieString = getRequestHeader("cookie");
|
|
561
|
+
|
|
562
|
+
return getCookie(name, cookieString);
|
|
563
|
+
},
|
|
564
|
+
// Lấy header từ request (mặc định: 'x-intlayer-locale')
|
|
565
|
+
// Dự phòng bằng cách thương lượng Accept-Language
|
|
566
|
+
getHeader: (name) => getRequestHeader(name),
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
// Lấy một số nội dung bằng getIntlayer()
|
|
570
|
+
const content = getIntlayer("app", locale);
|
|
571
|
+
|
|
572
|
+
return { locale, content };
|
|
573
|
+
});
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
### Bước 15: Quản lý các trang không tìm thấy (404) (Tùy chọn)
|
|
579
|
+
|
|
580
|
+
Khi một người dùng truy cập vào một trang không tồn tại, bạn có thể hiển thị một trang không tìm thấy tùy chỉnh và tiền tố ngôn ngữ có thể ảnh hưởng đến cách trang không tìm thấy được kích hoạt.
|
|
581
|
+
|
|
582
|
+
#### Hiểu về cách xử lý 404 của TanStack Router với tiền tố ngôn ngữ
|
|
583
|
+
|
|
584
|
+
Trong TanStack Router, việc xử lý các trang 404 với các route đa ngôn ngữ yêu cầu một cách tiếp cận nhiều lớp:
|
|
585
|
+
|
|
586
|
+
1. **Route 404 chuyên dụng**: Một route cụ thể để hiển thị giao diện 404
|
|
587
|
+
2. **Kiểm tra cấp độ route**: Kiểm tra tính hợp lệ của tiền tố ngôn ngữ và chuyển hướng các tiền tố không hợp lệ đến trang 404
|
|
588
|
+
3. **Catch-all route**: Bắt bất kỳ đường dẫn nào không khớp bên trong phần ngôn ngữ
|
|
589
|
+
|
|
590
|
+
```tsx fileName="src/routes/{-$locale}/404.tsx"
|
|
591
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
|
592
|
+
|
|
593
|
+
// Việc này tạo ra một route /[locale]/404 chuyên dụng
|
|
594
|
+
// Nó được sử dụng như một route trực tiếp và được import như một component trong các tệp khác
|
|
595
|
+
export const Route = createFileRoute("/{-$locale}/404")({
|
|
596
|
+
component: NotFoundComponent,
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// Được export riêng biệt để có thể tái sử dụng trong notFoundComponent và các catch-all route
|
|
600
|
+
export function NotFoundComponent() {
|
|
601
|
+
return (
|
|
602
|
+
<div>
|
|
603
|
+
<h1>404</h1>
|
|
604
|
+
</div>
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
610
|
+
import { createFileRoute, Outlet, redirect } from "@tanstack/solid-router";
|
|
611
|
+
import { validatePrefix } from "intlayer";
|
|
612
|
+
import { NotFoundComponent } from "./404";
|
|
613
|
+
|
|
614
|
+
export const Route = createFileRoute("/{-$locale}")({
|
|
615
|
+
// beforeLoad chạy trước khi route render (cả ở server và client)
|
|
616
|
+
// Đây là nơi lý tưởng để kiểm tra tiền tố ngôn ngữ
|
|
617
|
+
beforeLoad: ({ params }) => {
|
|
618
|
+
const localeParam = params.locale;
|
|
619
|
+
|
|
620
|
+
// validatePrefix kiểm tra xem ngôn ngữ có hợp lệ theo cấu hình intlayer của bạn không
|
|
621
|
+
const { isValid, localePrefix } = validatePrefix(localeParam);
|
|
622
|
+
|
|
623
|
+
if (!isValid) {
|
|
624
|
+
// Tiền tố ngôn ngữ không hợp lệ - chuyển hướng đến trang 404 với tiền tố ngôn ngữ hợp lệ
|
|
625
|
+
throw redirect({
|
|
626
|
+
to: "/{-$locale}/404",
|
|
627
|
+
params: { locale: localePrefix },
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
component: Outlet,
|
|
632
|
+
// notFoundComponent được gọi khi một route con không tồn tại
|
|
633
|
+
// ví dụ: /en/trang-khong-ton-tai sẽ kích hoạt điều này bên trong layout /en
|
|
634
|
+
notFoundComponent: NotFoundComponent,
|
|
635
|
+
});
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
```tsx fileName="src/routes/{-$locale}/$.tsx"
|
|
639
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
|
640
|
+
|
|
641
|
+
import { NotFoundComponent } from "./404";
|
|
642
|
+
|
|
643
|
+
// Route $ (splat/catch-all) khớp với bất kỳ đường dẫn nào không khớp với các route khác
|
|
644
|
+
// ví dụ: /en/some/deeply/nested/invalid/path
|
|
645
|
+
// Việc này đảm bảo TẤT CẢ các đường dẫn không khớp bên trong một ngôn ngữ đều hiển thị trang 404
|
|
646
|
+
// Nếu không có điều này, các đường dẫn sâu không khớp có thể hiển thị trang trắng hoặc lỗi
|
|
647
|
+
export const Route = createFileRoute("/{-$locale}/$")({
|
|
648
|
+
component: NotFoundComponent,
|
|
649
|
+
});
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### (Tùy chọn) Bước 16: Trích xuất nội dung từ các component của bạn
|
|
653
|
+
|
|
654
|
+
Nếu bạn có một codebase hiện tại, việc chuyển đổi hàng nghìn tệp có thể tốn nhiều thời gian.
|
|
655
|
+
|
|
656
|
+
Để giảm bớt quá trình này, Intlayer đề xuất một [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/extract.md) để chuyển đổi các component và trích xuất nội dung.
|
|
657
|
+
|
|
658
|
+
Để thiết lập, bạn có thể thêm phần `compiler` trong tệp `intlayer.config.ts` của mình:
|
|
659
|
+
|
|
660
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
661
|
+
import { type IntlayerConfig } from "intlayer";
|
|
662
|
+
|
|
663
|
+
const config: IntlayerConfig = {
|
|
664
|
+
// ... Phần cấu hình còn lại của bạn
|
|
665
|
+
compiler: {
|
|
666
|
+
/**
|
|
667
|
+
* Cho biết compiler có được bật hay không.
|
|
668
|
+
*/
|
|
669
|
+
enabled: true,
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Định nghĩa đường dẫn các tệp đầu ra
|
|
673
|
+
*/
|
|
674
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Cho biết các component có nên được lưu sau khi được chuyển đổi hay không.
|
|
678
|
+
*
|
|
679
|
+
* - Nếu `true`, compiler sẽ ghi đè tệp component trên đĩa. Do đó, quá trình chuyển đổi sẽ là vĩnh viễn và compiler sẽ bỏ qua chuyển đổi cho quá trình tiếp theo. Bằng cách này, compiler có thể chuyển đổi ứng dụng và sau đó nó có thể được gỡ bỏ.
|
|
680
|
+
*
|
|
681
|
+
* - Nếu `false`, compiler sẽ chỉ chèn lệnh gọi hàm `useIntlayer()` vào code trong output build, giữ nguyên codebase gốc. Quá trình chuyển đổi sẽ chỉ được thực hiện trong bộ nhớ.
|
|
682
|
+
*/
|
|
683
|
+
saveComponents: false,
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Tiền tố phím từ điển
|
|
687
|
+
*/
|
|
688
|
+
dictionaryKeyPrefix: "",
|
|
689
|
+
},
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
export default config;
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
696
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
697
|
+
const config = {
|
|
698
|
+
// ... Phần cấu hình còn lại của bạn
|
|
699
|
+
compiler: {
|
|
700
|
+
/**
|
|
701
|
+
* Cho biết compiler có được bật hay không.
|
|
702
|
+
*/
|
|
703
|
+
enabled: true,
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Định nghĩa đường dẫn các tệp đầu ra
|
|
707
|
+
*/
|
|
708
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Cho biết các component có nên được lưu sau khi được chuyển đổi hay không.
|
|
712
|
+
*
|
|
713
|
+
* - Nếu `true`, compiler sẽ ghi đè tệp component trên đĩa. Do đó, quá trình chuyển đổi sẽ là vĩnh viễn và compiler sẽ bỏ qua chuyển đổi cho quá trình tiếp theo. Bằng cách này, compiler có thể chuyển đổi ứng dụng và sau đó nó có thể được gỡ bỏ.
|
|
714
|
+
*
|
|
715
|
+
* - Nếu `false`, compiler sẽ chỉ chèn lệnh gọi hàm `useIntlayer()` vào code trong output build, giữ nguyên codebase gốc. Quá trình chuyển đổi sẽ chỉ được thực hiện trong bộ nhớ.
|
|
716
|
+
*/
|
|
717
|
+
saveComponents: false,
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Tiền tố phím từ điển
|
|
721
|
+
*/
|
|
722
|
+
dictionaryKeyPrefix: "",
|
|
723
|
+
},
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
export default config;
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
730
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
731
|
+
const config = {
|
|
732
|
+
// ... Phần cấu hình còn lại của bạn
|
|
733
|
+
compiler: {
|
|
734
|
+
/**
|
|
735
|
+
* Cho biết compiler có được bật hay không.
|
|
736
|
+
*/
|
|
737
|
+
enabled: true,
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Định nghĩa đường dẫn các tệp đầu ra
|
|
741
|
+
*/
|
|
742
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Cho biết các component có nên được lưu sau khi được chuyển đổi hay không.
|
|
746
|
+
*
|
|
747
|
+
* - Nếu `true`, compiler sẽ ghi đè tệp component trên đĩa. Do đó, quá trình chuyển đổi sẽ là vĩnh viễn và compiler sẽ bỏ qua chuyển đổi cho quá trình tiếp theo. Bằng cách này, compiler có thể chuyển đổi ứng dụng và sau đó nó có thể được gỡ bỏ.
|
|
748
|
+
*
|
|
749
|
+
* - Nếu `false`, compiler sẽ chỉ chèn lệnh gọi hàm `useIntlayer()` vào code trong output build, giữ nguyên codebase gốc. Quá trình chuyển đổi sẽ chỉ được thực hiện trong bộ nhớ.
|
|
750
|
+
*/
|
|
751
|
+
saveComponents: false,
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Tiền tố phím từ điển
|
|
755
|
+
*/
|
|
756
|
+
dictionaryKeyPrefix: "",
|
|
757
|
+
},
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
module.exports = config;
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
<Tabs>
|
|
764
|
+
<Tab value='Lệnh extract'>
|
|
765
|
+
|
|
766
|
+
Chạy extractor để chuyển đổi các component và trích xuất nội dung
|
|
767
|
+
|
|
768
|
+
```bash packageManager="npm"
|
|
769
|
+
npx intlayer extract
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
```bash packageManager="pnpm"
|
|
773
|
+
pnpm intlayer extract
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
```bash packageManager="yarn"
|
|
777
|
+
yarn intlayer extract
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
```bash packageManager="bun"
|
|
781
|
+
bun x intlayer extract
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
</Tab>
|
|
785
|
+
<Tab value='Babel compiler'>
|
|
786
|
+
|
|
787
|
+
Cập nhật `vite.config.ts` của bạn để bao gồm plugin `intlayerCompiler`:
|
|
788
|
+
|
|
789
|
+
```ts fileName="vite.config.ts"
|
|
790
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
791
|
+
import { defineConfig } from "vite";
|
|
792
|
+
import { devtools } from "@tanstack/devtools-vite";
|
|
793
|
+
import { tanstackStart } from "@tanstack/solid-start/plugin/vite";
|
|
794
|
+
import solidPlugin from "vite-plugin-solid";
|
|
795
|
+
|
|
796
|
+
export default defineConfig({
|
|
797
|
+
plugins: [
|
|
798
|
+
devtools(),
|
|
799
|
+
tanstackStart({
|
|
800
|
+
router: {
|
|
801
|
+
routeFileIgnorePattern:
|
|
802
|
+
".content.(ts|tsx|js|mjs|cjs|jsx|json|jsonc|json5)$",
|
|
803
|
+
},
|
|
804
|
+
}),
|
|
805
|
+
solidPlugin({ ssr: true }),
|
|
806
|
+
intlayer(),
|
|
807
|
+
intlayerCompiler(),
|
|
808
|
+
],
|
|
809
|
+
});
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
```bash packageManager="npm"
|
|
813
|
+
npm run build # Hoặc npm run dev
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
```bash packageManager="pnpm"
|
|
817
|
+
pnpm run build # Hoặc pnpm run dev
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
```bash packageManager="yarn"
|
|
821
|
+
yarn build # Hoặc yarn dev
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
```bash packageManager="bun"
|
|
825
|
+
bun run build # Hoặc bun run dev
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
</Tab>
|
|
829
|
+
</Tabs>
|
|
830
|
+
|
|
831
|
+
---
|
|
832
|
+
|
|
833
|
+
### Bước 17: Cấu hình TypeScript (Tùy chọn)
|
|
834
|
+
|
|
835
|
+
Intlayer sử dụng module augmentation để tận dụng các lợi ích của TypeScript và giúp codebase của bạn mạnh mẽ hơn.
|
|
836
|
+
|
|
837
|
+
Đảm bảo cấu hình TypeScript của bạn bao gồm các kiểu dữ liệu được tạo tự động:
|
|
838
|
+
|
|
839
|
+
```json5 fileName="tsconfig.json"
|
|
840
|
+
{
|
|
841
|
+
// ... các thiết lập hiện tại của bạn
|
|
842
|
+
include: [
|
|
843
|
+
// ... các include hiện tại của bạn
|
|
844
|
+
".intlayer/**/*.ts", // Bao gồm các kiểu dữ liệu được tạo tự động
|
|
845
|
+
],
|
|
846
|
+
}
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
---
|
|
850
|
+
|
|
851
|
+
### Cấu hình Git
|
|
852
|
+
|
|
853
|
+
Khuyên bạn nên bỏ qua các tệp do Intlayer tạo ra. Điều này cho phép bạn tránh việc commit chúng vào kho lưu trữ Git của mình.
|
|
854
|
+
|
|
855
|
+
Để thực hiện việc này, bạn có thể thêm các hướng dẫn sau vào tệp `.gitignore` của mình:
|
|
856
|
+
|
|
857
|
+
```plaintext fileName=".gitignore"
|
|
858
|
+
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
859
|
+
.intlayer
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## Tiện ích mở rộng VS Code
|
|
865
|
+
|
|
866
|
+
Để cải thiện trải nghiệm phát triển của bạn với Intlayer, bạn có thể cài đặt **Tiện ích mở rộng Intlayer VS Code** chính thức.
|
|
867
|
+
|
|
868
|
+
[Cài đặt từ VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
869
|
+
|
|
870
|
+
Tiện ích mở rộng này cung cấp:
|
|
871
|
+
|
|
872
|
+
- **Tự động hoàn thành** cho các phím bản dịch.
|
|
873
|
+
- **Phát hiện lỗi thời gian thực** cho các bản dịch bị thiếu.
|
|
874
|
+
- **Xem trước bản dịch** nội dung ngay trong code (inline).
|
|
875
|
+
- **Các tác vụ nhanh** để tạo và cập nhật các bản dịch một cách dễ dàng.
|
|
876
|
+
|
|
877
|
+
Để biết thêm chi tiết về cách sử dụng tiện ích mở rộng, hãy tham khảo [tài liệu Tiện ích mở rộng Intlayer VS Code](https://intlayer.org/doc/vs-code-extension).
|
|
878
|
+
|
|
879
|
+
---
|
|
880
|
+
|
|
881
|
+
## Đi xa hơn
|
|
882
|
+
|
|
883
|
+
Để tìm hiểu sâu hơn, bạn có thể triển khai [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_visual_editor.md) hoặc bên ngoài hóa nội dung của bạn bằng [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md).
|
|
884
|
+
|
|
885
|
+
---
|
|
886
|
+
|
|
887
|
+
## Các tài liệu tham khảo
|
|
888
|
+
|
|
889
|
+
- [Tài liệu Intlayer](https://intlayer.org)
|
|
890
|
+
- [Tài liệu Tanstack Start](https://tanstack.com/start/latest)
|
|
891
|
+
- [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/solid-intlayer/useIntlayer.md)
|
|
892
|
+
- [Hook useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/solid-intlayer/useLocale.md)
|
|
893
|
+
- [Khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md)
|
|
894
|
+
- [Cấu hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md)
|