@intlayer/docs 8.12.1 → 8.12.3
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/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +1 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +121 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +1 -0
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +120 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/blog.d.ts.map +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/doc.d.ts.map +1 -1
- package/dist/types/frequentQuestions.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +6 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/legal.d.ts.map +1 -1
- package/docs/ar/bundle_optimization.md +250 -102
- package/docs/ar/configuration.md +10 -9
- package/docs/ar/intlayer_with_adonisjs.md +1 -1
- package/docs/ar/intlayer_with_analog.md +1 -1
- package/docs/ar/intlayer_with_angular_19.md +1 -1
- package/docs/ar/intlayer_with_angular_21.md +1 -1
- package/docs/ar/intlayer_with_astro.md +1 -1
- package/docs/ar/intlayer_with_astro_lit.md +1 -1
- package/docs/ar/intlayer_with_astro_preact.md +1 -1
- package/docs/ar/intlayer_with_astro_react.md +1 -1
- package/docs/ar/intlayer_with_astro_solid.md +1 -1
- package/docs/ar/intlayer_with_astro_svelte.md +1 -1
- package/docs/ar/intlayer_with_astro_vanilla.md +1 -1
- package/docs/ar/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ar/intlayer_with_nuxt.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/ar/intlayer_with_tanstack+solid.md +1 -1
- package/docs/ar/intlayer_with_tanstack.md +1 -1
- package/docs/ar/intlayer_with_vanilla.md +1 -1
- package/docs/ar/intlayer_with_vite+lit.md +1 -1
- package/docs/ar/intlayer_with_vite+preact.md +1 -1
- package/docs/ar/intlayer_with_vite+react.md +1 -1
- package/docs/ar/intlayer_with_vite+solid.md +1 -1
- package/docs/ar/intlayer_with_vite+svelte.md +1 -1
- package/docs/ar/intlayer_with_vite+vanilla.md +1 -1
- package/docs/ar/intlayer_with_vite+vue.md +1 -1
- package/docs/bn/bundle_optimization.md +252 -104
- package/docs/bn/configuration.md +10 -9
- package/docs/bn/intlayer_with_angular_21.md +1 -1
- package/docs/bn/intlayer_with_fastify.md +1 -1
- package/docs/bn/intlayer_with_hono.md +1 -1
- package/docs/bn/intlayer_with_vanilla.md +1 -1
- package/docs/bn/intlayer_with_vite+lit.md +1 -1
- package/docs/bn/intlayer_with_vite+vanilla.md +1 -1
- package/docs/cs/bundle_optimization.md +253 -105
- package/docs/cs/configuration.md +10 -9
- package/docs/cs/intlayer_with_angular_21.md +1 -1
- package/docs/cs/intlayer_with_fastify.md +1 -1
- package/docs/cs/intlayer_with_hono.md +1 -1
- package/docs/cs/intlayer_with_vanilla.md +1 -1
- package/docs/cs/intlayer_with_vite+lit.md +1 -1
- package/docs/cs/intlayer_with_vite+vanilla.md +1 -1
- package/docs/de/bundle_optimization.md +245 -97
- package/docs/de/configuration.md +10 -9
- package/docs/de/intlayer_with_adonisjs.md +1 -1
- package/docs/de/intlayer_with_analog.md +1 -1
- package/docs/de/intlayer_with_angular_19.md +1 -1
- package/docs/de/intlayer_with_angular_21.md +1 -1
- package/docs/de/intlayer_with_astro.md +1 -1
- package/docs/de/intlayer_with_astro_lit.md +1 -1
- package/docs/de/intlayer_with_astro_preact.md +1 -1
- package/docs/de/intlayer_with_astro_react.md +1 -1
- package/docs/de/intlayer_with_astro_solid.md +1 -1
- package/docs/de/intlayer_with_astro_svelte.md +1 -1
- package/docs/de/intlayer_with_astro_vanilla.md +1 -1
- package/docs/de/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/de/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/de/intlayer_with_nuxt.md +1 -1
- package/docs/de/intlayer_with_react_router_v7.md +1 -1
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/de/intlayer_with_tanstack+solid.md +1 -1
- package/docs/de/intlayer_with_tanstack.md +1 -1
- package/docs/de/intlayer_with_vanilla.md +1 -1
- package/docs/de/intlayer_with_vite+lit.md +1 -1
- package/docs/de/intlayer_with_vite+preact.md +1 -1
- package/docs/de/intlayer_with_vite+react.md +1 -1
- package/docs/de/intlayer_with_vite+solid.md +1 -1
- package/docs/de/intlayer_with_vite+svelte.md +1 -1
- package/docs/de/intlayer_with_vite+vanilla.md +1 -1
- package/docs/de/intlayer_with_vite+vue.md +1 -1
- package/docs/de/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/de/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/de/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/de/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/de/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/de/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/en/bundle_optimization.md +172 -49
- package/docs/en/configuration.md +10 -9
- package/docs/en/intlayer_with_adonisjs.md +1 -1
- package/docs/en/intlayer_with_analog.md +1 -1
- package/docs/en/intlayer_with_angular_19.md +1 -1
- package/docs/en/intlayer_with_angular_21.md +1 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_astro_lit.md +1 -1
- package/docs/en/intlayer_with_astro_preact.md +1 -1
- package/docs/en/intlayer_with_astro_react.md +1 -1
- package/docs/en/intlayer_with_astro_solid.md +1 -1
- package/docs/en/intlayer_with_astro_svelte.md +1 -1
- package/docs/en/intlayer_with_astro_vanilla.md +1 -1
- package/docs/en/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/en/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/en/intlayer_with_nuxt.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +1 -1
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/en/intlayer_with_tanstack+solid.md +1 -1
- package/docs/en/intlayer_with_tanstack.md +1 -1
- package/docs/en/intlayer_with_vanilla.md +1 -1
- package/docs/en/intlayer_with_vite+lit.md +1 -1
- package/docs/en/intlayer_with_vite+preact.md +1 -1
- package/docs/en/intlayer_with_vite+react.md +1 -1
- package/docs/en/intlayer_with_vite+solid.md +1 -1
- package/docs/en/intlayer_with_vite+svelte.md +1 -1
- package/docs/en/intlayer_with_vite+vanilla.md +1 -1
- package/docs/en/intlayer_with_vite+vue.md +1 -1
- package/docs/en/migration_from_i18next_to_intlayer.md +316 -0
- package/docs/en/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/en/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/en/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/en/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/en/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/en-GB/bundle_optimization.md +230 -82
- package/docs/en-GB/configuration.md +10 -9
- 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_19.md +1 -1
- package/docs/en-GB/intlayer_with_angular_21.md +1 -1
- package/docs/en-GB/intlayer_with_astro.md +1 -1
- package/docs/en-GB/intlayer_with_astro_lit.md +1 -1
- package/docs/en-GB/intlayer_with_astro_preact.md +1 -1
- package/docs/en-GB/intlayer_with_astro_react.md +1 -1
- package/docs/en-GB/intlayer_with_astro_solid.md +1 -1
- package/docs/en-GB/intlayer_with_astro_svelte.md +1 -1
- package/docs/en-GB/intlayer_with_astro_vanilla.md +1 -1
- package/docs/en-GB/intlayer_with_astro_vue.md +1 -1
- package/docs/en-GB/intlayer_with_create_react_app.md +1 -1
- 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_nestjs.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_no_locale_path.md +1 -1
- package/docs/en-GB/intlayer_with_nuxt.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/en-GB/intlayer_with_tanstack+solid.md +1 -1
- package/docs/en-GB/intlayer_with_tanstack.md +1 -1
- package/docs/en-GB/intlayer_with_vanilla.md +1 -1
- package/docs/en-GB/intlayer_with_vite+lit.md +1 -1
- 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+solid.md +1 -1
- package/docs/en-GB/intlayer_with_vite+svelte.md +1 -1
- package/docs/en-GB/intlayer_with_vite+vanilla.md +1 -1
- package/docs/en-GB/intlayer_with_vite+vue.md +1 -1
- package/docs/es/bundle_optimization.md +250 -102
- package/docs/es/configuration.md +10 -9
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_analog.md +1 -1
- package/docs/es/intlayer_with_angular_19.md +1 -1
- package/docs/es/intlayer_with_angular_21.md +1 -1
- package/docs/es/intlayer_with_astro.md +1 -1
- package/docs/es/intlayer_with_astro_lit.md +1 -1
- package/docs/es/intlayer_with_astro_preact.md +1 -1
- package/docs/es/intlayer_with_astro_react.md +1 -1
- package/docs/es/intlayer_with_astro_solid.md +1 -1
- package/docs/es/intlayer_with_astro_svelte.md +1 -1
- package/docs/es/intlayer_with_astro_vanilla.md +1 -1
- package/docs/es/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/es/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +1 -1
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/es/intlayer_with_tanstack+solid.md +1 -1
- package/docs/es/intlayer_with_tanstack.md +1 -1
- package/docs/es/intlayer_with_vanilla.md +1 -1
- package/docs/es/intlayer_with_vite+lit.md +1 -1
- package/docs/es/intlayer_with_vite+preact.md +1 -1
- package/docs/es/intlayer_with_vite+react.md +1 -1
- package/docs/es/intlayer_with_vite+solid.md +1 -1
- package/docs/es/intlayer_with_vite+svelte.md +1 -1
- package/docs/es/intlayer_with_vite+vanilla.md +1 -1
- package/docs/es/intlayer_with_vite+vue.md +1 -1
- package/docs/es/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/es/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/es/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/es/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/es/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/es/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/es/packages/next-intlayer/index.md +1 -1
- package/docs/es/packages/react-intlayer/index.md +1 -1
- package/docs/fr/bundle_optimization.md +223 -75
- package/docs/fr/configuration.md +10 -9
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_analog.md +1 -1
- package/docs/fr/intlayer_with_angular_19.md +1 -1
- package/docs/fr/intlayer_with_angular_21.md +1 -1
- package/docs/fr/intlayer_with_astro.md +1 -1
- package/docs/fr/intlayer_with_astro_lit.md +1 -1
- package/docs/fr/intlayer_with_astro_preact.md +1 -1
- package/docs/fr/intlayer_with_astro_react.md +1 -1
- package/docs/fr/intlayer_with_astro_solid.md +1 -1
- package/docs/fr/intlayer_with_astro_svelte.md +1 -1
- package/docs/fr/intlayer_with_astro_vanilla.md +1 -1
- package/docs/fr/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/fr/intlayer_with_nuxt.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/fr/intlayer_with_tanstack+solid.md +1 -1
- package/docs/fr/intlayer_with_tanstack.md +1 -1
- package/docs/fr/intlayer_with_vanilla.md +1 -1
- package/docs/fr/intlayer_with_vite+lit.md +1 -1
- package/docs/fr/intlayer_with_vite+preact.md +1 -1
- package/docs/fr/intlayer_with_vite+react.md +1 -1
- package/docs/fr/intlayer_with_vite+solid.md +1 -1
- package/docs/fr/intlayer_with_vite+svelte.md +1 -1
- package/docs/fr/intlayer_with_vite+vanilla.md +1 -1
- package/docs/fr/intlayer_with_vite+vue.md +1 -1
- package/docs/fr/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/fr/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/fr/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/fr/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/fr/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/fr/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/fr/packages/react-intlayer/index.md +1 -1
- package/docs/hi/bundle_optimization.md +253 -105
- package/docs/hi/configuration.md +10 -9
- package/docs/hi/intlayer_with_adonisjs.md +1 -1
- package/docs/hi/intlayer_with_analog.md +1 -1
- package/docs/hi/intlayer_with_angular_19.md +1 -1
- package/docs/hi/intlayer_with_angular_21.md +1 -1
- package/docs/hi/intlayer_with_astro.md +1 -1
- package/docs/hi/intlayer_with_astro_lit.md +1 -1
- package/docs/hi/intlayer_with_astro_preact.md +1 -1
- package/docs/hi/intlayer_with_astro_react.md +1 -1
- package/docs/hi/intlayer_with_astro_solid.md +1 -1
- package/docs/hi/intlayer_with_astro_svelte.md +1 -1
- package/docs/hi/intlayer_with_astro_vanilla.md +1 -1
- package/docs/hi/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/hi/intlayer_with_nuxt.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/hi/intlayer_with_tanstack+solid.md +1 -1
- package/docs/hi/intlayer_with_tanstack.md +1 -1
- package/docs/hi/intlayer_with_vanilla.md +1 -1
- package/docs/hi/intlayer_with_vite+lit.md +1 -1
- package/docs/hi/intlayer_with_vite+preact.md +1 -1
- package/docs/hi/intlayer_with_vite+react.md +1 -1
- package/docs/hi/intlayer_with_vite+solid.md +1 -1
- package/docs/hi/intlayer_with_vite+svelte.md +1 -1
- package/docs/hi/intlayer_with_vite+vanilla.md +1 -1
- package/docs/hi/intlayer_with_vite+vue.md +1 -1
- package/docs/hi/packages/intlayer/index.md +1 -1
- package/docs/id/bundle_optimization.md +258 -110
- package/docs/id/configuration.md +10 -9
- package/docs/id/intlayer_with_adonisjs.md +1 -1
- package/docs/id/intlayer_with_analog.md +1 -1
- package/docs/id/intlayer_with_angular_19.md +1 -1
- package/docs/id/intlayer_with_angular_21.md +1 -1
- package/docs/id/intlayer_with_astro.md +1 -1
- package/docs/id/intlayer_with_astro_lit.md +1 -1
- package/docs/id/intlayer_with_astro_preact.md +1 -1
- package/docs/id/intlayer_with_astro_react.md +1 -1
- package/docs/id/intlayer_with_astro_solid.md +1 -1
- package/docs/id/intlayer_with_astro_svelte.md +1 -1
- package/docs/id/intlayer_with_astro_vanilla.md +1 -1
- package/docs/id/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/id/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/id/intlayer_with_nuxt.md +1 -1
- package/docs/id/intlayer_with_react_router_v7.md +1 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/id/intlayer_with_tanstack+solid.md +1 -1
- package/docs/id/intlayer_with_tanstack.md +1 -1
- package/docs/id/intlayer_with_vanilla.md +1 -1
- package/docs/id/intlayer_with_vite+lit.md +1 -1
- package/docs/id/intlayer_with_vite+preact.md +1 -1
- package/docs/id/intlayer_with_vite+react.md +1 -1
- package/docs/id/intlayer_with_vite+solid.md +1 -1
- package/docs/id/intlayer_with_vite+svelte.md +1 -1
- package/docs/id/intlayer_with_vite+vanilla.md +1 -1
- package/docs/id/intlayer_with_vite+vue.md +1 -1
- package/docs/it/bundle_optimization.md +249 -103
- package/docs/it/configuration.md +10 -9
- package/docs/it/intlayer_with_adonisjs.md +1 -1
- package/docs/it/intlayer_with_analog.md +1 -1
- package/docs/it/intlayer_with_angular_19.md +1 -1
- package/docs/it/intlayer_with_angular_21.md +1 -1
- package/docs/it/intlayer_with_astro.md +1 -1
- package/docs/it/intlayer_with_astro_lit.md +1 -1
- package/docs/it/intlayer_with_astro_preact.md +1 -1
- package/docs/it/intlayer_with_astro_react.md +1 -1
- package/docs/it/intlayer_with_astro_solid.md +1 -1
- package/docs/it/intlayer_with_astro_svelte.md +1 -1
- package/docs/it/intlayer_with_astro_vanilla.md +1 -1
- package/docs/it/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/it/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/it/intlayer_with_nuxt.md +1 -1
- package/docs/it/intlayer_with_react_router_v7.md +1 -1
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/it/intlayer_with_tanstack+solid.md +1 -1
- package/docs/it/intlayer_with_tanstack.md +1 -1
- package/docs/it/intlayer_with_vanilla.md +1 -1
- package/docs/it/intlayer_with_vite+lit.md +1 -1
- package/docs/it/intlayer_with_vite+preact.md +1 -1
- package/docs/it/intlayer_with_vite+react.md +1 -1
- package/docs/it/intlayer_with_vite+solid.md +1 -1
- package/docs/it/intlayer_with_vite+svelte.md +1 -1
- package/docs/it/intlayer_with_vite+vanilla.md +1 -1
- package/docs/it/intlayer_with_vite+vue.md +1 -1
- package/docs/it/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/it/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/it/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/it/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/it/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/it/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/ja/bundle_optimization.md +245 -97
- package/docs/ja/configuration.md +10 -9
- package/docs/ja/intlayer_with_adonisjs.md +1 -1
- package/docs/ja/intlayer_with_analog.md +1 -1
- package/docs/ja/intlayer_with_angular_19.md +1 -1
- package/docs/ja/intlayer_with_angular_21.md +1 -1
- package/docs/ja/intlayer_with_astro.md +1 -1
- package/docs/ja/intlayer_with_astro_lit.md +1 -1
- package/docs/ja/intlayer_with_astro_preact.md +1 -1
- package/docs/ja/intlayer_with_astro_react.md +1 -1
- package/docs/ja/intlayer_with_astro_solid.md +1 -1
- package/docs/ja/intlayer_with_astro_svelte.md +1 -1
- package/docs/ja/intlayer_with_astro_vanilla.md +1 -1
- package/docs/ja/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ja/intlayer_with_nuxt.md +1 -1
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/ja/intlayer_with_tanstack+solid.md +1 -1
- package/docs/ja/intlayer_with_tanstack.md +1 -1
- package/docs/ja/intlayer_with_vanilla.md +1 -1
- package/docs/ja/intlayer_with_vite+lit.md +1 -1
- package/docs/ja/intlayer_with_vite+solid.md +1 -1
- package/docs/ja/intlayer_with_vite+svelte.md +1 -1
- package/docs/ja/intlayer_with_vite+vanilla.md +1 -1
- package/docs/ja/intlayer_with_vite+vue.md +1 -1
- package/docs/ja/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/ja/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/ja/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/ja/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/ja/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/ja/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/ko/bundle_optimization.md +253 -105
- package/docs/ko/configuration.md +10 -9
- package/docs/ko/intlayer_with_adonisjs.md +1 -1
- package/docs/ko/intlayer_with_analog.md +1 -1
- package/docs/ko/intlayer_with_angular_19.md +1 -1
- package/docs/ko/intlayer_with_angular_21.md +1 -1
- package/docs/ko/intlayer_with_astro.md +1 -1
- package/docs/ko/intlayer_with_astro_lit.md +1 -1
- package/docs/ko/intlayer_with_astro_preact.md +1 -1
- package/docs/ko/intlayer_with_astro_react.md +1 -1
- package/docs/ko/intlayer_with_astro_solid.md +1 -1
- package/docs/ko/intlayer_with_astro_svelte.md +1 -1
- package/docs/ko/intlayer_with_astro_vanilla.md +1 -1
- package/docs/ko/intlayer_with_astro_vue.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_nestjs.md +1 -1
- package/docs/ko/intlayer_with_nextjs_14.md +1 -1
- package/docs/ko/intlayer_with_nextjs_15.md +2 -2
- package/docs/ko/intlayer_with_nextjs_16.md +1 -1
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ko/intlayer_with_nuxt.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/ko/intlayer_with_tanstack+solid.md +1 -1
- package/docs/ko/intlayer_with_tanstack.md +1 -1
- package/docs/ko/intlayer_with_vanilla.md +1 -1
- package/docs/ko/intlayer_with_vite+lit.md +1 -1
- package/docs/ko/intlayer_with_vite+preact.md +1 -1
- package/docs/ko/intlayer_with_vite+react.md +1 -1
- package/docs/ko/intlayer_with_vite+solid.md +1 -1
- package/docs/ko/intlayer_with_vite+svelte.md +1 -1
- package/docs/ko/intlayer_with_vite+vanilla.md +1 -1
- package/docs/ko/intlayer_with_vite+vue.md +1 -1
- package/docs/ko/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/ko/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/ko/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/ko/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/ko/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/ko/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/nl/bundle_optimization.md +249 -101
- package/docs/nl/configuration.md +10 -9
- package/docs/nl/intlayer_with_angular_21.md +1 -1
- package/docs/nl/intlayer_with_fastify.md +1 -1
- package/docs/nl/intlayer_with_hono.md +1 -1
- package/docs/nl/intlayer_with_vanilla.md +1 -1
- package/docs/nl/intlayer_with_vite+lit.md +1 -1
- package/docs/nl/intlayer_with_vite+vanilla.md +1 -1
- package/docs/pl/bundle_optimization.md +258 -111
- package/docs/pl/configuration.md +10 -9
- package/docs/pl/intlayer_with_adonisjs.md +1 -1
- package/docs/pl/intlayer_with_analog.md +1 -1
- package/docs/pl/intlayer_with_angular_19.md +1 -1
- package/docs/pl/intlayer_with_angular_21.md +1 -1
- package/docs/pl/intlayer_with_astro.md +1 -1
- package/docs/pl/intlayer_with_astro_lit.md +1 -1
- package/docs/pl/intlayer_with_astro_preact.md +1 -1
- package/docs/pl/intlayer_with_astro_react.md +1 -1
- package/docs/pl/intlayer_with_astro_solid.md +1 -1
- package/docs/pl/intlayer_with_astro_svelte.md +1 -1
- package/docs/pl/intlayer_with_astro_vanilla.md +1 -1
- package/docs/pl/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/pl/intlayer_with_nuxt.md +1 -1
- package/docs/pl/intlayer_with_react_router_v7.md +1 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/pl/intlayer_with_tanstack+solid.md +1 -1
- package/docs/pl/intlayer_with_tanstack.md +1 -1
- package/docs/pl/intlayer_with_vanilla.md +1 -1
- package/docs/pl/intlayer_with_vite+lit.md +1 -1
- package/docs/pl/intlayer_with_vite+preact.md +1 -1
- package/docs/pl/intlayer_with_vite+react.md +1 -1
- package/docs/pl/intlayer_with_vite+solid.md +1 -1
- package/docs/pl/intlayer_with_vite+svelte.md +1 -1
- package/docs/pl/intlayer_with_vite+vanilla.md +1 -1
- package/docs/pl/intlayer_with_vite+vue.md +1 -1
- package/docs/pt/bundle_optimization.md +256 -115
- package/docs/pt/configuration.md +10 -9
- package/docs/pt/intlayer_with_adonisjs.md +1 -1
- package/docs/pt/intlayer_with_analog.md +1 -1
- package/docs/pt/intlayer_with_angular_19.md +1 -1
- package/docs/pt/intlayer_with_angular_21.md +1 -1
- package/docs/pt/intlayer_with_astro.md +1 -1
- package/docs/pt/intlayer_with_astro_lit.md +1 -1
- package/docs/pt/intlayer_with_astro_preact.md +1 -1
- package/docs/pt/intlayer_with_astro_react.md +1 -1
- package/docs/pt/intlayer_with_astro_solid.md +1 -1
- package/docs/pt/intlayer_with_astro_svelte.md +1 -1
- package/docs/pt/intlayer_with_astro_vanilla.md +1 -1
- package/docs/pt/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/pt/intlayer_with_nuxt.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/pt/intlayer_with_tanstack+solid.md +1 -1
- package/docs/pt/intlayer_with_tanstack.md +1 -1
- package/docs/pt/intlayer_with_vanilla.md +1 -1
- package/docs/pt/intlayer_with_vite+lit.md +1 -1
- package/docs/pt/intlayer_with_vite+preact.md +1 -1
- package/docs/pt/intlayer_with_vite+react.md +1 -1
- package/docs/pt/intlayer_with_vite+solid.md +1 -1
- package/docs/pt/intlayer_with_vite+svelte.md +1 -1
- package/docs/pt/intlayer_with_vite+vanilla.md +1 -1
- package/docs/pt/intlayer_with_vite+vue.md +1 -1
- package/docs/pt/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/pt/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/pt/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/pt/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/pt/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/pt/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/ru/bundle_optimization.md +253 -105
- package/docs/ru/configuration.md +10 -9
- package/docs/ru/intlayer_with_adonisjs.md +1 -1
- package/docs/ru/intlayer_with_analog.md +1 -1
- package/docs/ru/intlayer_with_angular_19.md +1 -1
- package/docs/ru/intlayer_with_angular_21.md +1 -1
- package/docs/ru/intlayer_with_astro.md +1 -1
- package/docs/ru/intlayer_with_astro_lit.md +1 -1
- package/docs/ru/intlayer_with_astro_preact.md +1 -1
- package/docs/ru/intlayer_with_astro_react.md +1 -1
- package/docs/ru/intlayer_with_astro_solid.md +1 -1
- package/docs/ru/intlayer_with_astro_svelte.md +1 -1
- package/docs/ru/intlayer_with_astro_vanilla.md +1 -1
- package/docs/ru/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/ru/intlayer_with_nuxt.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/ru/intlayer_with_tanstack+solid.md +1 -1
- package/docs/ru/intlayer_with_tanstack.md +1 -1
- package/docs/ru/intlayer_with_vanilla.md +1 -1
- package/docs/ru/intlayer_with_vite+lit.md +1 -1
- package/docs/ru/intlayer_with_vite+preact.md +1 -1
- package/docs/ru/intlayer_with_vite+react.md +1 -1
- package/docs/ru/intlayer_with_vite+solid.md +1 -1
- package/docs/ru/intlayer_with_vite+svelte.md +1 -1
- package/docs/ru/intlayer_with_vite+vanilla.md +1 -1
- package/docs/ru/intlayer_with_vite+vue.md +1 -1
- package/docs/ru/migration_from_i18next_to_intlayer.md +313 -0
- package/docs/ru/migration_from_next-i18next_to_intlayer.md +338 -0
- package/docs/ru/migration_from_next-intl_to_intlayer.md +347 -0
- package/docs/ru/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
- package/docs/ru/migration_from_react-i18next_to_intlayer.md +367 -0
- package/docs/ru/migration_from_vue-i18n_to_intlayer.md +342 -0
- package/docs/tr/bundle_optimization.md +255 -107
- package/docs/tr/configuration.md +10 -9
- package/docs/tr/intlayer_with_adonisjs.md +1 -1
- package/docs/tr/intlayer_with_analog.md +1 -1
- package/docs/tr/intlayer_with_angular_19.md +1 -1
- package/docs/tr/intlayer_with_angular_21.md +1 -1
- package/docs/tr/intlayer_with_astro.md +1 -1
- package/docs/tr/intlayer_with_astro_lit.md +1 -1
- package/docs/tr/intlayer_with_astro_preact.md +1 -1
- package/docs/tr/intlayer_with_astro_react.md +1 -1
- package/docs/tr/intlayer_with_astro_solid.md +1 -1
- package/docs/tr/intlayer_with_astro_svelte.md +1 -1
- package/docs/tr/intlayer_with_astro_vanilla.md +1 -1
- package/docs/tr/intlayer_with_astro_vue.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_nestjs.md +1 -1
- package/docs/tr/intlayer_with_nextjs_15.md +1 -1
- package/docs/tr/intlayer_with_nextjs_16.md +1 -1
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/tr/intlayer_with_nuxt.md +1 -1
- package/docs/tr/intlayer_with_react_router_v7.md +1 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/tr/intlayer_with_tanstack+solid.md +1 -1
- package/docs/tr/intlayer_with_tanstack.md +1 -1
- package/docs/tr/intlayer_with_vanilla.md +1 -1
- package/docs/tr/intlayer_with_vite+lit.md +1 -1
- package/docs/tr/intlayer_with_vite+preact.md +1 -1
- package/docs/tr/intlayer_with_vite+react.md +1 -1
- package/docs/tr/intlayer_with_vite+solid.md +1 -1
- package/docs/tr/intlayer_with_vite+svelte.md +1 -1
- package/docs/tr/intlayer_with_vite+vanilla.md +1 -1
- package/docs/tr/intlayer_with_vite+vue.md +1 -1
- package/docs/tr/migration_from_i18next_to_intlayer.md +314 -0
- package/docs/tr/migration_from_next-i18next_to_intlayer.md +339 -0
- package/docs/tr/migration_from_next-intl_to_intlayer.md +348 -0
- package/docs/tr/migration_from_nuxtjs_i18n_to_intlayer.md +312 -0
- package/docs/tr/migration_from_react-i18next_to_intlayer.md +368 -0
- package/docs/tr/migration_from_vue-i18n_to_intlayer.md +343 -0
- package/docs/uk/bundle_optimization.md +250 -102
- package/docs/uk/configuration.md +10 -9
- package/docs/uk/intlayer_with_adonisjs.md +1 -1
- package/docs/uk/intlayer_with_analog.md +1 -1
- package/docs/uk/intlayer_with_angular_19.md +1 -1
- package/docs/uk/intlayer_with_angular_21.md +1 -1
- package/docs/uk/intlayer_with_astro.md +1 -1
- package/docs/uk/intlayer_with_astro_lit.md +1 -1
- package/docs/uk/intlayer_with_astro_preact.md +1 -1
- package/docs/uk/intlayer_with_astro_react.md +1 -1
- package/docs/uk/intlayer_with_astro_solid.md +1 -1
- package/docs/uk/intlayer_with_astro_svelte.md +1 -1
- package/docs/uk/intlayer_with_astro_vanilla.md +1 -1
- package/docs/uk/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/uk/intlayer_with_nuxt.md +1 -1
- package/docs/uk/intlayer_with_react_router_v7.md +1 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/uk/intlayer_with_tanstack+solid.md +1 -1
- package/docs/uk/intlayer_with_tanstack.md +1 -1
- package/docs/uk/intlayer_with_vanilla.md +1 -1
- package/docs/uk/intlayer_with_vite+lit.md +1 -1
- package/docs/uk/intlayer_with_vite+preact.md +1 -1
- package/docs/uk/intlayer_with_vite+react.md +1 -1
- package/docs/uk/intlayer_with_vite+solid.md +1 -1
- package/docs/uk/intlayer_with_vite+svelte.md +1 -1
- package/docs/uk/intlayer_with_vite+vanilla.md +1 -1
- package/docs/uk/intlayer_with_vite+vue.md +1 -1
- package/docs/ur/bundle_optimization.md +257 -109
- package/docs/ur/configuration.md +10 -9
- package/docs/ur/intlayer_with_angular_21.md +1 -1
- package/docs/ur/intlayer_with_fastify.md +1 -1
- package/docs/ur/intlayer_with_hono.md +1 -1
- package/docs/ur/intlayer_with_vanilla.md +1 -1
- package/docs/ur/intlayer_with_vite+lit.md +1 -1
- package/docs/ur/intlayer_with_vite+vanilla.md +1 -1
- package/docs/vi/bundle_optimization.md +259 -111
- package/docs/vi/configuration.md +10 -9
- package/docs/vi/intlayer_with_adonisjs.md +1 -1
- package/docs/vi/intlayer_with_analog.md +1 -1
- package/docs/vi/intlayer_with_angular_19.md +1 -1
- package/docs/vi/intlayer_with_angular_21.md +1 -1
- package/docs/vi/intlayer_with_astro.md +1 -1
- package/docs/vi/intlayer_with_astro_lit.md +1 -1
- package/docs/vi/intlayer_with_astro_preact.md +1 -1
- package/docs/vi/intlayer_with_astro_react.md +1 -1
- package/docs/vi/intlayer_with_astro_solid.md +1 -1
- package/docs/vi/intlayer_with_astro_svelte.md +1 -1
- package/docs/vi/intlayer_with_astro_vanilla.md +1 -1
- package/docs/vi/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/vi/intlayer_with_nuxt.md +1 -1
- package/docs/vi/intlayer_with_react_router_v7.md +1 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/vi/intlayer_with_tanstack+solid.md +1 -1
- package/docs/vi/intlayer_with_tanstack.md +1 -1
- package/docs/vi/intlayer_with_vanilla.md +1 -1
- package/docs/vi/intlayer_with_vite+lit.md +1 -1
- package/docs/vi/intlayer_with_vite+preact.md +1 -1
- package/docs/vi/intlayer_with_vite+react.md +1 -1
- package/docs/vi/intlayer_with_vite+solid.md +1 -1
- package/docs/vi/intlayer_with_vite+svelte.md +1 -1
- package/docs/vi/intlayer_with_vite+vanilla.md +1 -1
- package/docs/vi/intlayer_with_vite+vue.md +1 -1
- package/docs/zh/bundle_optimization.md +260 -112
- package/docs/zh/configuration.md +10 -9
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_analog.md +1 -1
- package/docs/zh/intlayer_with_angular_19.md +1 -1
- package/docs/zh/intlayer_with_angular_21.md +1 -1
- package/docs/zh/intlayer_with_astro.md +1 -1
- package/docs/zh/intlayer_with_astro_lit.md +1 -1
- package/docs/zh/intlayer_with_astro_preact.md +1 -1
- package/docs/zh/intlayer_with_astro_react.md +1 -1
- package/docs/zh/intlayer_with_astro_solid.md +1 -1
- package/docs/zh/intlayer_with_astro_svelte.md +1 -1
- package/docs/zh/intlayer_with_astro_vanilla.md +1 -1
- package/docs/zh/intlayer_with_astro_vue.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_nestjs.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 +1 -1
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1 -1
- package/docs/zh/intlayer_with_nuxt.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/zh/intlayer_with_tanstack+solid.md +1 -1
- package/docs/zh/intlayer_with_tanstack.md +1 -1
- package/docs/zh/intlayer_with_vanilla.md +1 -1
- package/docs/zh/intlayer_with_vite+lit.md +1 -1
- package/docs/zh/intlayer_with_vite+preact.md +1 -1
- package/docs/zh/intlayer_with_vite+react.md +1 -1
- package/docs/zh/intlayer_with_vite+solid.md +1 -1
- package/docs/zh/intlayer_with_vite+svelte.md +1 -1
- package/docs/zh/intlayer_with_vite+vanilla.md +1 -1
- package/docs/zh/intlayer_with_vite+vue.md +1 -1
- package/docs/zh-TW/bundle_optimization.md +602 -0
- package/docs/zh-TW/intlayer_with_angular_21.md +1 -1
- package/package.json +8 -8
- package/src/generated/docs.entry.ts +120 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-11-25
|
|
3
|
+
updatedAt: 2026-06-07
|
|
4
|
+
title: 最佳化 i18n 打包體積與效能
|
|
5
|
+
description: 透過最佳化國際化(i18n)內容來縮減應用程式包的大小。了解如何利用 Intlayer 實現字典的 tree shaking 和延遲載入(lazy loading)。
|
|
6
|
+
keywords:
|
|
7
|
+
- 打包最佳化
|
|
8
|
+
- 內容自動化
|
|
9
|
+
- 動態內容
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Next.js
|
|
12
|
+
- JavaScript
|
|
13
|
+
- React
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- concept
|
|
17
|
+
- bundle-optimization
|
|
18
|
+
history:
|
|
19
|
+
- version: 8.12.0
|
|
20
|
+
date: 2026-06-07
|
|
21
|
+
changes: "為 Babel/Webpack 引入了 `intlayerPurgeBabelPlugin` 和 `intlayerMinifyBabelPlugin`,明確了外掛程式管線"
|
|
22
|
+
- version: 8.7.0
|
|
23
|
+
date: 2026-04-08
|
|
24
|
+
changes: "向建置設定中新增了 `minify` 和 `purge` 選項"
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# 最佳化 i18n 打包體積與效能
|
|
28
|
+
|
|
29
|
+
依賴 JSON 檔案的傳統 i18n 解決方案中最常見的挑戰之一是管理內容體積。如果開發者沒有手動將內容拆分到各個命名空間(namespaces),使用者通常會為了查看一個頁面而下載所有頁面、甚至是所有語言的翻譯。
|
|
30
|
+
|
|
31
|
+
例如,一個應用程式有 10 個頁面並被翻譯成了 10 種語言,可能導致使用者為了這 10 個頁面下載所有的內容,儘管他們只想要**一個頁面**的內容(當前語言版本的當前頁面)。這不僅會造成頻寬浪費,也會導致更慢的載入時間。
|
|
32
|
+
|
|
33
|
+
**Intlayer 透過在建置時(build-time)進行最佳化來解決這一問題。** 它可以分析您的程式碼以檢測每個元件實際使用了哪些字典,並只將必要的內容注入到您的打包結果(bundle)中。
|
|
34
|
+
|
|
35
|
+
## 目錄
|
|
36
|
+
|
|
37
|
+
<TOC />
|
|
38
|
+
|
|
39
|
+
## 分析您的打包大小
|
|
40
|
+
|
|
41
|
+
分析您的打包結果是找出「臃腫」的 JSON 檔案和考慮進行程式碼分割(code-splitting)的首要步驟。這些工具可以產生您應用程式編譯程式碼的樹狀可視檢視(treemap),讓您能夠清楚地看到究竟是哪些函式庫佔據了最多的空間。
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<Tab value="vite">
|
|
45
|
+
|
|
46
|
+
### Vite / Rollup
|
|
47
|
+
|
|
48
|
+
Vite 在底層使用了 Rollup。外掛程式 `rollup-plugin-visualizer` 能夠產生一個互動式 HTML 檔案,展示相依性圖(graph)中每個模組的體積。
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -D rollup-plugin-visualizer
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```typescript fileName="vite.config.ts"
|
|
55
|
+
import { defineConfig } from "vite";
|
|
56
|
+
import { visualizer } from "rollup-plugin-visualizer";
|
|
57
|
+
|
|
58
|
+
export default defineConfig({
|
|
59
|
+
plugins: [
|
|
60
|
+
visualizer({
|
|
61
|
+
open: true, // 自動在瀏覽器中打開報告
|
|
62
|
+
filename: "stats.html",
|
|
63
|
+
gzipSize: true,
|
|
64
|
+
brotliSize: true,
|
|
65
|
+
}),
|
|
66
|
+
],
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</Tab>
|
|
71
|
+
<Tab value="nextjs (turbopack)">
|
|
72
|
+
|
|
73
|
+
### Next.js (Turbopack)
|
|
74
|
+
|
|
75
|
+
對於使用了 App Router 和 Turbopack 的專案,Next.js 提供了一個內建的實驗性分析器,它不需要額外的相依套件。
|
|
76
|
+
|
|
77
|
+
```bash packageManager='npm'
|
|
78
|
+
npx next experimental-analyze
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```bash packageManager='yarn'
|
|
82
|
+
yarn next experimental-analyze
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```bash packageManager='pnpm'
|
|
86
|
+
pnpm next experimental-analyze
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```bash packageManager='bun'
|
|
90
|
+
bun next experimental-analyze
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</Tab>
|
|
94
|
+
<Tab value="nextjs (Webpack)">
|
|
95
|
+
|
|
96
|
+
### Next.js (Webpack)
|
|
97
|
+
|
|
98
|
+
如果您在 Next.js 中使用的是預設的 Webpack 打包器,請使用官方的 bundle analyzer。您可以透過在建置期間設定一個環境變數來觸發它。
|
|
99
|
+
|
|
100
|
+
```bash packageManager='npm'
|
|
101
|
+
npm install -D @next/bundle-analyzer
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```bash packageManager='yarn'
|
|
105
|
+
yarn add -D @next/bundle-analyzer
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash packageManager='pnpm'
|
|
109
|
+
pnpm add -D @next/bundle-analyzer
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```bash packageManager='bun'
|
|
113
|
+
bun add -d @next/bundle-analyzer
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```javascript fileName="next.config.js"
|
|
117
|
+
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
|
118
|
+
enabled: process.env.ANALYZE === "true",
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
module.exports = withBundleAnalyzer({
|
|
122
|
+
// 您的 Next.js 設定
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**用法:**
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
ANALYZE=true npm run build
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
</Tab>
|
|
133
|
+
<Tab value="Webpack (CRA / Angular / etc)">
|
|
134
|
+
|
|
135
|
+
### 純 Webpack
|
|
136
|
+
|
|
137
|
+
針對 Create React App (ejected)、Angular 或是自訂 Webpack 的設定,使用業界標準的 `webpack-bundle-analyzer`。
|
|
138
|
+
|
|
139
|
+
```bash packageManager='npm'
|
|
140
|
+
npm install -D webpack-bundle-analyzer
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
```bash packageManager='yarn'
|
|
144
|
+
yarn add -D webpack-bundle-analyzer
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```bash packageManager='pnpm'
|
|
148
|
+
pnpm add -D webpack-bundle-analyzer
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```bash packageManager='bun'
|
|
152
|
+
bun add -d webpack-bundle-analyzer
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```typescript fileName="webpack.config.ts
|
|
156
|
+
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
157
|
+
|
|
158
|
+
export default {
|
|
159
|
+
plugins: [
|
|
160
|
+
new BundleAnalyzerPlugin({
|
|
161
|
+
analyzerMode: "static",
|
|
162
|
+
reportFilename: "bundle-analyzer.html",
|
|
163
|
+
openAnalyzer: false,
|
|
164
|
+
}),
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
</Tab>
|
|
170
|
+
</Tabs>
|
|
171
|
+
|
|
172
|
+
## 它是如何運作的
|
|
173
|
+
|
|
174
|
+
Intlayer 使用一種**基於元件的方法(per-component approach)**。與全域 JSON 檔案不同,您的內容會在元件旁邊或是元件內部進行定義。在建置流程中,Intlayer 將會:
|
|
175
|
+
|
|
176
|
+
1. **分析**您的程式碼以尋找 `useIntlayer` 的呼叫。
|
|
177
|
+
2. **建置**對應的字典內容。
|
|
178
|
+
3. **替換** `useIntlayer` 呼叫為依據您的設定進行最佳化後的程式碼。
|
|
179
|
+
|
|
180
|
+
這樣能夠確保:
|
|
181
|
+
|
|
182
|
+
- 如果一個元件未被匯入,它的內容將不會包含在打包產物中(Dead Code Elimination / 死程式碼消除)。
|
|
183
|
+
- 如果一個元件被延遲載入,其內容同樣會被延遲載入。
|
|
184
|
+
|
|
185
|
+
## 外掛程式參考
|
|
186
|
+
|
|
187
|
+
Intlayer 的建置最佳化被劃分為若干個職責單一的外掛程式。了解它們各自的用途可以防止在設定它們時產生困惑。
|
|
188
|
+
|
|
189
|
+
### Babel 外掛程式 (`@intlayer/babel`)
|
|
190
|
+
|
|
191
|
+
這些被直接運用在基於 Webpack 設定的 `babel.config.js` 當中(比如使用了 Babel 的 Next.js、CRA,或是自訂的 Webpack 等)。
|
|
192
|
+
|
|
193
|
+
| 外掛程式 | 功能說明 |
|
|
194
|
+
| :---------------------------- | :----------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `intlayerExtractBabelPlugin` | 掃描 `.content.ts` 檔案並把編譯好的字典寫入 `.intlayer/` |
|
|
196
|
+
| `intlayerOptimizeBabelPlugin` | 將 `useIntlayer('key')` 重寫為 `useDictionary(hash)` 並注入匹配對應字典的 `import` 語句 |
|
|
197
|
+
| `intlayerPurgeBabelPlugin` | 掃描所有原始碼檔案,從已編譯的 `.intlayer/**/*.json` 字典檔案中刪除**未被使用的內容欄位** |
|
|
198
|
+
| `intlayerMinifyBabelPlugin` | **重新命名內容欄位的鍵(keys)** 為簡短的字母別名(例如 `title` 變成 `a`),作用範圍包括 JSON 與原始碼 |
|
|
199
|
+
|
|
200
|
+
> **外掛程式的執行順序很重要。** 在您的 `babel.config.js` 裡,purge 和 minify 的外掛程式必須放置在 optimize 外掛程式**之前**。最佳化步驟(optimize)會把 `useIntlayer('key')` 替換為模糊的 `useDictionary(hash)`,此舉抹除了能夠讓 purge 和 minify 識別哪些欄位被使用過的字典 key 資訊。
|
|
201
|
+
|
|
202
|
+
每一個 Babel 外掛程式都有對應的選項助手(options helper),該助手會在設定載入時讀取一遍 `intlayer.config.ts`,並返回預解析的值:
|
|
203
|
+
|
|
204
|
+
| 選項助手 | 配套外掛程式 |
|
|
205
|
+
| :--------------------------- | :---------------------------- |
|
|
206
|
+
| `getExtractPluginOptions()` | `intlayerExtractBabelPlugin` |
|
|
207
|
+
| `getOptimizePluginOptions()` | `intlayerOptimizeBabelPlugin` |
|
|
208
|
+
| `getPurgePluginOptions()` | `intlayerPurgeBabelPlugin` |
|
|
209
|
+
| `getMinifyPluginOptions()` | `intlayerMinifyBabelPlugin` |
|
|
210
|
+
|
|
211
|
+
### Vite 外掛程式 (`vite-intlayer`)
|
|
212
|
+
|
|
213
|
+
Vite 使用者**不需要直接對它們進行設定**。當您在 `vite.config.ts` 裡呼叫 `withIntlayer()` 時,它們會自動生效。只需要在 `intlayer.config.ts` 中設定 `build.purge` 和 `build.minify`,即可開啟相應的功能,且不需要額外的外掛程式註冊過程。
|
|
214
|
+
|
|
215
|
+
| 內部 Vite 外掛程式 | 等效行為 |
|
|
216
|
+
| :----------------- | :-------------------------------------------------------------------------------------- |
|
|
217
|
+
| Usage analyzer | 等同於 `intlayerPurgeBabelPlugin` 的分析步驟 |
|
|
218
|
+
| Dictionary prune | 等同於 `intlayerPurgeBabelPlugin` 的 JSON 寫入步驟 |
|
|
219
|
+
| Dictionary minify | 等同於 `intlayerMinifyBabelPlugin` 的 JSON 寫入步驟 |
|
|
220
|
+
| Babel transform | 等同於 `intlayerMinifyBabelPlugin` 的程式碼重新命名步驟 + `intlayerOptimizeBabelPlugin` |
|
|
221
|
+
|
|
222
|
+
## 各平台設定指南
|
|
223
|
+
|
|
224
|
+
<Tabs>
|
|
225
|
+
<Tab value="nextjs">
|
|
226
|
+
|
|
227
|
+
### Next.js
|
|
228
|
+
|
|
229
|
+
Next.js 需要依靠 `@intlayer/swc` 外掛程式來進行最佳化步驟(匯入重寫),因為 Next.js 採用 SWC 作為編譯器。
|
|
230
|
+
|
|
231
|
+
> 該外掛程式並未預設安裝,因為 SWC 外掛程式在 Next.js 當中目前仍處於實驗階段。未來這部分有可能會發生改變。
|
|
232
|
+
|
|
233
|
+
```bash packageManager="npm"
|
|
234
|
+
npm install -D @intlayer/swc
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
```bash packageManager="yarn"
|
|
238
|
+
yarn add -D @intlayer/swc
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
```bash packageManager="pnpm"
|
|
242
|
+
pnpm add -D @intlayer/swc
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
```bash packageManager="bun"
|
|
246
|
+
bun add -d @intlayer/swc
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
安裝完畢後,Intlayer 將會自動偵測並使用該外掛程式。
|
|
250
|
+
|
|
251
|
+
至於**清除(purge)和最小化(minify)**步驟(即欄位移除和欄位重新命名),請連同 `@intlayer/babel` 一併安裝並加入 Babel 外掛程式。由於 Next.js 依靠 SWC 處理程式碼轉化,但仍會評估 `babel.config.js` 以決定外掛程式設定,因此上述 Babel 外掛程式能夠在進入 SWC 前作為預處理步驟得以執行。
|
|
252
|
+
|
|
253
|
+
```bash packageManager="npm"
|
|
254
|
+
npm install -D @intlayer/babel
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
```javascript fileName="babel.config.js"
|
|
258
|
+
const {
|
|
259
|
+
intlayerPurgeBabelPlugin,
|
|
260
|
+
intlayerMinifyBabelPlugin,
|
|
261
|
+
getPurgePluginOptions,
|
|
262
|
+
getMinifyPluginOptions,
|
|
263
|
+
} = require("@intlayer/babel");
|
|
264
|
+
|
|
265
|
+
module.exports = {
|
|
266
|
+
presets: ["next/babel"],
|
|
267
|
+
plugins: [
|
|
268
|
+
// Purge: 移除 .intlayer/**/*.json 裡未被使用的內容欄位
|
|
269
|
+
[intlayerPurgeBabelPlugin, getPurgePluginOptions()],
|
|
270
|
+
// Minify: 對 JSON 以及原始碼裡的內容欄位的鍵(keys)進行重新命名
|
|
271
|
+
[intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
|
|
272
|
+
// 注意: 在這裡不需要使用 intlayerOptimizeBabelPlugin,因為
|
|
273
|
+
// @intlayer/swc 已經處理了 useIntlayer → useDictionary 的重寫過程。
|
|
274
|
+
],
|
|
275
|
+
};
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
</Tab>
|
|
279
|
+
<Tab value="vite">
|
|
280
|
+
|
|
281
|
+
### Vite
|
|
282
|
+
|
|
283
|
+
Vite 使用了包含在 `vite-intlayer` 依賴當中的 `@intlayer/babel` 外掛程式。整個最佳化管線 —— 包括匯入重寫、清除和壓縮 —— 是預設開啟的,且無需任何額外的外掛程式註冊。
|
|
284
|
+
|
|
285
|
+
在 `intlayer.config.ts` 裡設定相對應的標誌來開啟 purge 以及 minify:
|
|
286
|
+
|
|
287
|
+
```typescript fileName="intlayer.config.ts"
|
|
288
|
+
import type { IntlayerConfig } from "intlayer";
|
|
289
|
+
|
|
290
|
+
const config: IntlayerConfig = {
|
|
291
|
+
build: {
|
|
292
|
+
purge: true, // 將未被使用的欄位從打包好的 JSON 中移除
|
|
293
|
+
minify: true, // 將欄位名稱重新命名為簡短的別名
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export default config;
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
</Tab>
|
|
301
|
+
<Tab value="webpack">
|
|
302
|
+
|
|
303
|
+
### Webpack (以及設定了 Babel 的 Next.js)
|
|
304
|
+
|
|
305
|
+
安裝 `@intlayer/babel`:
|
|
306
|
+
|
|
307
|
+
```bash packageManager="npm"
|
|
308
|
+
npm install -D @intlayer/babel
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
```bash packageManager="yarn"
|
|
312
|
+
yarn add -D @intlayer/babel
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```bash packageManager="pnpm"
|
|
316
|
+
pnpm add -D @intlayer/babel
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
```bash packageManager="bun"
|
|
320
|
+
bun add -d @intlayer/babel
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
在 `babel.config.js` 裡按照正確的順序添加所有四個外掛程式:
|
|
324
|
+
|
|
325
|
+
```javascript fileName="babel.config.js"
|
|
326
|
+
const {
|
|
327
|
+
intlayerExtractBabelPlugin,
|
|
328
|
+
intlayerPurgeBabelPlugin,
|
|
329
|
+
intlayerMinifyBabelPlugin,
|
|
330
|
+
intlayerOptimizeBabelPlugin,
|
|
331
|
+
getExtractPluginOptions,
|
|
332
|
+
getPurgePluginOptions,
|
|
333
|
+
getMinifyPluginOptions,
|
|
334
|
+
getOptimizePluginOptions,
|
|
335
|
+
} = require("@intlayer/babel");
|
|
336
|
+
|
|
337
|
+
module.exports = {
|
|
338
|
+
plugins: [
|
|
339
|
+
// Extract: 編譯 .content.ts 檔案 → .intlayer/**/*.json
|
|
340
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
341
|
+
|
|
342
|
+
// Purge: 從 .intlayer/**/*.json 移除不必要的欄位
|
|
343
|
+
// (讀取 intlayer.config.ts 內的 build.purge 設定)
|
|
344
|
+
[intlayerPurgeBabelPlugin, getPurgePluginOptions()],
|
|
345
|
+
|
|
346
|
+
// Minify: 壓縮並重新命名 JSON + 原始碼裡的欄位名稱
|
|
347
|
+
// (讀取 intlayer.config.ts 內的 build.minify 設定)
|
|
348
|
+
[intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
|
|
349
|
+
|
|
350
|
+
// Optimize: 重寫 useIntlayer('key') → useDictionary(hash)
|
|
351
|
+
// 它必須位於末尾,因為該操作會抹去原本的 dictionary 鍵名。
|
|
352
|
+
[intlayerOptimizeBabelPlugin, getOptimizePluginOptions()],
|
|
353
|
+
],
|
|
354
|
+
};
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
</Tab>
|
|
358
|
+
</Tabs>
|
|
359
|
+
|
|
360
|
+
## 設定選項
|
|
361
|
+
|
|
362
|
+
您可以透過在您的 `intlayer.config.ts` 裡的 `build` 屬性來控制 Intlayer 怎樣去最佳化您的程式碼包。
|
|
363
|
+
|
|
364
|
+
```typescript fileName="intlayer.config.ts"
|
|
365
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
366
|
+
|
|
367
|
+
const config: IntlayerConfig = {
|
|
368
|
+
internationalization: {
|
|
369
|
+
locales: [Locales.ENGLISH, Locales.CHINESE_TRADITIONAL],
|
|
370
|
+
defaultLocale: Locales.ENGLISH,
|
|
371
|
+
},
|
|
372
|
+
dictionary: {
|
|
373
|
+
importMode: "dynamic",
|
|
374
|
+
},
|
|
375
|
+
build: {
|
|
376
|
+
// 決定在建置時是否直接用直引字典覆蓋 useIntlayer() 的呼叫。
|
|
377
|
+
// undefined = 自動(在生產環境中開啟),true = 始終開啟,false = 始終關閉。
|
|
378
|
+
optimize: undefined,
|
|
379
|
+
|
|
380
|
+
// 將已編譯字典裡的欄位鍵名改寫為簡短的字母名稱(例如:title → a)。
|
|
381
|
+
// 這將縮小 JSON 的體積;前提條件是啟用了 optimize。
|
|
382
|
+
minify: true,
|
|
383
|
+
|
|
384
|
+
// 將未曾在程式碼裡真正存取過的內容欄位移除。
|
|
385
|
+
// 前提條件是啟用了 optimize。
|
|
386
|
+
purge: true,
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export default config;
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
> 在大多數情況之下,推薦為 `optimize` 保留它的預設值(`undefined`)。
|
|
394
|
+
|
|
395
|
+
> 請參閱設定參考資料以了解所有的選項:[設定說明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh-TW/configuration.md)
|
|
396
|
+
|
|
397
|
+
### 建置選項
|
|
398
|
+
|
|
399
|
+
| 屬性 | 類型 | 預設值 | 詳細說明 |
|
|
400
|
+
| :------------- | :--------------------- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
401
|
+
| **`optimize`** | `boolean \| undefined` | `undefined` | 用於開啟 import 語句的重寫。`undefined` = 僅在打包成生產環境模式時生效。當設定為 `false` 的時候,同樣會導致 purge 以及 minify 均一併被關閉。 |
|
|
402
|
+
| **`minify`** | `boolean` | `false` | 用於對已編譯好的 JSON 檔案裡的內容鍵名改寫成短的單字母名稱。同理也會一併將原始碼裡相關存取屬性同樣改名。僅當 `optimize` 為 `false` 時無效。 |
|
|
403
|
+
| **`purge`** | `boolean` | `false` | 用於移除無論如何也不會被呼叫的且靜態的原始檔的內容欄位,從 JSON 輸出中去除掉。僅當 `optimize` 為 `false` 時無效。 |
|
|
404
|
+
|
|
405
|
+
### 壓縮 / Minification (重新命名欄位鍵值)
|
|
406
|
+
|
|
407
|
+
`build.minify` **並非**壓縮您的 JavaScript —— 那是您的打包器應該處理的工作。它的工作,是把編譯後的字典對應的 JSON 檔案的每一個自訂內容的欄位,全用短位的字母標識來替代,藉此將其體積進行壓縮:
|
|
408
|
+
|
|
409
|
+
```
|
|
410
|
+
// Minify 之前
|
|
411
|
+
{ "title": "Hello", "subtitle": "World" }
|
|
412
|
+
|
|
413
|
+
// Minify 之後
|
|
414
|
+
{ "a": "Hello", "b": "World" }
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
該重新命名的方法同樣也會應用到那些處於程式碼裡的屬性名稱存取階段,所以在最終編譯好的結果裡,`content.title` 便會演變為 `content.a`。它們在執行時的實際表現完全一致。
|
|
418
|
+
|
|
419
|
+
```typescript fileName="intlayer.config.ts"
|
|
420
|
+
import type { IntlayerConfig } from "intlayer";
|
|
421
|
+
|
|
422
|
+
const config: IntlayerConfig = {
|
|
423
|
+
build: {
|
|
424
|
+
minify: true,
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
export default config;
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
> 如果在 `optimize` 被設為 `false`、又或是啟用了視覺化編輯器也就是當 `editor.enabled` 設定為了 `true` 時(由於編輯器需要保留欄位名稱以便做後續處理),重新命名這個操作都將會被跳過。
|
|
432
|
+
|
|
433
|
+
> 同理,如果是利用了 `importMode: 'fetch'` 來載入欄位時此過程同樣不適用。因為它們的內容會以原始命名由後端 API 所提供,對客戶端內容隨意重新命名會破壞客戶端與伺服器端的匹配契約。
|
|
434
|
+
|
|
435
|
+
### 欄位清除 / Purging (去掉未被引用的欄位內容)
|
|
436
|
+
|
|
437
|
+
`build.purge` 能自動分析究竟哪些欄位真真切切地被您的原始碼所引用,進而只把實際引用過的資料予以保留,把其他的垃圾資料從編譯產生的 JSON 裡排除掉。
|
|
438
|
+
|
|
439
|
+
```typescript fileName="intlayer.config.ts"
|
|
440
|
+
import type { IntlayerConfig } from "intlayer";
|
|
441
|
+
|
|
442
|
+
const config: IntlayerConfig = {
|
|
443
|
+
build: {
|
|
444
|
+
purge: true,
|
|
445
|
+
},
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
export default config;
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**範例說明:** 我們有一個包含五個不同欄位資料的字典,但是程式碼實際就用到了裡邊的兩個:
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
// Purge 執行前
|
|
455
|
+
{ "title": "…", "subtitle": "…", "cta": "…", "footer": "…", "badge": "…" }
|
|
456
|
+
|
|
457
|
+
// Purge 之後(這裡僅僅只用到了 title 與 subtitle)
|
|
458
|
+
{ "title": "…", "subtitle": "…" }
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
> 與前邊提到的類似,當 `optimize` 是 `false` 或是開啟了視覺化編輯器(`editor.enabled` 取值 `true`) 時,它會選擇跳過對資料的清除操作。
|
|
462
|
+
|
|
463
|
+
> 當檢測到某份程式碼因為異常無法順利解析、又或者當把由 `useIntlayer` 輸出的值以靜態解析器難以預測分析的模式在不同元件中來回丟(比如被打包成物件傳入等而未被進行解構)的時候,它同樣會跳過,以此保守地保留整部字典的全部資訊,避免意外發生。
|
|
464
|
+
|
|
465
|
+
### 匯入模式(Import Mode)
|
|
466
|
+
|
|
467
|
+
對於包含多個頁面和地區規模比較大的應用程式來說,您的 JSON 可能會佔去絕大一部分包(Bundle)的內容。所以,您可以憑藉著 `importMode` 這個參數讓 Intlayer 來調整對字典內容本身的實際拉取行為。
|
|
468
|
+
|
|
469
|
+
### 全域定義
|
|
470
|
+
|
|
471
|
+
該參數可以經由您本身的 `intlayer.config.ts` 這個檔案在全域進行指定。
|
|
472
|
+
|
|
473
|
+
```typescript fileName="intlayer.config.ts"
|
|
474
|
+
import type { IntlayerConfig } from "intlayer";
|
|
475
|
+
|
|
476
|
+
const config: IntlayerConfig = {
|
|
477
|
+
dictionary: {
|
|
478
|
+
importMode: "dynamic", // 預設為 'static'
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
export default config;
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### 為字典獨立配置
|
|
486
|
+
|
|
487
|
+
我們也可以在這其中部分獨立詞典原本配置內的 `.content.{{ts|tsx|js|jsx|mjs|cjs|json|jsonc|json5|md|mdx|yaml|yml}}` 把該參數改寫成另外想要的規則。
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
import { type Dictionary, t } from "intlayer";
|
|
491
|
+
|
|
492
|
+
const appContent: Dictionary = {
|
|
493
|
+
key: "app",
|
|
494
|
+
importMode: "dynamic", // 將原本的模式改寫
|
|
495
|
+
content: {
|
|
496
|
+
// ...
|
|
497
|
+
},
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
export default appContent;
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
| 屬性 | 取值類型 | 預設設置 | 描述說明 |
|
|
504
|
+
| :--------------- | :--------------------------------- | :--------- | :------------------------------------------------------------------------------------------------- |
|
|
505
|
+
| **`importMode`** | `'static'`, `'dynamic'`, `'fetch'` | `'static'` | **已被棄用**: 建議調整為 `dictionary.importMode`。這決定了應當怎樣載入各項字典。(細節參考下文)。 |
|
|
506
|
+
|
|
507
|
+
這處 `importMode` 設定用於指揮元件拉取各項內容的真實手段。要麼被指定在了全域 `intlayer.config.ts` 中的 `dictionary` 裡,要不便以 `content.ts` 形式來分別定製。
|
|
508
|
+
|
|
509
|
+
### 1. 靜態模式(Static Mode - `default`)
|
|
510
|
+
|
|
511
|
+
在這個預設設定下,Intlayer 自動把全部 `useIntlayer` 變成了 `useDictionary` 以做到將所需的翻譯資料無縫拼接入 JavaScript 包內。
|
|
512
|
+
|
|
513
|
+
- **優勢(Pros):** 即時就能被載入(屬於同步型),由於沒有水合(hydration)從而意味著額外的零請求。
|
|
514
|
+
- **缺點(Cons):** 但這個包同樣也就塞滿了給該元件用的**各種不同可用語言的對應版本**,這非常佔空間。
|
|
515
|
+
- **最佳應用場合:** 單頁應用程式(SPA)。
|
|
516
|
+
|
|
517
|
+
**程式碼在轉換之後的圖示(舉例):**
|
|
518
|
+
|
|
519
|
+
```tsx
|
|
520
|
+
// 這是您的原本程式碼
|
|
521
|
+
const content = useIntlayer("my-key");
|
|
522
|
+
|
|
523
|
+
// (靜態) 最佳化圖解。
|
|
524
|
+
// 僅為了解釋說明而列,出於最佳化實際上的最終輸出略有差別
|
|
525
|
+
const content = useDictionary({
|
|
526
|
+
key: "my-key",
|
|
527
|
+
content: {
|
|
528
|
+
nodeType: "translation",
|
|
529
|
+
translation: {
|
|
530
|
+
en: "My title",
|
|
531
|
+
zh: "我的標題",
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### 2. 動態模式(Dynamic Mode)
|
|
538
|
+
|
|
539
|
+
在這一設定之下,Intlayer 自動把全部 `useIntlayer` 全給變成了 `useDictionaryAsync`。這個操作能將拉取行文變成動態 `import()`(這和 Suspense 的表現接近),並有針對性地對當地所在的特殊語言去單獨非同步請求其實際資料。
|
|
540
|
+
|
|
541
|
+
- **優勢(Pros):** **支援基於地區語言所實施的程式碼樹抖動分離(Tree shaking)。** 說白了就是,正在瀏覽英語界面的使用者**僅僅**會只被發送那部分英文對應的詞典內容,法文或是其他國家的資料都不會載入。
|
|
542
|
+
- **缺點(Cons):** 這個階段下,將會讓元件因資料要求而針對各項水合需求(hydration)各自產生不同種的呼叫申請(拉取各部件內容)。
|
|
543
|
+
- **最佳應用場合:** 內容巨大且充斥了長文部落格的複雜平台、亦或是本身涵蓋了大量的翻譯種類因而在包(bundle)體積極為嚴格的情況下使用。
|
|
544
|
+
|
|
545
|
+
**程式碼在轉換之後的圖示(舉例):**
|
|
546
|
+
|
|
547
|
+
```tsx
|
|
548
|
+
// 這是您的原本程式碼
|
|
549
|
+
const content = useIntlayer("my-key");
|
|
550
|
+
|
|
551
|
+
// (動態) 最佳化圖解。
|
|
552
|
+
// 僅為了解釋說明而列,出於最佳化實際上的最終輸出略有差別
|
|
553
|
+
const content = useDictionaryAsync({
|
|
554
|
+
en: () =>
|
|
555
|
+
import(".intlayer/dynamic_dictionary/my-key/en.json").then(
|
|
556
|
+
(mod) => mod.default
|
|
557
|
+
),
|
|
558
|
+
zh: () =>
|
|
559
|
+
import(".intlayer/dynamic_dictionary/my-key/zh.json").then(
|
|
560
|
+
(mod) => mod.default
|
|
561
|
+
),
|
|
562
|
+
});
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
> 使用了 `importMode: 'dynamic'` 這個方案之時,如果某一頁剛好湊齊了 100 個包含了 `useIntlayer` 內容的部件時,瀏覽器就有極大的機率朝著伺服器丟過去多達 100 種不重樣的 fetch 請求。如果意在免於這樣的連環「瀑布效應」,嘗試盡可能去少寫單個的獨立 `.content` (嘗試著每幾塊湊一起合併起來比如每一個大的分塊區共享其內容字典,而非是切得那麼碎,比如連每一個單小按鈕都設單獨請求。)如果把多個帶有單獨名字 `.content` 內容給附加上相同的 Key 名稱,程式依然能夠很輕易將這些零散碎落的資料融合成單獨龐大且統一的一本完整的字典物件裡去。
|
|
566
|
+
|
|
567
|
+
### 3. Fetch 模式(Fetch Mode)
|
|
568
|
+
|
|
569
|
+
行為跟 Dynamic 有所重疊,不過最優先則是朝 Intlayer Live Sync API 請求其詞典內容。假如獲取資料時遭到攔截或者內容不屬於即時的資料內容體系的話,接下來便將其作為兜底順延遞回之前的動切請求。
|
|
570
|
+
|
|
571
|
+
**程式碼在轉換之後的圖示(舉例):**
|
|
572
|
+
|
|
573
|
+
```tsx
|
|
574
|
+
// 這是您的原本程式碼
|
|
575
|
+
const content = useIntlayer("my-key");
|
|
576
|
+
|
|
577
|
+
// 能夠將它(Fetch)看成這類實現
|
|
578
|
+
const content = useDictionaryAsync({
|
|
579
|
+
en: () =>
|
|
580
|
+
fetch("https://intlayer.my-domain.com/dictionary/my-key/en").then((res) =>
|
|
581
|
+
res.json()
|
|
582
|
+
),
|
|
583
|
+
zh: () =>
|
|
584
|
+
fetch("https://intlayer.my-domain.com/dictionary/my-key/zh").then((res) =>
|
|
585
|
+
res.json()
|
|
586
|
+
),
|
|
587
|
+
});
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
> 如果還需要獲得對於 CMS 獲取方面的認知的話:可以去查看 [CMS 說明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh-TW/intlayer_CMS.md)
|
|
591
|
+
|
|
592
|
+
> 此模式同樣會一如既往地因為 JSON 內容會直接藉由後端直接輸送而不遭受 purge 跟 minify 等等這幾類資料剔除方案的干擾。
|
|
593
|
+
|
|
594
|
+
## 概要: 靜態 和 動態
|
|
595
|
+
|
|
596
|
+
| 模式特徵 | 靜態模式(Static Mode) | 動態模式(Dynamic Mode) |
|
|
597
|
+
| :------------------------- | :----------------------------------------------------------- | :---------------------------------------- |
|
|
598
|
+
| **JS 產生的 Bundle 體積** | 龐大(包含了供各個不同元件使用時呼叫的其他全部外語語系資訊) | 小巧(內容直接為空、只有程式碼框架) |
|
|
599
|
+
| **最初載入所需時間** | 極速(畢竟那些所需資訊一開始都已經存在於包(Bundle)裡面了) | 略需等待(拉取 JSON 所需消耗時間) |
|
|
600
|
+
| **附帶發生的網路請求** | 無,無需任何等待直接 0 次 | 取決字典請求次數(一次 Key 取出就是一回) |
|
|
601
|
+
| **樹抖動(Tree Shaking)** | 按單一元件的級別而做分割 | 依元件級別外加依據地區與語種去實施拆分 |
|
|
602
|
+
| **最佳應用與方案環境** | 普通互動式元件內容或單一介面的輕型程式等 | 極其充滿內容的純文區塊或極其繁多的語系 |
|
|
@@ -256,7 +256,7 @@ const appContent = {
|
|
|
256
256
|
export default appContent;
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
> 您的內容宣告可以定義在應用程式的任何位置,只需將其包含在 `contentDir` 目錄(預設為 `./src`)中,並且符合內容宣告的文件副檔名(預設為 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
259
|
+
> 您的內容宣告可以定義在應用程式的任何位置,只需將其包含在 `contentDir` 目錄(預設為 `./src`)中,並且符合內容宣告的文件副檔名(預設為 `.content.{json,ts,tsx,js,jsx,mjs,cjs,md,mdx,yaml,yml}`)。
|
|
260
260
|
|
|
261
261
|
> 詳細資訊請參考 [內容宣告文件](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh-TW/dictionary/content_file.md)。
|
|
262
262
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/docs",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer documentation",
|
|
6
6
|
"keywords": [
|
|
@@ -72,20 +72,20 @@
|
|
|
72
72
|
"watch": "webpack --config ./webpack.config.ts --watch"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@intlayer/config": "8.12.
|
|
76
|
-
"@intlayer/core": "8.12.
|
|
77
|
-
"@intlayer/types": "8.12.
|
|
75
|
+
"@intlayer/config": "8.12.3",
|
|
76
|
+
"@intlayer/core": "8.12.3",
|
|
77
|
+
"@intlayer/types": "8.12.3"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@intlayer/api": "8.12.
|
|
81
|
-
"@intlayer/cli": "8.12.
|
|
82
|
-
"@types/node": "25.9.
|
|
80
|
+
"@intlayer/api": "8.12.3",
|
|
81
|
+
"@intlayer/cli": "8.12.3",
|
|
82
|
+
"@types/node": "25.9.2",
|
|
83
83
|
"@utils/ts-config": "1.0.4",
|
|
84
84
|
"@utils/ts-config-types": "1.0.4",
|
|
85
85
|
"@utils/tsdown-config": "1.0.4",
|
|
86
86
|
"fast-glob": "3.3.3",
|
|
87
87
|
"rimraf": "6.1.3",
|
|
88
|
-
"tsdown": "0.
|
|
88
|
+
"tsdown": "0.21.10",
|
|
89
89
|
"typescript": "6.0.3",
|
|
90
90
|
"vitest": "4.1.8"
|
|
91
91
|
},
|