@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-11-25
|
|
3
|
-
updatedAt: 2026-
|
|
4
|
-
title: Tối ưu hóa
|
|
5
|
-
description: Giảm
|
|
3
|
+
updatedAt: 2026-06-07
|
|
4
|
+
title: Tối ưu hóa dung lượng Bundle & Hiệu suất i18n
|
|
5
|
+
description: Giảm dung lượng bundle của ứng dụng bằng cách tối ưu hóa nội dung quốc tế hóa (i18n). Tìm hiểu cách tận dụng tree shaking và tải 지연 (lazy loading) cho các từ điển với Intlayer.
|
|
6
6
|
keywords:
|
|
7
7
|
- Tối ưu hóa Bundle
|
|
8
8
|
- Tự động hóa nội dung
|
|
@@ -16,33 +16,36 @@ slugs:
|
|
|
16
16
|
- concept
|
|
17
17
|
- bundle-optimization
|
|
18
18
|
history:
|
|
19
|
+
- version: 8.12.0
|
|
20
|
+
date: 2026-06-07
|
|
21
|
+
changes: "Thêm `intlayerPurgeBabelPlugin` và `intlayerMinifyBabelPlugin` cho Babel/Webpack; làm rõ quá trình thực thi của các plugin"
|
|
19
22
|
- version: 8.7.0
|
|
20
23
|
date: 2026-04-08
|
|
21
|
-
changes: "Thêm
|
|
24
|
+
changes: "Thêm tùy chọn `minify` và `purge` vào cấu hình build"
|
|
22
25
|
---
|
|
23
26
|
|
|
24
|
-
# Tối ưu hóa
|
|
27
|
+
# Tối ưu hóa dung lượng Bundle & Hiệu suất i18n
|
|
25
28
|
|
|
26
|
-
Một trong những thách thức phổ biến nhất với các giải pháp i18n truyền thống dựa trên
|
|
29
|
+
Một trong những thách thức phổ biến nhất với các giải pháp i18n truyền thống dựa trên file JSON là quản lý dung lượng nội dung. Nếu lập trình viên không tự tay phân tách nội dung vào các namespace một cách hợp lý, người dùng cuối thường phải tải về toàn bộ bản dịch cho tất cả các trang và có thể là cả tất cả các ngôn ngữ chỉ để xem một trang duy nhất.
|
|
27
30
|
|
|
28
|
-
Ví dụ, một ứng dụng có 10 trang được dịch
|
|
31
|
+
Ví dụ, một ứng dụng có 10 trang được dịch ra 10 ngôn ngữ có thể khiến người dùng tải về nội dung tương đương 100 trang, mặc dù họ chỉ cần **một trang** (trang hiện tại với ngôn ngữ hiện tại). Điều này dẫn đến sự lãng phí băng thông và thời gian tải trang bị chậm đi đáng kể.
|
|
29
32
|
|
|
30
|
-
**Intlayer giải quyết vấn đề này thông qua tối ưu hóa
|
|
33
|
+
**Intlayer giải quyết vấn đề này thông qua tối ưu hóa ở thời điểm build.** Nó phân tích code của bạn để phát hiện chính xác các từ điển nào đang thực sự được sử dụng cho mỗi component, và chỉ tích hợp nội dung cần thiết đó vào bundle.
|
|
31
34
|
|
|
32
35
|
## Mục lục
|
|
33
36
|
|
|
34
37
|
<TOC />
|
|
35
38
|
|
|
36
|
-
##
|
|
39
|
+
## Phân tích bundle của bạn
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
Việc phân tích bundle là bước đầu tiên để xác định các file JSON "nặng" và phát hiện các cơ hội để code-splitting (chia nhỏ code). Những công cụ phân tích sẽ tạo ra một sơ đồ treemap trực quan từ mã đã compile của ứng dụng, cho phép bạn thấy được chính xác thư viện nào đang chiếm nhiều không gian nhất.
|
|
39
42
|
|
|
40
43
|
<Tabs>
|
|
41
44
|
<Tab value="vite">
|
|
42
45
|
|
|
43
46
|
### Vite / Rollup
|
|
44
47
|
|
|
45
|
-
Vite sử dụng Rollup
|
|
48
|
+
Vite sử dụng Rollup phía bên dưới. Plugin `rollup-plugin-visualizer` sẽ tạo ra một file HTML tương tác, hiển thị trực quan dung lượng của mỗi module trong biểu đồ phụ thuộc của bạn.
|
|
46
49
|
|
|
47
50
|
```bash
|
|
48
51
|
npm install -D rollup-plugin-visualizer
|
|
@@ -55,7 +58,7 @@ import { visualizer } from "rollup-plugin-visualizer";
|
|
|
55
58
|
export default defineConfig({
|
|
56
59
|
plugins: [
|
|
57
60
|
visualizer({
|
|
58
|
-
open: true, // Tự động mở báo cáo trong trình duyệt
|
|
61
|
+
open: true, // Tự động mở báo cáo trong trình duyệt
|
|
59
62
|
filename: "stats.html",
|
|
60
63
|
gzipSize: true,
|
|
61
64
|
brotliSize: true,
|
|
@@ -69,7 +72,7 @@ export default defineConfig({
|
|
|
69
72
|
|
|
70
73
|
### Next.js (Turbopack)
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
Với các dự án dùng App Router và Turbopack, Next.js cung cấp một bộ phân tích thực nghiệm được tích hợp sẵn mà không cần bạn phải thêm package mở rộng.
|
|
73
76
|
|
|
74
77
|
```bash packageManager='npm'
|
|
75
78
|
npx next experimental-analyze
|
|
@@ -92,7 +95,7 @@ bun next experimental-analyze
|
|
|
92
95
|
|
|
93
96
|
### Next.js (Webpack)
|
|
94
97
|
|
|
95
|
-
Nếu bạn đang sử dụng trình
|
|
98
|
+
Nếu bạn đang sử dụng trình bundle Webpack mặc định trong Next.js, hãy dùng bundle analyzer chính thức. Bạn có thể kích hoạt bằng cách đặt một biến môi trường trong quá trình build.
|
|
96
99
|
|
|
97
100
|
```bash packageManager='npm'
|
|
98
101
|
npm install -D @next/bundle-analyzer
|
|
@@ -120,7 +123,7 @@ module.exports = withBundleAnalyzer({
|
|
|
120
123
|
});
|
|
121
124
|
```
|
|
122
125
|
|
|
123
|
-
**
|
|
126
|
+
**Cách dùng:**
|
|
124
127
|
|
|
125
128
|
```bash
|
|
126
129
|
ANALYZE=true npm run build
|
|
@@ -129,9 +132,9 @@ ANALYZE=true npm run build
|
|
|
129
132
|
</Tab>
|
|
130
133
|
<Tab value="Webpack (CRA / Angular / etc)">
|
|
131
134
|
|
|
132
|
-
### Webpack Tiêu
|
|
135
|
+
### Webpack Tiêu Chuẩn
|
|
133
136
|
|
|
134
|
-
Đối với Create React App (ejected), Angular hoặc
|
|
137
|
+
Đối với Create React App (ejected), Angular, hoặc thiết lập Webpack tùy biến, hãy dùng công cụ quen thuộc trong ngành là `webpack-bundle-analyzer`.
|
|
135
138
|
|
|
136
139
|
```bash packageManager='npm'
|
|
137
140
|
npm install -D webpack-bundle-analyzer
|
|
@@ -166,29 +169,66 @@ export default {
|
|
|
166
169
|
</Tab>
|
|
167
170
|
</Tabs>
|
|
168
171
|
|
|
169
|
-
##
|
|
172
|
+
## Nó hoạt động như thế nào
|
|
170
173
|
|
|
171
|
-
Intlayer
|
|
174
|
+
Intlayer tiếp cận theo hướng **mỗi component riêng biệt (per-component)**. Khác với các file JSON toàn cục (global), nội dung được xác định song song bên cạnh hoặc bên trong chính các component. Trong quá trình build, Intlayer sẽ:
|
|
172
175
|
|
|
173
|
-
1.
|
|
174
|
-
2.
|
|
175
|
-
3.
|
|
176
|
+
1. **Phân tích** code của bạn để tìm các hàm gọi `useIntlayer`.
|
|
177
|
+
2. **Xây dựng** nội dung từ điển tương ứng cho các phần này.
|
|
178
|
+
3. **Thay thế** lệnh gọi `useIntlayer` bằng đoạn code đã được tối ưu hóa dựa trên cấu hình của bạn.
|
|
176
179
|
|
|
177
|
-
|
|
180
|
+
Cách tiếp cận này đảm bảo rằng:
|
|
178
181
|
|
|
179
|
-
- Nếu một
|
|
180
|
-
- Nếu một
|
|
182
|
+
- Nếu một component không được import, nội dung của nó cũng không được đưa vào bundle (Kỹ thuật Dead Code Elimination).
|
|
183
|
+
- Nếu một component được tải lazy-load, nội dung của nó cũng sẽ được tự động lazy-load theo.
|
|
181
184
|
|
|
182
|
-
##
|
|
185
|
+
## Thông tin chi tiết về các Plugin
|
|
186
|
+
|
|
187
|
+
Trình tối ưu hóa build của Intlayer được chia làm nhiều plugin riêng biệt, mỗi cái đảm nhận duy nhất một công việc cụ thể. Việc hiểu những gì từng plugin thực hiện sẽ giúp bạn tránh nhầm lẫn khi tùy chỉnh cấu hình.
|
|
188
|
+
|
|
189
|
+
### Các plugin của Babel (`@intlayer/babel`)
|
|
190
|
+
|
|
191
|
+
Những plugin này được khai báo trực tiếp vào `babel.config.js` ở các dự án phụ thuộc cấu hình Webpack (như Next.js dùng Babel, CRA, hoặc Webpack tùy chỉnh v.v.).
|
|
192
|
+
|
|
193
|
+
| Plugin | Công dụng |
|
|
194
|
+
| :---------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `intlayerExtractBabelPlugin` | Quét các file `.content.ts` và ghi nội dung từ điển đã biên dịch thành định dạng chuẩn vào thư mục `.intlayer/` |
|
|
196
|
+
| `intlayerOptimizeBabelPlugin` | Viết lại `useIntlayer('key')` thành `useDictionary(hash)` và tự động inject thư viện `import` để nạp từ điển khớp tương ứng |
|
|
197
|
+
| `intlayerPurgeBabelPlugin` | Quét toàn bộ mã nguồn, thực hiện loại bỏ (remove) **các trường nội dung không được sử dụng** ở file từ điển JSON tại `.intlayer/**/*.json` |
|
|
198
|
+
| `intlayerMinifyBabelPlugin` | **Rút ngắn tên (rename) khóa (keys) của nội dung** thành ký tự ngắn rút gọn (vd: `title` đổi thành `a`) ở JSON cũng như bên trong Source Code |
|
|
199
|
+
|
|
200
|
+
> **Thứ tự sắp xếp của plugin là rất quan trọng.** Trong `babel.config.js` của bạn, các plugin purge và minify phải được đặt **trước** plugin optimize. Bước optimize thay thế `useIntlayer('key')` bằng một hàm gọi không minh bạch `useDictionary(hash)`, điều này có khả năng làm mất thông tin dictionary-key gốc - vốn là thông tin cần thiết để purge và minify có thể định danh các trường thuộc tính đang được ứng dụng.
|
|
201
|
+
|
|
202
|
+
Mỗi plugin Babel sẽ đi kèm một helper option để đọc trực tiếp config của `intlayer.config.ts` một lần lúc load hệ thống, sau đó trả về giá trị đã được chuyển đổi:
|
|
203
|
+
|
|
204
|
+
| Options helper | Dùng cùng với |
|
|
205
|
+
| :--------------------------- | :---------------------------- |
|
|
206
|
+
| `getExtractPluginOptions()` | `intlayerExtractBabelPlugin` |
|
|
207
|
+
| `getOptimizePluginOptions()` | `intlayerOptimizeBabelPlugin` |
|
|
208
|
+
| `getPurgePluginOptions()` | `intlayerPurgeBabelPlugin` |
|
|
209
|
+
| `getMinifyPluginOptions()` | `intlayerMinifyBabelPlugin` |
|
|
210
|
+
|
|
211
|
+
### Các plugin của Vite (`vite-intlayer`)
|
|
212
|
+
|
|
213
|
+
Những người dùng Vite **không bao giờ phải cấu hình cái này một cách thủ công**. Chúng tự động được thiết lập thông qua lệnh gọi `withIntlayer()` ở trong `vite.config.ts`. Những cấu hình dạng boolean (đúng/sai) như `build.purge` và `build.minify` ở `intlayer.config.ts` sẽ chuyển đổi các đặc tính tương ứng thông qua config này mà không phải cài đặt gì riêng biệt.
|
|
214
|
+
|
|
215
|
+
| Plugin Vite ngầm định | Tương đương chức năng |
|
|
216
|
+
| :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
217
|
+
| Usage analyzer | Tương tự quy trình quét và tìm kiếm của `intlayerPurgeBabelPlugin` |
|
|
218
|
+
| Dictionary prune | Tương tự quy trình rút gọn và tối ưu bản ghi lưu của `intlayerPurgeBabelPlugin` qua JSON |
|
|
219
|
+
| Dictionary minify | Tương tự quy trình cắt giảm và rút ngắn độ dài JSON của `intlayerMinifyBabelPlugin` qua JSON |
|
|
220
|
+
| Babel transform | Tương tự quá trình viết lại tên khóa (key rename) bên nguồn code của `intlayerMinifyBabelPlugin` + thay phiên mã của `intlayerOptimizeBabelPlugin` |
|
|
221
|
+
|
|
222
|
+
## Tùy chỉnh thiết lập dựa vào Platform (nền tảng)
|
|
183
223
|
|
|
184
224
|
<Tabs>
|
|
185
225
|
<Tab value="nextjs">
|
|
186
226
|
|
|
187
227
|
### Next.js
|
|
188
228
|
|
|
189
|
-
Next.js yêu cầu plugin `@intlayer/swc`
|
|
229
|
+
Next.js yêu cầu có plugin `@intlayer/swc` cho bước optimize (bước thay thế các lệnh import của hệ thống), do Next.js dùng lõi SWC làm công cụ biên dịch tự động.
|
|
190
230
|
|
|
191
|
-
> Plugin này không
|
|
231
|
+
> Plugin này không cài đặt theo mặc định bởi vì nền tảng hỗ trợ (API SWC Plugins) trên Next.js vẫn còn là một thử nghiệm. Do đó sẽ có thay đổi khi nó được cập nhật.
|
|
192
232
|
|
|
193
233
|
```bash packageManager="npm"
|
|
194
234
|
npm install -D @intlayer/swc
|
|
@@ -206,21 +246,63 @@ pnpm add -D @intlayer/swc
|
|
|
206
246
|
bun add -d @intlayer/swc
|
|
207
247
|
```
|
|
208
248
|
|
|
209
|
-
Sau khi
|
|
249
|
+
Sau khi hoàn tất, Intlayer có thể tìm kiếm và ứng dụng tự động nó cho phần compile hệ thống.
|
|
250
|
+
|
|
251
|
+
Để áp dụng các bước thao tác **purge và minify** (chức năng xóa bỏ các trường hoặc cấu trúc bị dư thừa, đặt biệt danh thay thế cho file), nên thực hiện bổ sung cài `@intlayer/babel` và thiết lập trên config của Babel. Vì bản thân lõi Next.js dù sử dụng SWC trong quy trình dịch mã cho code (transform) nhưng lại luôn thực hiện phân giải config cài đặt của Babel (qua file `babel.config.js`). Cho nên plugin của Babel sẽ vận hành như bước khởi động tiền đề trước khi chạy 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: hủy bỏ các trường đã không còn sử dụng được tìm thấy bên trong .intlayer/**/*.json
|
|
269
|
+
[intlayerPurgeBabelPlugin, getPurgePluginOptions()],
|
|
270
|
+
// Minify: rút gọn và rút ngắn tên cho các JSON + sửa lệnh ở trên source code
|
|
271
|
+
[intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
|
|
272
|
+
// Lưu ý: Không cần đến khai báo `intlayerOptimizeBabelPlugin` ở đây vì
|
|
273
|
+
// @intlayer/swc đã tiếp quản tiến trình biến đổi useIntlayer → useDictionary.
|
|
274
|
+
],
|
|
275
|
+
};
|
|
276
|
+
```
|
|
210
277
|
|
|
211
278
|
</Tab>
|
|
212
279
|
<Tab value="vite">
|
|
213
280
|
|
|
214
281
|
### Vite
|
|
215
282
|
|
|
216
|
-
Vite sử dụng plugin `@intlayer/babel` được
|
|
283
|
+
Vite hoàn toàn tương thích và sử dụng module plugin `@intlayer/babel` nhưng nó đã được cung cấp tự động bởi thư viện phụ trợ `vite-intlayer` và sẵn có ngay bên trong. Mọi quy trình tinh chỉnh từ optimize, rewrite thay đổi đường dẫn mã import, hay purge và minify cũng mặc nhiên kích hoạt theo nên hoàn toàn không cần can thiệp bổ sung thủ công.
|
|
284
|
+
|
|
285
|
+
Sử dụng cờ (flag) purge hoặc minify cho nhu cầu cá nhân bạn chỉ bằng việc cấu hình vào trong thư mục `intlayer.config.ts`:
|
|
286
|
+
|
|
287
|
+
```typescript fileName="intlayer.config.ts"
|
|
288
|
+
import type { IntlayerConfig } from "intlayer";
|
|
289
|
+
|
|
290
|
+
const config: IntlayerConfig = {
|
|
291
|
+
build: {
|
|
292
|
+
purge: true, // tối ưu dung lượng JSON bundle qua loại bỏ dư thừa rác
|
|
293
|
+
minify: true, // đổi tên khóa thuộc tính trường sang phiên bản tên ảo thu nhỏ cực gọn
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export default config;
|
|
298
|
+
```
|
|
217
299
|
|
|
218
300
|
</Tab>
|
|
219
301
|
<Tab value="webpack">
|
|
220
302
|
|
|
221
|
-
### Webpack
|
|
303
|
+
### Webpack (và bản Next.js có xài Babel truyền thống)
|
|
222
304
|
|
|
223
|
-
|
|
305
|
+
Cài đặt tiện ích thông qua `@intlayer/babel`:
|
|
224
306
|
|
|
225
307
|
```bash packageManager="npm"
|
|
226
308
|
npm install -D @intlayer/babel
|
|
@@ -238,73 +320,101 @@ pnpm add -D @intlayer/babel
|
|
|
238
320
|
bun add -d @intlayer/babel
|
|
239
321
|
```
|
|
240
322
|
|
|
241
|
-
|
|
323
|
+
Sau khi cài, hãy đưa toàn bộ cả 4 loại plugins vào nội dung của `babel.config.js` đồng thời nhớ thực thi cấu trúc tuần tự thật chuẩn.
|
|
324
|
+
|
|
325
|
+
```javascript fileName="babel.config.js"
|
|
242
326
|
const {
|
|
243
|
-
|
|
327
|
+
intlayerExtractBabelPlugin,
|
|
328
|
+
intlayerPurgeBabelPlugin,
|
|
329
|
+
intlayerMinifyBabelPlugin,
|
|
244
330
|
intlayerOptimizeBabelPlugin,
|
|
331
|
+
getExtractPluginOptions,
|
|
332
|
+
getPurgePluginOptions,
|
|
333
|
+
getMinifyPluginOptions,
|
|
334
|
+
getOptimizePluginOptions,
|
|
245
335
|
} = require("@intlayer/babel");
|
|
246
336
|
|
|
247
337
|
module.exports = {
|
|
248
|
-
plugins: [
|
|
338
|
+
plugins: [
|
|
339
|
+
// Extract: biến đổi từ raw .content.ts để nạp qua dạng cấu trúc chuẩn .intlayer/**/*.json
|
|
340
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
341
|
+
|
|
342
|
+
// Purge: cắt xén, giảm thiểu code thừa nằm trên .intlayer/**/*.json
|
|
343
|
+
// (hành động này tự kết nối tham số cờ build.purge tại intlayer.config.ts)
|
|
344
|
+
[intlayerPurgeBabelPlugin, getPurgePluginOptions()],
|
|
345
|
+
|
|
346
|
+
// Minify: tái thiết lập danh mục biến thành kí tự ngắn dùng trên JSON + Mã gốc
|
|
347
|
+
// (hành động này tự kết nối tham số cờ build.minify tại intlayer.config.ts)
|
|
348
|
+
[intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
|
|
349
|
+
|
|
350
|
+
// Optimize: Thay dạng cú pháp useIntlayer('key') → useDictionary(hash)
|
|
351
|
+
// Buộc nằm vị trí tận cùng bởi khi biên tập xong nó sẽ làm vô danh mã định danh key gốc.
|
|
352
|
+
[intlayerOptimizeBabelPlugin, getOptimizePluginOptions()],
|
|
353
|
+
],
|
|
249
354
|
};
|
|
250
355
|
```
|
|
251
356
|
|
|
252
357
|
</Tab>
|
|
253
358
|
</Tabs>
|
|
254
359
|
|
|
255
|
-
##
|
|
360
|
+
## Tùy chỉnh cấu hình (Configuration)
|
|
256
361
|
|
|
257
|
-
|
|
362
|
+
Để cung cấp sức mạnh điều khiển tối đa xem cách thức Intlayer quản trị hiệu suất ứng dụng của bạn ra sao, vui lòng điều phối ngay bên trong tham số biến `build` của file `intlayer.config.ts`.
|
|
258
363
|
|
|
259
364
|
```typescript fileName="intlayer.config.ts"
|
|
260
365
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
261
366
|
|
|
262
367
|
const config: IntlayerConfig = {
|
|
263
368
|
internationalization: {
|
|
264
|
-
locales: [Locales.ENGLISH, Locales.
|
|
369
|
+
locales: [Locales.ENGLISH, Locales.VIETNAMESE],
|
|
265
370
|
defaultLocale: Locales.ENGLISH,
|
|
266
371
|
},
|
|
267
372
|
dictionary: {
|
|
268
373
|
importMode: "dynamic",
|
|
269
374
|
},
|
|
270
375
|
build: {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
* Cho biết liệu quá trình build có nên kiểm tra các kiểu TypeScript hay không
|
|
283
|
-
*/
|
|
284
|
-
checkTypes: false;
|
|
376
|
+
// Biến cải những cấu hình useIntlayer() trở thành gọi import kết nối file ở thì hiện thực hóa build
|
|
377
|
+
// undefined = cấu hình chạy tự động (luôn on cho production mode), true = ép buộc mọi lúc, false = không cấp quyền kích hoạt.
|
|
378
|
+
optimize: undefined,
|
|
379
|
+
|
|
380
|
+
// Chuyển hóa và đặt bí danh ký tự siêu nhỏ cực ngắn cho biến và tham số đối tượng JSON trên môi trường source code thay thế tên quá rườm rà (ví dụ thay chữ title thành a).
|
|
381
|
+
// Có ảnh hưởng trực tiếp dung lượng lưu trữ JSON cuối cùng; nhưng yêu cầu chạy optimize trước.
|
|
382
|
+
minify: true,
|
|
383
|
+
|
|
384
|
+
// Chỉ thị lệnh giúp bóc tách và phân hủy các biến bị thừa thãi (chưa bao giờ được lấy ra sử dụng lúc thiết kế) không thể tham gia bundle biên dịch để giảm payload.
|
|
385
|
+
// Yêu cầu chạy optimize trước.
|
|
386
|
+
purge: true,
|
|
285
387
|
},
|
|
286
388
|
};
|
|
287
389
|
|
|
288
390
|
export default config;
|
|
289
391
|
```
|
|
290
392
|
|
|
291
|
-
>
|
|
393
|
+
> Hướng xử lý an toàn và luôn được đề cử cao nhất thường là giữ nguyên thiết lập định sẵn ban đầu (`undefined`) cho chế độ `optimize`.
|
|
394
|
+
|
|
395
|
+
> Quý khách muốn khảo sát tài liệu thì mời bấm vào reference link dưới: [Phần Cấu Hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md)
|
|
292
396
|
|
|
293
|
-
|
|
397
|
+
### Những Thông Tin Build Options Chi Tiết
|
|
294
398
|
|
|
295
|
-
|
|
399
|
+
| Cấu trúc (Property) | Khai báo loại | Tùy chọn gốc | Thuyết minh giải nghĩa |
|
|
400
|
+
| :------------------ | :--------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
401
|
+
| **`optimize`** | `boolean \| undefined` | `undefined` | Kích hoạt bộ chuyển phân giải quy trình gọi lệnh import bằng đường tắt chuẩn nhanh cho compiler. Trạng thái `undefined` = mặc nhiên tham gia cấu thành production mode build. Nhưng trạng thái `false` sẽ chặn đứng quy trình purge cùng minify. |
|
|
402
|
+
| **`minify`** | `boolean` | `false` | Ra lệnh cho tool đổi danh tính bí danh cho mã key ở các tập lưu dữ liệu (json file) và dùng phiên hiệu ký tự đặc trưng mã ngắn. Nhờ thế, việc phân tích (parser) biến trên file code chính cũng phải thay đổi tương quan. Sẽ bị vô hiệu khi `optimize` = `false`. |
|
|
403
|
+
| **`purge`** | `boolean` | `false` | Phụ trách tiêu hủy biến cùng giá trị từ điển không tham gia tương tác ở code lúc lập trình cho đỡ bị nhét thừa thãi vào gói lưu file JSON. Sẽ bị vô hiệu và thất bại kích hoạt nếu thiết lập tùy chỉnh `optimize` = `false`. |
|
|
296
404
|
|
|
297
|
-
|
|
405
|
+
### Chức năng rút gọn Minification (Cắt ngắn độ lớn định danh trường tham chiếu)
|
|
298
406
|
|
|
299
|
-
|
|
300
|
-
| :------------- | :-------- | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
301
|
-
| **`optimize`** | `boolean` | `undefined` | Kiểm soát xem có bật tối ưu hóa build hay không. Nếu là `true`, Intlayer thay thế các cuộc gọi từ điển bằng các lệnh chèn được tối ưu hóa. Nếu là `false`, tối ưu hóa bị tắt. Tốt nhất nên đặt thành `true` trong production. |
|
|
302
|
-
| **`minify`** | `boolean` | `false` | Liệu có nén các từ điển để giảm kích thước bundle hay không. |
|
|
303
|
-
| **`purge`** | `boolean` | `false` | Liệu có loại bỏ các khóa không sử dụng trong từ điển hay không. |
|
|
407
|
+
Kỹ thuật từ `build.minify` **không phải** là phương tiện giúp tối thiểu hóa cấu trúc JavaScript từ hệ sinh thái — các nền tảng build như vite, next.js sẽ nhận trách nhiệm. Ngược lại, điều nó mang lại chính là cô đọng kích cỡ lưu chứa mã JSON thay toàn bộ khóa định danh nguyên thủy cho nội dung mà lập trình viên nhập vào trở nên đơn giản hơn nhiều bằng việc cung cấp các biệt danh alpha ngắn cũn cởn.
|
|
304
408
|
|
|
305
|
-
|
|
409
|
+
```
|
|
410
|
+
// Trình tự thông tin JSON chuẩn bị Minify
|
|
411
|
+
{ "title": "Xin chào", "subtitle": "Thế giới" }
|
|
412
|
+
|
|
413
|
+
// Biểu thức cho thấy trạng thái thực thi Minify đã xong
|
|
414
|
+
{ "a": "Xin chào", "b": "Thế giới" }
|
|
415
|
+
```
|
|
306
416
|
|
|
307
|
-
|
|
417
|
+
Điều kỳ diệu chính là những thay thế đó ứng dụng trọn vẹn luôn cho mảng tương tác object trên code thực thi, cho nên lúc xài ở compiler, nó cũng tự sửa biến từ `content.title` chuyển qua xài chuẩn `content.a` theo form thu gọn để chạy. Bản chất dữ liệu (Runtime behaviour) hiển thị 100% y nguyên so với kết quả xuất trên file chạy thật.
|
|
308
418
|
|
|
309
419
|
```typescript fileName="intlayer.config.ts"
|
|
310
420
|
import type { IntlayerConfig } from "intlayer";
|
|
@@ -318,11 +428,13 @@ const config: IntlayerConfig = {
|
|
|
318
428
|
export default config;
|
|
319
429
|
```
|
|
320
430
|
|
|
321
|
-
> Lưu ý:
|
|
431
|
+
> Lưu ý: Sự can thiệp minify sẽ ngừng thực hiện nếu cờ `optimize` được kích ở mức `false` hoặc lúc bộ hiển thị bằng editor đang dùng tham số `editor.enabled` = `true` (do phía editor thiết kế cần đọc đúng định dạng khai báo nguồn nội dung ban đầu từ file config).
|
|
322
432
|
|
|
323
|
-
|
|
433
|
+
> Sự can thiệp bằng minify đồng thời mất kiểm soát khi tải từ các lệnh gọi JSON ngoại lai của server api khác thông qua thông số gán thiết lập mặc định qua file nguồn `importMode: 'fetch'` — điều này giải quyết và chống phá hỏng liên lạc bằng json của đầu ra máy chủ do nếu app tại máy tính người xài thay danh định gốc trên code sẽ đứt đường tiếp nhận dữ liệu phía cloud.
|
|
324
434
|
|
|
325
|
-
|
|
435
|
+
### Hệ chức năng gạt bỏ rác Purging (xóa trắng các khóa thuộc tính trống hoặc dư)
|
|
436
|
+
|
|
437
|
+
Hệ công cụ ở `build.purge` thực hiện điều tra những khóa nội dung nào hiện tại thực sự chạy trực tiếp trong code đang code ở môi trường development của bạn, nếu phát hiện cái nào thừa, nó liền thẳng tay xóa mọi mã tồn đọng ở phần JSON sau compile cho sạch.
|
|
326
438
|
|
|
327
439
|
```typescript fileName="intlayer.config.ts"
|
|
328
440
|
import type { IntlayerConfig } from "intlayer";
|
|
@@ -336,34 +448,50 @@ const config: IntlayerConfig = {
|
|
|
336
448
|
export default config;
|
|
337
449
|
```
|
|
338
450
|
|
|
339
|
-
|
|
451
|
+
**Thử lấy một ví dụ cơ bản:** Có một tệp từ điển gánh trên vai trọng lượng lên tới 5 biến trường mà thực chất xài lúc làm UI thiết kế chỉ có 2 cái.
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
// Trạng thái tệp rác trước Purge
|
|
455
|
+
{ "title": "…", "subtitle": "…", "cta": "…", "footer": "…", "badge": "…" }
|
|
456
|
+
|
|
457
|
+
// Lúc quét xử lý dữ liệu và tiến hành cắt xén thì sau đó chỉ còn (nhờ ứng dụng lúc xài hàm truy suất chỉ đụng đến title với cả subtitle)
|
|
458
|
+
{ "title": "…", "subtitle": "…" }
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
> Hãy cân nhắc bởi Purge cũng chẳng khác gì minify, hệ sẽ phớt lờ thao tác nếu như thông số thuộc `optimize` để là `false` hay công cụ trình hỗ trợ `editor.enabled` đang mở (true).
|
|
462
|
+
|
|
463
|
+
> Ngoài ra chức năng của hệ cũng bảo lưu quy trình rủi ro và buộc dừng tiến trình purge (như khi không parse được code nguồn để phân tích), hoặc lệnh trả biến ở bộ thu nhận `useIntlayer` xài như thông số ẩn hoặc bị mã hóa ngầm lúc khai báo truyền tin nên analyzer bot mất dấu để định hướng hành tung của nội dung nguồn (một trường hợp cụ thể đó là kiểu trải dữ liệu `spread` cho vô Object bự xài nhưng quên không destructure rõ ràng tham số lúc dùng trong prop). Tại ranh giới bất an kiểu này hệ tự ép lấy sạch sành sanh cho yên tâm trọn gói JSON mà khỏi sợ cắt lố làm mất dữ liệu oan.
|
|
340
464
|
|
|
341
|
-
###
|
|
465
|
+
### Thiết lập Nạp (Import Mode)
|
|
342
466
|
|
|
343
|
-
|
|
467
|
+
Dành cho những dApp/App siêu bự, ứng dụng ôm gọn cực nhiều thông tin ngôn ngữ thì cấu trúc JSON khéo khi bành trướng nặng nề nhất phần ứng dụng của app. Để tiết kiệm thì nền tảng Intlayer khai báo thuộc tính thông qua `importMode` option cho việc lựa chọn kiểu định lượng dữ liệu truyền qua.
|
|
344
468
|
|
|
345
|
-
|
|
469
|
+
### Tùy Chọn Global (Khu Cực Trọng Tâm)
|
|
470
|
+
|
|
471
|
+
Chế độ tự import toàn mạng ứng dụng cấu trúc chung thiết đặt cho các mục tại trung tâm `intlayer.config.ts` của bạn.
|
|
346
472
|
|
|
347
473
|
```typescript fileName="intlayer.config.ts"
|
|
348
474
|
import type { IntlayerConfig } from "intlayer";
|
|
349
475
|
|
|
350
476
|
const config: IntlayerConfig = {
|
|
351
|
-
|
|
352
|
-
|
|
477
|
+
dictionary: {
|
|
478
|
+
importMode: "dynamic", // Tùy chọn này theo máy thường để dạng 'static' mặc định
|
|
353
479
|
},
|
|
354
480
|
};
|
|
355
481
|
|
|
356
482
|
export default config;
|
|
357
483
|
```
|
|
358
484
|
|
|
359
|
-
|
|
485
|
+
### Chỉnh Lại Trên Mức Riêng Từng Thư Viện
|
|
486
|
+
|
|
487
|
+
Nếu muốn điều phối lệnh này mà sợ động ảnh hưởng config global thì tha hồ sửa từng cái trong từng file khai báo từ điển như `.content.{{ts|tsx|js|jsx|mjs|cjs|json|jsonc|json5|md|mdx|yaml|yml}}` cho tiện.
|
|
360
488
|
|
|
361
489
|
```ts
|
|
362
490
|
import { type Dictionary, t } from "intlayer";
|
|
363
491
|
|
|
364
492
|
const appContent: Dictionary = {
|
|
365
493
|
key: "app",
|
|
366
|
-
importMode: "dynamic", //
|
|
494
|
+
importMode: "dynamic", // Hủy chế độ toàn cục và thiết lập đè cho duy nhất tệp này
|
|
367
495
|
content: {
|
|
368
496
|
// ...
|
|
369
497
|
},
|
|
@@ -372,83 +500,103 @@ const appContent: Dictionary = {
|
|
|
372
500
|
export default appContent;
|
|
373
501
|
```
|
|
374
502
|
|
|
375
|
-
|
|
|
376
|
-
|
|
|
377
|
-
| **`importMode`**
|
|
503
|
+
| Tên Khai Báo Tính Năng | Tham chiếu Dữ Liệu Loại Trừ | Hệ Trị Tự Có | Tính Năng & Ứng Dụng |
|
|
504
|
+
| :--------------------- | :--------------------------------- | :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
505
|
+
| **`importMode`** | `'static'`, `'dynamic'`, `'fetch'` | `'static'` | **Từng bị dừng áp dụng cũ (Deprecated)**: Khuyến khích xài tham chiếu thông qua nhánh mới `dictionary.importMode`. Giúp điều khiển bộ xử lý lấy từ điển (như liệt kê dưới). |
|
|
378
506
|
|
|
379
|
-
|
|
380
|
-
Bạn có thể xác định nó trên toàn cầu trong tệp `intlayer.config.ts` dưới đối tượng `dictionary`, hoặc bạn có thể ghi đè nó cho một từ điển cụ thể trong tệp `.content.ts` của nó.
|
|
507
|
+
Hệ thống thông số cho `importMode` là lệnh yêu cầu cơ cấu tiêm (inject) giá trị biên dịch vào component. Nó cho phép thay thế qua cấu hình tại `dictionary` nội tại config hoặc chèn ép ở riêng file đuôi mở rộng `.content.ts`.
|
|
381
508
|
|
|
382
|
-
### 1. Chế
|
|
509
|
+
### 1. Phân Lớp Phương Hướng Chế Độ Hoạt Động (Static Mode `default`)
|
|
383
510
|
|
|
384
|
-
|
|
511
|
+
Static hỗ trợ tạo quy trình biên tập để Intlayer làm mờ gọi hàm bằng biến cấu trúc chìm khi nạp đè `useIntlayer` lùi về tham số lõi của `useDictionary` cho trực tiếp cấu hình ở môi trường thực tiễn tại cục build JS luôn mà chẳng đợi kết nối ngoài.
|
|
385
512
|
|
|
386
|
-
-
|
|
387
|
-
- **Nhược điểm
|
|
388
|
-
- **
|
|
513
|
+
- **Mặt tích cực (Ưu):** Load trang cấp kỳ ko thấy thời gian tải (chạy đồng bộ hóa mã synchoronous), triệt tiêu gánh nặng từ request gọi về API cho băng thông của trang và hydration.
|
|
514
|
+
- **Mặt gây phiền hà (Khuyết):** Nhược điểm nặng nhất cho chuyện đó vì cục đóng gọi dữ liệu ép bản thân thu gom của cả **mọi ngôn ngữ cấu hình** đang sở hữu trên thành phần thiết đặt cho mục đó. Khó xài cho app khổng lồ.
|
|
515
|
+
- **Tiêu cự tuyệt vời nhất dùng cho:** Ưu thế tối mật khi dùng Single Page Application (SPA).
|
|
389
516
|
|
|
390
|
-
**
|
|
517
|
+
**Chiếu theo quy trình chuyển mã khi test cấu hình:**
|
|
391
518
|
|
|
392
519
|
```tsx
|
|
393
|
-
//
|
|
520
|
+
// Khu vực mã xài trong src/ code của bạn
|
|
394
521
|
const content = useIntlayer("my-key");
|
|
395
522
|
|
|
396
|
-
//
|
|
523
|
+
// Diễn họa một quá trình hoàn chỉnh khi chuyển đổi mã code ở mức độ Static
|
|
524
|
+
// Lưu ý mã minh họa mang tính demo không giống 100% mã chạy thiệt sau optimize
|
|
397
525
|
const content = useDictionary({
|
|
398
526
|
key: "my-key",
|
|
399
527
|
content: {
|
|
400
528
|
nodeType: "translation",
|
|
401
529
|
translation: {
|
|
402
530
|
en: "My title",
|
|
403
|
-
|
|
531
|
+
vi: "Tiêu đề của tôi",
|
|
404
532
|
},
|
|
405
533
|
},
|
|
406
534
|
});
|
|
407
535
|
```
|
|
408
536
|
|
|
409
|
-
### 2.
|
|
537
|
+
### 2. Mô Thức Vận Hành Thông Minh Dựa Trên Tính Logic (Dynamic Mode)
|
|
410
538
|
|
|
411
|
-
|
|
539
|
+
Tại hình thức vận hành kiểu Dynamic, Intlayer sẽ thủ thuật đè lệnh cho `useIntlayer` nạp thẳng đến cơ chế xử lý bằng hàm `useDictionaryAsync`. Chức năng dùng mẹo tạo phương tiện gọi lệnh `import()` (Mô phỏng như Suspense Lazy Component cơ bản) dành riêng cho tải nội dung chỉ gói gọn trong giới hạn Locale hiện đang mở cho khách xem trang và ngắt lấy các locale json khác.
|
|
412
540
|
|
|
413
|
-
-
|
|
414
|
-
-
|
|
415
|
-
- **
|
|
541
|
+
- **Khía cạnh Ưu Điểm Nổi Trội:** **Kỹ thuật Tree Shaking triệt để tới mức locale.** Tỷ như gã khách từ Mỹ chỉ đang xem chế độ web là Tiếng Anh, mã web nhạy bén nhận yêu cầu tải gói ngôn ngữ cục bộ bản English _độc quyền_. File JSON phiên bản tiếng Việt cất cho kỹ ở nhà và chẳng mảy may lôi ra load tốn thời gian.
|
|
542
|
+
- **Điều Bất Lợi:** Tự kích lệnh truyền API hoặc fetching cho các phần tài nguyên theo từng node trên component mỗi khi quá trình load thực thi trên trang chủ diễn ra lúc thực hiện tiến trình hydrate.
|
|
543
|
+
- **Biện Pháp Giải Quyết Thiết Thực Nhất:** Sử dụng trên đoạn khối Text dày đặc văn mẫu ngồn ngộn, hoặc ứng dụng đa dịch vụ trang bị vô vàn hệ dịch thuật ngôn ngữ toàn cầu mang tính tiết giảm khối dung lượng load.
|
|
416
544
|
|
|
417
|
-
|
|
545
|
+
**Định Mẫu Cơ Học Đã Qua Thay Đổi Form Bố Cục Nền Code:**
|
|
418
546
|
|
|
419
547
|
```tsx
|
|
420
|
-
//
|
|
548
|
+
// Phương Thức Nguyên Mẫu Khởi Điểm Do Bạn Coding
|
|
421
549
|
const content = useIntlayer("my-key");
|
|
422
550
|
|
|
423
|
-
//
|
|
551
|
+
// Minh Chứng Code Đã Xử Xong Ở Nền Biến Tướng (Dynamic Mode)
|
|
552
|
+
// Biểu Phác Để Giới Thiệu Chứ Thực Tế Form Máy Đã Generate Tối Ưu Còn Hay Hơn Nhiều Nữa
|
|
424
553
|
const content = useDictionaryAsync({
|
|
425
554
|
en: () =>
|
|
426
555
|
import(".intlayer/dynamic_dictionary/my-key/en.json").then(
|
|
427
556
|
(mod) => mod.default
|
|
428
557
|
),
|
|
429
|
-
|
|
430
|
-
import(".intlayer/dynamic_dictionary/my-key/
|
|
558
|
+
vi: () =>
|
|
559
|
+
import(".intlayer/dynamic_dictionary/my-key/vi.json").then(
|
|
431
560
|
(mod) => mod.default
|
|
432
561
|
),
|
|
433
562
|
});
|
|
434
563
|
```
|
|
435
564
|
|
|
436
|
-
>
|
|
565
|
+
> Hễ mà mở quyền thông số `importMode: 'dynamic'`, giả như trong tay bạn ném tới cả 100 đoạn UI con con xài lệnh từ cục `useIntlayer` tại ngay trong cấu thành page đó, trình duyệt vã mồ hôi và phải cắm đầu phóng lên bầu trời đủ số lượng yêu cầu là 100 truy vấn lấy json tách biệt. Để tháo bỏ gông cùm lỗi kẹt truy vấn theo "băng chuyền waterfall" độc hại này, cố nhồi thông tin cho ít tệp chia nhỏ `.content` nhất (vd như lập một bảng dịch khổng lồ ứng từng mảng hiển thị). Việc cấp mã khai báo cùng một Tên Gọi key trên nhiều mục `.content` phân nhánh hoàn toàn vẫn khả thi. Hệ Intlayer tự khôn mà gộp chúng và hợp nhất trọn vẹn tại thành duy nhất một cái danh sách bảng dictionary để tiết giảm request.
|
|
566
|
+
|
|
567
|
+
### 3. Fetch Mode (Kéo Về Trực Tiếp Nguồn Code Chạy Tại Trình Web Server)
|
|
568
|
+
|
|
569
|
+
Quy chuẩn xài thì gần giống loại Dynamic, có điều quy trình lại rẽ trái sang việc xin bảng dịch lấy về qua nền cấu trúc cấp dữ liệu qua API từ Intlayer Live Sync. Trong một rủi ro đường truyền bị gãy hoặc là chẳng cài cho tính năng Live Updates bên trang CMS, code cũng khôn khéo thoái lui rơi ngược quay trở lại dùng chế độ nạp tải bằng Dynamic Mode như trước.
|
|
437
570
|
|
|
438
|
-
|
|
571
|
+
**Chuyển Form Khi Sử Dụng Phương Thức Cho Quá Trình Hoàn Chỉnh:**
|
|
439
572
|
|
|
440
|
-
|
|
573
|
+
```tsx
|
|
574
|
+
// Code Thuộc Phần Thao Tác Bên Phía Môi Trường Workspace Của Lập Trình Viên
|
|
575
|
+
const content = useIntlayer("my-key");
|
|
576
|
+
|
|
577
|
+
// Khái Lược Cho Trình Code Fetch Hoàn Chỉnh Về API Server (Mô Phỏng Trực Tiếp 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
|
+
vi: () =>
|
|
584
|
+
fetch("https://intlayer.my-domain.com/dictionary/my-key/vi").then((res) =>
|
|
585
|
+
res.json()
|
|
586
|
+
),
|
|
587
|
+
});
|
|
588
|
+
```
|
|
441
589
|
|
|
442
|
-
>
|
|
590
|
+
> Thêm kiến thức nền tham quan thêm bên kho thông tin cho CMS thì nhấp vào: [Intlayer CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md)
|
|
443
591
|
|
|
444
|
-
>
|
|
592
|
+
> Lên giao thức fetch này thì chuyện gạt rác hay cắt ghép rút gọn (purge & minify) là bị khóa kín chốt vĩnh viễn luôn vì cái bảng JSON được kéo xuống bằng dạng nguyên sơ y nguyên với đống thuộc tính chả đổi tên nào gửi trực tiếp bằng dữ liệu nguồn API Remote xa xôi từ máy chủ nội bộ trên Cloud CMS do user gõ sao nó phản chiếu ngược trở lại đúng như cũ.
|
|
445
593
|
|
|
446
|
-
##
|
|
594
|
+
## Tổng Đoán Nhanh: So Kè Tính Ưu Việt Của Loại Static Cùng Với Dynamic
|
|
447
595
|
|
|
448
|
-
|
|
|
449
|
-
|
|
|
450
|
-
| **Kích
|
|
451
|
-
| **
|
|
452
|
-
| **
|
|
453
|
-
| **Tree Shaking**
|
|
454
|
-
| **
|
|
596
|
+
| Điểm Chạm Thực Nghiệm | Áp Dụng Loại Hình Thức Static Mode | Áp Dụng Loại Hình Thức Dynamic Mode |
|
|
597
|
+
| :------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------ |
|
|
598
|
+
| **Kích Thước Cục Pack Build Do Cấu Thành Bằng Bundle Tương Thích Ở File Nén JS** | Quá Lớn (Nó ôm đồm toàn bộ đống code tất cả bản dịch trong từng Node) | Mi Nhon Mảnh Mai (Xài code load thô ráp mà chẳng xài Content Trực Tiếp) |
|
|
599
|
+
| **Lần Nạp File Từ Đầu Load** | Nạp Trang Mức "The Flash" (Nội dung ăn chực tại nền Bundle) | Sẽ Độ Trễ Sương Sương Khẽ Mỏng (Tại Cần Lôi JSON Phân Phối Trực Tiếp) |
|
|
600
|
+
| **Vấn Đề Đòi Request Băng Thông Trên Đường Mạng** | Bằng 0 Hoàn Toàn | Phát Hành Chuẩn Cú 1 Request Cho Duy Nhất 1 Bảng Key Component Dictionary |
|
|
601
|
+
| **Bảo Vệ Tính An Toàn Loại Rác Thừa Qua Việc Tree Shaking** | Theo Khu Vực Thuộc Về Component | Tính Linh Động Nhờ Chạy Khép Component + Khép Riêng Mức Locale Do Yêu Cầu Tùy Loại Ngôn Ngữ |
|
|
602
|
+
| **Xài Chuẩn Không Chỉnh Ở Tính Chất Cho Đạt Case Xịn Khỏi Chê** | Thể Loại Cấu Trúc Thành Phần Giao Diện Nhanh Lẹ Cho Phép Chạy Web Trọng Lượng Thấp | Ở Lãnh Thổ Website Sỡ Hữu Mớ Tài Liệu Quá Dài Có Nhiều Nút Đa Dịch Có Số Lượng Kếch Xù |
|