@intlayer/docs 8.3.0 → 8.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/i18n_using_next-i18next.md +1 -0
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +0 -29
- package/blog/uk/internationalization_and_SEO.md +1 -1
- package/docs/ar/compiler.md +84 -49
- package/docs/ar/configuration.md +82 -58
- package/docs/ar/intlayer_with_analog.md +2 -2
- package/docs/ar/intlayer_with_angular.md +2 -2
- package/docs/ar/intlayer_with_astro.md +2 -2
- package/docs/ar/intlayer_with_lynx+react.md +2 -2
- package/docs/ar/intlayer_with_nextjs_16.md +174 -1
- package/docs/ar/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +4 -7
- package/docs/ar/intlayer_with_react_native+expo.md +2 -2
- package/docs/ar/intlayer_with_react_router_v7.md +224 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ar/intlayer_with_svelte_kit.md +175 -2
- package/docs/ar/intlayer_with_tanstack.md +176 -1
- package/docs/ar/intlayer_with_vite+preact.md +176 -3
- package/docs/ar/intlayer_with_vite+react.md +174 -1
- package/docs/ar/intlayer_with_vite+solid.md +176 -3
- package/docs/ar/intlayer_with_vite+svelte.md +176 -3
- package/docs/ar/intlayer_with_vite+vue.md +178 -5
- package/docs/ar/vs_code_extension.md +1 -1
- package/docs/de/compiler.md +83 -48
- package/docs/de/configuration.md +417 -214
- package/docs/de/intlayer_with_analog.md +2 -2
- package/docs/de/intlayer_with_angular.md +2 -2
- package/docs/de/intlayer_with_astro.md +2 -2
- package/docs/de/intlayer_with_lynx+react.md +2 -2
- package/docs/de/intlayer_with_nextjs_16.md +176 -1
- package/docs/de/intlayer_with_nextjs_compiler.md +106 -349
- package/docs/de/intlayer_with_react_native+expo.md +2 -2
- package/docs/de/intlayer_with_react_router_v7.md +225 -2
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +221 -79
- package/docs/de/intlayer_with_svelte_kit.md +158 -2
- package/docs/de/intlayer_with_tanstack.md +159 -1
- package/docs/de/intlayer_with_vite+preact.md +159 -3
- package/docs/de/intlayer_with_vite+react.md +157 -1
- package/docs/de/intlayer_with_vite+solid.md +161 -5
- package/docs/de/intlayer_with_vite+svelte.md +159 -3
- package/docs/de/intlayer_with_vite+vue.md +159 -3
- package/docs/de/vs_code_extension.md +1 -1
- package/docs/en/compiler.md +60 -33
- package/docs/en/configuration.md +82 -77
- package/docs/en/intlayer_with_analog.md +1 -1
- package/docs/en/intlayer_with_angular.md +1 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_nextjs_16.md +176 -0
- package/docs/en/intlayer_with_nextjs_compiler.md +179 -1
- package/docs/en/intlayer_with_react_native+expo.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +159 -0
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +159 -0
- package/docs/en/intlayer_with_svelte_kit.md +159 -0
- package/docs/en/intlayer_with_tanstack.md +160 -1
- package/docs/en/intlayer_with_vite+preact.md +160 -1
- package/docs/en/intlayer_with_vite+react.md +159 -0
- package/docs/en/intlayer_with_vite+solid.md +149 -28
- package/docs/en/intlayer_with_vite+svelte.md +160 -1
- package/docs/en/intlayer_with_vite+vue.md +143 -42
- package/docs/en/vs_code_extension.md +1 -1
- package/docs/en-GB/compiler.md +66 -34
- package/docs/en-GB/configuration.md +80 -57
- package/docs/en-GB/intlayer_with_analog.md +1 -1
- package/docs/en-GB/intlayer_with_angular.md +1 -1
- package/docs/en-GB/intlayer_with_astro.md +1 -1
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -1
- package/docs/en-GB/intlayer_with_react_native+expo.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+vue.md +2 -2
- package/docs/en-GB/vs_code_extension.md +1 -1
- package/docs/es/compiler.md +83 -48
- package/docs/es/configuration.md +412 -208
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_analog.md +2 -2
- package/docs/es/intlayer_with_angular.md +2 -2
- package/docs/es/intlayer_with_astro.md +2 -2
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_fastify.md +1 -1
- package/docs/es/intlayer_with_hono.md +1 -1
- package/docs/es/intlayer_with_lynx+react.md +2 -2
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_nextjs_16.md +176 -3
- package/docs/es/intlayer_with_nextjs_compiler.md +175 -2
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_native+expo.md +2 -2
- package/docs/es/intlayer_with_react_router_v7.md +227 -4
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +162 -4
- package/docs/es/intlayer_with_svelte_kit.md +158 -2
- package/docs/es/intlayer_with_tanstack.md +160 -2
- package/docs/es/intlayer_with_vite+preact.md +164 -8
- package/docs/es/intlayer_with_vite+react.md +160 -4
- package/docs/es/intlayer_with_vite+solid.md +165 -9
- package/docs/es/intlayer_with_vite+svelte.md +159 -3
- package/docs/es/intlayer_with_vite+vue.md +169 -13
- package/docs/es/vs_code_extension.md +1 -1
- package/docs/fr/compiler.md +81 -46
- package/docs/fr/configuration.md +351 -149
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_analog.md +2 -2
- package/docs/fr/intlayer_with_angular.md +2 -2
- package/docs/fr/intlayer_with_astro.md +2 -2
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_fastify.md +1 -1
- package/docs/fr/intlayer_with_hono.md +1 -1
- package/docs/fr/intlayer_with_lynx+react.md +2 -2
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_nextjs_16.md +183 -7
- package/docs/fr/intlayer_with_nextjs_compiler.md +179 -3
- package/docs/fr/intlayer_with_react_native+expo.md +2 -2
- package/docs/fr/intlayer_with_react_router_v7.md +229 -3
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +237 -6
- package/docs/fr/intlayer_with_svelte_kit.md +158 -2
- package/docs/fr/intlayer_with_tanstack.md +159 -1
- package/docs/fr/intlayer_with_vite+preact.md +166 -10
- package/docs/fr/intlayer_with_vite+react.md +163 -7
- package/docs/fr/intlayer_with_vite+solid.md +165 -9
- package/docs/fr/intlayer_with_vite+svelte.md +159 -3
- package/docs/fr/intlayer_with_vite+vue.md +168 -12
- package/docs/fr/vs_code_extension.md +1 -1
- package/docs/hi/compiler.md +81 -46
- package/docs/hi/configuration.md +89 -65
- package/docs/hi/intlayer_with_analog.md +1 -1
- package/docs/hi/intlayer_with_angular.md +2 -2
- package/docs/hi/intlayer_with_astro.md +2 -2
- package/docs/hi/intlayer_with_lynx+react.md +2 -2
- package/docs/hi/intlayer_with_nextjs_16.md +174 -1
- package/docs/hi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/hi/intlayer_with_react_native+expo.md +2 -2
- package/docs/hi/intlayer_with_react_router_v7.md +224 -1
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/hi/intlayer_with_svelte_kit.md +158 -2
- package/docs/hi/intlayer_with_tanstack.md +159 -1
- package/docs/hi/intlayer_with_vite+preact.md +159 -3
- package/docs/hi/intlayer_with_vite+react.md +157 -1
- package/docs/hi/intlayer_with_vite+solid.md +159 -3
- package/docs/hi/intlayer_with_vite+svelte.md +159 -3
- package/docs/hi/intlayer_with_vite+vue.md +159 -3
- package/docs/hi/vs_code_extension.md +1 -1
- package/docs/id/compiler.md +84 -51
- package/docs/id/configuration.md +85 -65
- package/docs/id/intlayer_with_analog.md +2 -2
- package/docs/id/intlayer_with_angular.md +2 -2
- package/docs/id/intlayer_with_astro.md +2 -2
- package/docs/id/intlayer_with_lynx+react.md +2 -2
- package/docs/id/intlayer_with_nextjs_16.md +174 -1
- package/docs/id/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/id/intlayer_with_react_native+expo.md +2 -2
- package/docs/id/intlayer_with_react_router_v7.md +224 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/id/intlayer_with_svelte_kit.md +158 -2
- package/docs/id/intlayer_with_tanstack.md +159 -1
- package/docs/id/intlayer_with_vite+preact.md +159 -3
- package/docs/id/intlayer_with_vite+react.md +159 -3
- package/docs/id/intlayer_with_vite+solid.md +159 -3
- package/docs/id/intlayer_with_vite+svelte.md +159 -3
- package/docs/id/intlayer_with_vite+vue.md +159 -3
- package/docs/id/vs_code_extension.md +1 -1
- package/docs/it/compiler.md +81 -46
- package/docs/it/configuration.md +410 -208
- package/docs/it/intlayer_with_analog.md +2 -2
- package/docs/it/intlayer_with_angular.md +2 -2
- package/docs/it/intlayer_with_astro.md +2 -2
- package/docs/it/intlayer_with_lynx+react.md +2 -2
- package/docs/it/intlayer_with_nextjs_16.md +174 -1
- package/docs/it/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/it/intlayer_with_react_native+expo.md +2 -2
- package/docs/it/intlayer_with_react_router_v7.md +225 -2
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/it/intlayer_with_svelte_kit.md +158 -2
- package/docs/it/intlayer_with_tanstack.md +159 -1
- package/docs/it/intlayer_with_vite+preact.md +159 -3
- package/docs/it/intlayer_with_vite+react.md +159 -3
- package/docs/it/intlayer_with_vite+solid.md +161 -5
- package/docs/it/intlayer_with_vite+svelte.md +159 -3
- package/docs/it/intlayer_with_vite+vue.md +161 -5
- package/docs/it/vs_code_extension.md +1 -1
- package/docs/ja/compiler.md +94 -58
- package/docs/ja/configuration.md +90 -66
- package/docs/ja/intlayer_with_analog.md +2 -2
- package/docs/ja/intlayer_with_angular.md +2 -2
- package/docs/ja/intlayer_with_astro.md +2 -2
- package/docs/ja/intlayer_with_lynx+react.md +2 -2
- package/docs/ja/intlayer_with_nextjs_16.md +174 -1
- package/docs/ja/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ja/intlayer_with_react_native+expo.md +2 -2
- package/docs/ja/intlayer_with_react_router_v7.md +184 -394
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ja/intlayer_with_svelte_kit.md +119 -595
- package/docs/ja/intlayer_with_tanstack.md +131 -642
- package/docs/ja/intlayer_with_vite+preact.md +111 -1231
- package/docs/ja/intlayer_with_vite+react.md +129 -1304
- package/docs/ja/intlayer_with_vite+solid.md +161 -5
- package/docs/ja/intlayer_with_vite+svelte.md +159 -3
- package/docs/ja/intlayer_with_vite+vue.md +159 -3
- package/docs/ja/vs_code_extension.md +1 -1
- package/docs/ko/compiler.md +88 -52
- package/docs/ko/configuration.md +89 -65
- package/docs/ko/intlayer_with_analog.md +2 -2
- package/docs/ko/intlayer_with_angular.md +2 -2
- package/docs/ko/intlayer_with_astro.md +2 -2
- package/docs/ko/intlayer_with_lynx+react.md +2 -2
- package/docs/ko/intlayer_with_nextjs_16.md +174 -1
- package/docs/ko/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ko/intlayer_with_react_native+expo.md +2 -2
- package/docs/ko/intlayer_with_react_router_v7.md +225 -2
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ko/intlayer_with_svelte_kit.md +158 -2
- package/docs/ko/intlayer_with_tanstack.md +159 -1
- package/docs/ko/intlayer_with_vite+preact.md +159 -3
- package/docs/ko/intlayer_with_vite+react.md +157 -1
- package/docs/ko/intlayer_with_vite+solid.md +161 -5
- package/docs/ko/intlayer_with_vite+svelte.md +159 -3
- package/docs/ko/intlayer_with_vite+vue.md +159 -3
- package/docs/ko/vs_code_extension.md +1 -1
- package/docs/pl/compiler.md +84 -51
- package/docs/pl/configuration.md +85 -57
- package/docs/pl/intlayer_with_analog.md +2 -2
- package/docs/pl/intlayer_with_angular.md +2 -2
- package/docs/pl/intlayer_with_astro.md +2 -2
- package/docs/pl/intlayer_with_lynx+react.md +2 -2
- package/docs/pl/intlayer_with_nextjs_16.md +174 -1
- package/docs/pl/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pl/intlayer_with_react_native+expo.md +2 -2
- package/docs/pl/intlayer_with_react_router_v7.md +224 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pl/intlayer_with_svelte_kit.md +158 -2
- package/docs/pl/intlayer_with_tanstack.md +159 -1
- package/docs/pl/intlayer_with_vite+preact.md +158 -2
- package/docs/pl/intlayer_with_vite+react.md +159 -3
- package/docs/pl/intlayer_with_vite+solid.md +159 -3
- package/docs/pl/intlayer_with_vite+svelte.md +159 -3
- package/docs/pl/intlayer_with_vite+vue.md +161 -5
- package/docs/pl/vs_code_extension.md +1 -1
- package/docs/pt/compiler.md +81 -46
- package/docs/pt/configuration.md +399 -199
- package/docs/pt/intlayer_with_analog.md +2 -2
- package/docs/pt/intlayer_with_angular.md +2 -2
- package/docs/pt/intlayer_with_astro.md +2 -2
- package/docs/pt/intlayer_with_lynx+react.md +2 -2
- package/docs/pt/intlayer_with_nextjs_16.md +174 -1
- package/docs/pt/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pt/intlayer_with_react_native+expo.md +2 -2
- package/docs/pt/intlayer_with_react_router_v7.md +224 -1
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pt/intlayer_with_svelte_kit.md +158 -2
- package/docs/pt/intlayer_with_tanstack.md +159 -1
- package/docs/pt/intlayer_with_vite+preact.md +158 -2
- package/docs/pt/intlayer_with_vite+react.md +157 -1
- package/docs/pt/intlayer_with_vite+solid.md +159 -3
- package/docs/pt/intlayer_with_vite+svelte.md +159 -3
- package/docs/pt/intlayer_with_vite+vue.md +159 -3
- package/docs/pt/vs_code_extension.md +1 -1
- package/docs/ru/compiler.md +90 -57
- package/docs/ru/configuration.md +78 -67
- package/docs/ru/intlayer_with_analog.md +2 -2
- package/docs/ru/intlayer_with_angular.md +2 -2
- package/docs/ru/intlayer_with_astro.md +2 -2
- package/docs/ru/intlayer_with_lynx+react.md +2 -2
- package/docs/ru/intlayer_with_nextjs_16.md +174 -1
- package/docs/ru/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ru/intlayer_with_react_native+expo.md +2 -2
- package/docs/ru/intlayer_with_react_router_v7.md +224 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ru/intlayer_with_svelte_kit.md +158 -2
- package/docs/ru/intlayer_with_tanstack.md +159 -1
- package/docs/ru/intlayer_with_vite+preact.md +159 -3
- package/docs/ru/intlayer_with_vite+react.md +157 -1
- package/docs/ru/intlayer_with_vite+solid.md +159 -3
- package/docs/ru/intlayer_with_vite+svelte.md +159 -3
- package/docs/ru/intlayer_with_vite+vue.md +159 -3
- package/docs/ru/vs_code_extension.md +1 -1
- package/docs/tr/compiler.md +85 -52
- package/docs/tr/configuration.md +85 -61
- package/docs/tr/intlayer_with_analog.md +2 -2
- package/docs/tr/intlayer_with_angular.md +2 -2
- package/docs/tr/intlayer_with_astro.md +2 -2
- package/docs/tr/intlayer_with_lynx+react.md +2 -2
- package/docs/tr/intlayer_with_nextjs_16.md +174 -1
- package/docs/tr/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +6 -14
- package/docs/tr/intlayer_with_react_native+expo.md +2 -2
- package/docs/tr/intlayer_with_react_router_v7.md +224 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/tr/intlayer_with_svelte_kit.md +158 -2
- package/docs/tr/intlayer_with_tanstack.md +159 -1
- package/docs/tr/intlayer_with_vite+preact.md +159 -3
- package/docs/tr/intlayer_with_vite+react.md +159 -3
- package/docs/tr/intlayer_with_vite+solid.md +159 -3
- package/docs/tr/intlayer_with_vite+svelte.md +159 -3
- package/docs/tr/intlayer_with_vite+vue.md +159 -3
- package/docs/tr/vs_code_extension.md +1 -1
- package/docs/uk/compiler.md +96 -61
- package/docs/uk/configuration.md +85 -57
- package/docs/uk/intlayer_with_analog.md +2 -2
- package/docs/uk/intlayer_with_angular.md +2 -2
- package/docs/uk/intlayer_with_astro.md +2 -2
- package/docs/uk/intlayer_with_lynx+react.md +2 -2
- package/docs/uk/intlayer_with_nextjs_16.md +174 -1
- package/docs/uk/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +4 -22
- package/docs/uk/intlayer_with_react_native+expo.md +2 -2
- package/docs/uk/intlayer_with_react_router_v7.md +224 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/uk/intlayer_with_svelte_kit.md +157 -1
- package/docs/uk/intlayer_with_tanstack.md +159 -1
- package/docs/uk/intlayer_with_vite+preact.md +159 -3
- package/docs/uk/intlayer_with_vite+react.md +157 -1
- package/docs/uk/intlayer_with_vite+solid.md +159 -3
- package/docs/uk/intlayer_with_vite+svelte.md +159 -3
- package/docs/uk/intlayer_with_vite+vue.md +159 -3
- package/docs/uk/vs_code_extension.md +1 -1
- package/docs/vi/compiler.md +85 -50
- package/docs/vi/configuration.md +87 -59
- package/docs/vi/intlayer_with_analog.md +2 -2
- package/docs/vi/intlayer_with_angular.md +2 -2
- package/docs/vi/intlayer_with_astro.md +2 -2
- package/docs/vi/intlayer_with_lynx+react.md +2 -2
- package/docs/vi/intlayer_with_nextjs_16.md +174 -1
- package/docs/vi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/vi/intlayer_with_react_native+expo.md +2 -2
- package/docs/vi/intlayer_with_react_router_v7.md +224 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/vi/intlayer_with_svelte_kit.md +158 -2
- package/docs/vi/intlayer_with_tanstack.md +159 -1
- package/docs/vi/intlayer_with_vite+preact.md +159 -3
- package/docs/vi/intlayer_with_vite+react.md +159 -3
- package/docs/vi/intlayer_with_vite+solid.md +159 -3
- package/docs/vi/intlayer_with_vite+svelte.md +159 -3
- package/docs/vi/intlayer_with_vite+vue.md +159 -3
- package/docs/vi/vs_code_extension.md +1 -1
- package/docs/zh/compiler.md +84 -49
- package/docs/zh/configuration.md +82 -58
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_analog.md +2 -2
- package/docs/zh/intlayer_with_angular.md +2 -2
- package/docs/zh/intlayer_with_astro.md +2 -2
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_fastify.md +1 -1
- package/docs/zh/intlayer_with_hono.md +1 -1
- package/docs/zh/intlayer_with_lynx+react.md +2 -2
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_nextjs_16.md +174 -1
- package/docs/zh/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/zh/intlayer_with_react_native+expo.md +2 -2
- package/docs/zh/intlayer_with_react_router_v7.md +227 -4
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +228 -4
- package/docs/zh/intlayer_with_svelte_kit.md +158 -2
- package/docs/zh/intlayer_with_tanstack.md +159 -1
- package/docs/zh/intlayer_with_vite+preact.md +161 -5
- package/docs/zh/intlayer_with_vite+react.md +157 -1
- package/docs/zh/intlayer_with_vite+solid.md +163 -7
- package/docs/zh/intlayer_with_vite+svelte.md +159 -3
- package/docs/zh/intlayer_with_vite+vue.md +162 -6
- package/docs/zh/vs_code_extension.md +2 -2
- package/package.json +8 -8
- package/docs/update_docs.py +0 -65
package/docs/vi/compiler.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2026-03-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Trình Biên Dịch Intlayer | Trích Xuất Nội Dung Tự Động cho i18n
|
|
5
5
|
description: Tự động hóa quy trình quốc tế hóa của bạn với Trình Biên Dịch Intlayer. Trích xuất nội dung trực tiếp từ các component để i18n nhanh hơn và hiệu quả hơn trong Vite, Next.js và nhiều hơn nữa.
|
|
6
6
|
keywords:
|
|
@@ -22,7 +22,7 @@ slugs:
|
|
|
22
22
|
history:
|
|
23
23
|
- version: 8.2.0
|
|
24
24
|
date: 2026-03-09
|
|
25
|
-
changes:
|
|
25
|
+
changes: Cập nhật các tùy chọn trình biên dịch, thêm hỗ trợ FilePathPattern
|
|
26
26
|
- version: 8.1.7
|
|
27
27
|
date: 2026-02-25
|
|
28
28
|
changes: Cập nhật các tùy chọn trình biên dịch
|
|
@@ -136,9 +136,9 @@ const {
|
|
|
136
136
|
module.exports = {
|
|
137
137
|
presets: ["next/babel"],
|
|
138
138
|
plugins: [
|
|
139
|
-
//
|
|
139
|
+
// Trích xuất nội dung từ các component vào từ điển
|
|
140
140
|
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
141
|
-
//
|
|
141
|
+
// Tối ưu hóa việc import bằng cách thay thế useIntlayer bằng việc import trực tiếp từ điển
|
|
142
142
|
[intlayerOptimizeBabelPlugin, getOptimizePluginOptions()],
|
|
143
143
|
],
|
|
144
144
|
};
|
|
@@ -149,73 +149,85 @@ Cấu hình này đảm bảo rằng nội dung được khai báo trong các co
|
|
|
149
149
|
See complete tutorial: [Intlayer Compiler with Next.js](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_compiler.md)
|
|
150
150
|
|
|
151
151
|
</Tab>
|
|
152
|
+
</Tabs>
|
|
152
153
|
|
|
153
154
|
### Cấu hình tùy chỉnh
|
|
154
155
|
|
|
155
156
|
Để tùy chỉnh hành vi của trình biên dịch, bạn có thể cập nhật tệp `intlayer.config.ts` trong thư mục gốc của dự án.
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
````ts fileName="intlayer.config.ts"
|
|
158
159
|
import { type IntlayerConfig, Locales } from "intlayer";
|
|
159
160
|
|
|
160
161
|
const config: IntlayerConfig = {
|
|
161
162
|
compiler: {
|
|
162
163
|
/**
|
|
164
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
163
165
|
* Đặt thành 'build-only' để bỏ qua trình biên dịch trong quá trình phát triển và tăng tốc thời gian khởi động.
|
|
164
166
|
*/
|
|
165
167
|
enabled: true,
|
|
166
168
|
|
|
167
169
|
/**
|
|
168
|
-
*
|
|
170
|
+
* Xác định đường dẫn tệp đầu ra. Thay thế `outputDir`.
|
|
171
|
+
*
|
|
172
|
+
* - Các đường dẫn bắt đầu bằng `./` được giải quyết tương đối so với thư mục component.
|
|
173
|
+
* - Các đường dẫn bắt đầu bằng `/` được giải quyết tương đối so với thư mục gốc của dự án (`baseDir`).
|
|
174
|
+
*
|
|
175
|
+
* - Việc bao gồm biến `{{locale}}` trong đường dẫn sẽ cho phép tạo các từ điển được tách biệt theo ngôn ngữ.
|
|
176
|
+
*
|
|
177
|
+
* Ví dụ:
|
|
178
|
+
* ```ts
|
|
179
|
+
* {
|
|
180
|
+
* // Tạo tệp .content.ts đa ngôn ngữ bên cạnh component
|
|
181
|
+
* output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
182
|
+
*
|
|
183
|
+
* // output: './{{fileName}}{{extension}}', // Cách viết tương đương bằng template string
|
|
184
|
+
* }
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* ```ts
|
|
188
|
+
* {
|
|
189
|
+
* // Tạo tệp JSON tập trung theo ngôn ngữ trong thư mục gốc của dự án
|
|
190
|
+
* output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
|
|
191
|
+
*
|
|
192
|
+
* // output: '/locales/{{locale}}/{{key}}.content.json', // Cách viết tương đương bằng template string
|
|
193
|
+
* }
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* Danh sách biến:
|
|
197
|
+
* - `fileName`: Tên tệp.
|
|
198
|
+
* - `key`: Khóa nội dung.
|
|
199
|
+
* - `locale`: Ngôn ngữ nội dung.
|
|
200
|
+
* - `extension`: Phần mở rộng tệp.
|
|
201
|
+
* - `componentFileName`: Tên tệp component.
|
|
202
|
+
* - `componentExtension`: Phần mở rộng tệp component.
|
|
203
|
+
* - `format`: Định dạng từ điển.
|
|
204
|
+
* - `componentFormat`: Định dạng từ điển component.
|
|
205
|
+
* - `componentDirPath`: Đường dẫn thư mục component.
|
|
169
206
|
*/
|
|
170
|
-
|
|
171
|
-
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
172
|
-
"!**/node_modules/**",
|
|
173
|
-
],
|
|
207
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
174
208
|
|
|
175
209
|
/**
|
|
176
|
-
*
|
|
177
|
-
|
|
178
|
-
excludePattern: ["**/node_modules/**"],
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Thư mục đầu ra cho các từ điển được tối ưu hóa.
|
|
210
|
+
* Cho biết liệu các component có nên được lưu sau khi được chuyển đổi hay không.
|
|
211
|
+
* Bằng cách đó, trình biên dịch có thể được chạy một lần duy nhất để chuyển đổi ứng dụng, và sau đó nó có thể được gỡ bỏ.
|
|
182
212
|
*/
|
|
183
|
-
|
|
213
|
+
saveComponents: false,
|
|
184
214
|
|
|
185
215
|
/**
|
|
186
|
-
* Chỉ chèn nội dung vào tệp đã tạo
|
|
216
|
+
* Chỉ chèn nội dung vào tệp đã tạo. Hữu ích cho đầu ra JSON i18next hoặc ICU MessageFormat cho mỗi ngôn ngữ.
|
|
217
|
+
*
|
|
218
|
+
* - `output: ({ locale, key }) => `./locale/${locale}/${key}.json`,`
|
|
187
219
|
*/
|
|
188
220
|
noMetadata: false,
|
|
189
221
|
|
|
190
222
|
/**
|
|
191
223
|
* Tiền tố khóa từ điển
|
|
192
224
|
*/
|
|
193
|
-
dictionaryKeyPrefix: "", //
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Cho biết liệu các thành phần có nên được lưu sau khi được chuyển đổi hay không.
|
|
197
|
-
* Bằng cách đó, trình biên dịch có thể được chạy một lần duy nhất để chuyển đổi ứng dụng, và sau đó nó có thể được gỡ bỏ.
|
|
198
|
-
*/
|
|
199
|
-
saveComponents: false,
|
|
225
|
+
dictionaryKeyPrefix: "", // Thêm một tiền tố tùy chọn cho các khóa từ điển được trích xuất
|
|
200
226
|
},
|
|
201
227
|
};
|
|
202
228
|
|
|
203
229
|
export default config;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
### Điền các bản dịch còn thiếu
|
|
207
|
-
|
|
208
|
-
Intlayer cung cấp một công cụ CLI để giúp bạn điền các bản dịch còn thiếu. Bạn có thể sử dụng lệnh `intlayer` để kiểm tra và điền các bản dịch còn thiếu từ mã của mình.
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
npx intlayer test # Kiểm tra xem có thiếu bản dịch không
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
npx intlayer fill # Điền các bản dịch còn thiếu
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
> Để biết thêm chi tiết, hãy tham khảo [tài liệu CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/ci.md)
|
|
230
|
+
````
|
|
219
231
|
|
|
220
232
|
### Tham khảo cấu hình trình biên dịch
|
|
221
233
|
|
|
@@ -225,36 +237,37 @@ Các thuộc tính sau có thể được cấu hình trong khối `compiler` c
|
|
|
225
237
|
- _Loại_: `boolean | 'build-only'`
|
|
226
238
|
- _Mặc định_: `true`
|
|
227
239
|
- _Mô tả_: Cho biết trình biên dịch có nên được bật hay không.
|
|
240
|
+
|
|
228
241
|
- **dictionaryKeyPrefix**:
|
|
229
242
|
- _Loại_: `string`
|
|
230
|
-
- _Mặc định_: `'
|
|
243
|
+
- _Mặc định_: `''`
|
|
231
244
|
- _Mô tả_: Tiền tố cho các khóa từ điển được trích xuất.
|
|
245
|
+
|
|
232
246
|
- **transformPattern**:
|
|
233
247
|
- _Loại_: `string | string[]`
|
|
234
248
|
- _Mặc định_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
-
- _Mô tả_: Các mẫu để duyệt mã để tối ưu hóa.
|
|
249
|
+
- _Mô tả_: (Đã lỗi thời: hãy sử dụng `build.traversePattern` thay thế) Các mẫu để duyệt mã để tối ưu hóa.
|
|
250
|
+
|
|
236
251
|
- **excludePattern**:
|
|
237
252
|
- _Loại_: `string | string[]`
|
|
238
253
|
- _Mặc định_: `['**/node_modules/**']`
|
|
239
|
-
- _Mô tả_: Các mẫu để loại trừ khỏi quá trình tối ưu hóa.
|
|
240
|
-
- **outputDir** (Deprecated):
|
|
241
|
-
- _Loại_: `string`
|
|
242
|
-
- _Mặc định_: `'compiler'`
|
|
243
|
-
- _Mô tả_: Thư mục nơi lưu trữ các từ điển được trích xuất.
|
|
254
|
+
- _Mô tả_: (Đã lỗi thời: hãy sử dụng `build.traversePattern` thay thế) Các mẫu để loại trừ khỏi quá trình tối ưu hóa.
|
|
244
255
|
|
|
245
256
|
- **output**:
|
|
246
257
|
- _Loại_: `FilePathPattern`
|
|
247
258
|
- _Mặc định_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
259
|
- _Mô tả_: Xác định đường dẫn tệp đầu ra. Thay thế `outputDir`. Xử lý các biến động như `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}` và `{{componentFormat}}`. Có thể được đặt dưới dạng chuỗi bằng định dạng `'my/{{var}}/path'` hoặc dưới dạng hàm.
|
|
249
260
|
- _Ghi chú_: Các đường dẫn `./**/*` được giải quyết tương đối so với component. Các đường dẫn `/**/*` được giải quyết tương đối so với `baseDir` của Intlayer.
|
|
261
|
+
- _Ghi chú_: Nếu ngôn ngữ được xác định trong đường dẫn, các từ điển sẽ được tạo cho mỗi ngôn ngữ.
|
|
250
262
|
- _Ví dụ_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
263
|
|
|
252
264
|
- **noMetadata**:
|
|
253
265
|
- _Loại_: `boolean`
|
|
254
266
|
- _Mặc định_: `false`
|
|
255
|
-
- _Mô tả_: Cho biết liệu siêu dữ liệu có nên được lưu trong tệp hay không. Nếu true, trình biên dịch sẽ không lưu siêu dữ liệu của từ điển (khóa, trình bao bọc nội dung).
|
|
267
|
+
- _Mô tả_: Cho biết liệu siêu dữ liệu có nên được lưu trong tệp hay không. Nếu true, trình biên dịch sẽ không lưu siêu dữ liệu của từ điển (khóa, trình bao bọc nội dung). Hữu ích cho đầu ra JSON i18next hoặc ICU MessageFormat cho mỗi ngôn ngữ.
|
|
256
268
|
- _Ghi chú_: Hữu ích nếu được sử dụng với plugin `loadJSON`.
|
|
257
|
-
- _Ví dụ_:
|
|
269
|
+
- _Ví dụ_:
|
|
270
|
+
Nếu `true`:
|
|
258
271
|
```json
|
|
259
272
|
{
|
|
260
273
|
"key": "value"
|
|
@@ -273,4 +286,26 @@ Các thuộc tính sau có thể được cấu hình trong khối `compiler` c
|
|
|
273
286
|
- **saveComponents**:
|
|
274
287
|
- _Loại_: `boolean`
|
|
275
288
|
- _Mặc định_: `false`
|
|
276
|
-
- _Mô tả_: Cho biết liệu các
|
|
289
|
+
- _Mô tả_: Cho biết liệu các component có nên được lưu sau khi được chuyển đổi hay không.
|
|
290
|
+
|
|
291
|
+
### Điền các bản dịch còn thiếu
|
|
292
|
+
|
|
293
|
+
Intlayer cung cấp một công cụ CLI để giúp bạn điền các bản dịch còn thiếu. Bạn có thể sử dụng lệnh `intlayer` để kiểm tra và điền các bản dịch còn thiếu từ mã của mình.
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npx intlayer test # Kiểm tra xem có thiếu bản dịch không
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
npx intlayer fill # Điền các bản dịch còn thiếu
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Trích xuất
|
|
304
|
+
|
|
305
|
+
Intlayer cung cấp một công cụ CLI để giúp bạn trích xuất nội dung từ mã của mình. Bạn có thể sử dụng lệnh `intlayer extract` để trích xuất nội dung từ mã của mình.
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
npx intlayer extract
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
> Để biết thêm chi tiết, hãy tham khảo [tài liệu CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/index.md)
|
package/docs/vi/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-03-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Cấu hình
|
|
5
5
|
description: Tìm hiểu cách cấu hình Intlayer cho ứng dụng của bạn. Hiểu các thiết lập và tùy chọn khác nhau để tùy chỉnh Intlayer theo nhu cầu của bạn.
|
|
6
6
|
keywords:
|
|
@@ -15,7 +15,7 @@ slugs:
|
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
17
|
- version: 8.3.0
|
|
18
|
-
|
|
18
|
+
date: 2026-03-11
|
|
19
19
|
changes: Di chuyển 'baseDir' từ cấu hình 'content' sang cấu hình 'system'
|
|
20
20
|
- version: 8.2.0
|
|
21
21
|
date: 2026-03-09
|
|
@@ -110,7 +110,7 @@ Intlayer chấp nhận các định dạng tệp cấu hình JSON, JS, MJS và T
|
|
|
110
110
|
|
|
111
111
|
## Ví dụ tệp cấu hình
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
````typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
114
114
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
115
115
|
import { nextjsRewrite } from "intlayer/routing";
|
|
116
116
|
import { z } from "zod";
|
|
@@ -208,7 +208,7 @@ const config: IntlayerConfig = {
|
|
|
208
208
|
* Options: 'cookie', 'localStorage', 'sessionStorage', 'header', or an array of these.
|
|
209
209
|
* Default: ['cookie', 'header']
|
|
210
210
|
*/
|
|
211
|
-
storage: "cookie",
|
|
211
|
+
storage: ["cookie", "header"],
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Base path for the application URLs.
|
|
@@ -274,13 +274,13 @@ const config: IntlayerConfig = {
|
|
|
274
274
|
editor: {
|
|
275
275
|
/**
|
|
276
276
|
* Whether the visual editor is enabled.
|
|
277
|
-
* Default:
|
|
277
|
+
* Default: false
|
|
278
278
|
*/
|
|
279
279
|
enabled: true,
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
282
|
* URL of your application for origin validation.
|
|
283
|
-
* Default: "
|
|
283
|
+
* Default: ""
|
|
284
284
|
*/
|
|
285
285
|
applicationURL: "http://localhost:3000",
|
|
286
286
|
|
|
@@ -345,6 +345,17 @@ const config: IntlayerConfig = {
|
|
|
345
345
|
* Base URL for the AI API.
|
|
346
346
|
*/
|
|
347
347
|
baseURL: "http://localhost:3000",
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Tuần tự hóa dữ liệu
|
|
351
|
+
*
|
|
352
|
+
* Tùy chọn:
|
|
353
|
+
* - "json": Tiêu chuẩn, đáng tin cậy; tiêu tốn nhiều token hơn.
|
|
354
|
+
* - "toon": Ít token hơn, kém nhất quán hơn JSON.
|
|
355
|
+
*
|
|
356
|
+
* Mặc định: "json"
|
|
357
|
+
*/
|
|
358
|
+
dataSerialization: "json",
|
|
348
359
|
},
|
|
349
360
|
|
|
350
361
|
/**
|
|
@@ -444,42 +455,70 @@ const config: IntlayerConfig = {
|
|
|
444
455
|
compiler: {
|
|
445
456
|
/**
|
|
446
457
|
* Cho biết trình biên dịch có nên được bật hay không.
|
|
458
|
+
*
|
|
459
|
+
* - false : Vô hiệu hóa trình biên dịch.
|
|
460
|
+
* - true : Kích hoạt trình biên dịch.
|
|
461
|
+
* - "build-only" : Bỏ qua trình biên dịch trong quá trình phát triển để tăng tốc thời gian khởi động.
|
|
462
|
+
*
|
|
463
|
+
* Giá trị mặc định : false
|
|
447
464
|
*/
|
|
448
465
|
enabled: true,
|
|
449
466
|
|
|
450
467
|
/**
|
|
451
|
-
*
|
|
468
|
+
* Xác định đường dẫn tệp đầu ra. Thay thế `outputDir`.
|
|
469
|
+
*
|
|
470
|
+
* - Các đường dẫn bắt đầu bằng `./` được giải quyết tương đối so với thư mục component.
|
|
471
|
+
* - Các đường dẫn bắt đầu bằng `/` được giải quyết tương đối so với thư mục gốc của dự án (`baseDir`).
|
|
472
|
+
*
|
|
473
|
+
* - Việc bao gồm biến `{{locale}}` trong đường dẫn sẽ cho phép tạo các từ điển được tách biệt theo ngôn ngữ.
|
|
474
|
+
*
|
|
475
|
+
* Ví dụ:
|
|
476
|
+
* ```ts
|
|
477
|
+
* {
|
|
478
|
+
* // Tạo tệp .content.ts đa ngôn ngữ bên cạnh component
|
|
479
|
+
* output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
480
|
+
*
|
|
481
|
+
* // output: './{{fileName}}{{extension}}', // Cách viết tương đương bằng template string
|
|
482
|
+
* }
|
|
483
|
+
* ```
|
|
484
|
+
*
|
|
485
|
+
* ```ts
|
|
486
|
+
* {
|
|
487
|
+
* // Tạo tệp JSON tập trung theo ngôn ngữ trong thư mục gốc của dự án
|
|
488
|
+
* output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
|
|
489
|
+
*
|
|
490
|
+
* // output: '/locales/{{locale}}/{{key}}.content.json', // Cách viết tương đương bằng template string
|
|
491
|
+
* }
|
|
492
|
+
* ```
|
|
493
|
+
*
|
|
494
|
+
* Danh sách biến:
|
|
495
|
+
* - `fileName`: Tên tệp.
|
|
496
|
+
* - `key`: Khóa nội dung.
|
|
497
|
+
* - `locale`: Ngôn ngữ nội dung.
|
|
498
|
+
* - `extension`: Phần mở rộng tệp.
|
|
499
|
+
* - `componentFileName`: Tên tệp component.
|
|
500
|
+
* - `componentExtension`: Phần mở rộng tệp component.
|
|
501
|
+
* - `format`: Định dạng từ điển.
|
|
502
|
+
* - `componentFormat`: Định dạng từ điển component.
|
|
503
|
+
* - `componentDirPath`: Đường dẫn thư mục component.
|
|
452
504
|
*/
|
|
453
|
-
|
|
454
|
-
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
455
|
-
"!**/node_modules/**",
|
|
456
|
-
],
|
|
505
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
457
506
|
|
|
458
507
|
/**
|
|
459
|
-
*
|
|
460
|
-
|
|
461
|
-
excludePattern: ["**/node_modules/**"],
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Thư mục đầu ra cho các từ điển được tối ưu hóa.
|
|
508
|
+
* Cho biết liệu các thành phần có nên được lưu sau khi được chuyển đổi hay không.
|
|
509
|
+
* Bằng cách đó, trình biên dịch có thể được chạy một lần duy nhất để chuyển đổi ứng dụng, và sau đó nó có thể được gỡ bỏ.
|
|
465
510
|
*/
|
|
466
|
-
|
|
511
|
+
saveComponents: false,
|
|
467
512
|
|
|
468
513
|
/**
|
|
469
|
-
* Chỉ chèn nội dung vào tệp đã tạo
|
|
514
|
+
* Chỉ chèn nội dung vào tệp đã tạo. Hữu ích cho đầu ra JSON i18next hoặc ICU MessageFormat theo từng ngôn ngữ.
|
|
470
515
|
*/
|
|
471
516
|
noMetadata: false,
|
|
472
517
|
|
|
473
518
|
/**
|
|
474
519
|
* Tiền tố khóa từ điển
|
|
475
520
|
*/
|
|
476
|
-
dictionaryKeyPrefix: "", //
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Cho biết liệu các thành phần có nên được lưu sau khi được chuyển đổi hay không.
|
|
480
|
-
* Bằng cách đó, trình biên dịch có thể được chạy một lần duy nhất để chuyển đổi ứng dụng, và sau đó nó có thể được gỡ bỏ.
|
|
481
|
-
*/
|
|
482
|
-
saveComponents: false,
|
|
521
|
+
dictionaryKeyPrefix: "", // Thêm tiền tố tùy chọn cho các khóa từ điển được trích xuất
|
|
483
522
|
},
|
|
484
523
|
|
|
485
524
|
/**
|
|
@@ -498,7 +537,7 @@ const config: IntlayerConfig = {
|
|
|
498
537
|
};
|
|
499
538
|
|
|
500
539
|
export default config;
|
|
501
|
-
|
|
540
|
+
````
|
|
502
541
|
|
|
503
542
|
## Tham chiếu Cấu hình
|
|
504
543
|
|
|
@@ -1120,24 +1159,6 @@ Các tùy chọn build áp dụng cho các plugin `@intlayer/babel` và `@intlay
|
|
|
1120
1159
|
- _Lưu ý_: Tùy chọn này dựa vào các plugin `@intlayer/babel` và `@intlayer/swc`.
|
|
1121
1160
|
- _Lưu ý_: Đảm bảo tất cả các khóa được khai báo tĩnh trong các lệnh gọi `useIntlayer`. Ví dụ: `useIntlayer('navbar')`.
|
|
1122
1161
|
|
|
1123
|
-
- **importMode**:
|
|
1124
|
-
- _Ghi chú_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1125
|
-
- _Kiểu_: `'static' | 'dynamic' | 'fetch'`
|
|
1126
|
-
- _Mặc định_: `'static'`
|
|
1127
|
-
- _Mô tả_: Điều khiển cách các từ điển được nhập.
|
|
1128
|
-
- _Ví dụ_: `'dynamic'`
|
|
1129
|
-
- _Lưu ý_: Các chế độ có sẵn:
|
|
1130
|
-
- "static": Các từ điển được nhập một cách tĩnh. Thay thế `useIntlayer` bằng `useDictionary`.
|
|
1131
|
-
- "dynamic": Các từ điển được nhập động sử dụng Suspense. Thay thế `useIntlayer` bằng `useDictionaryDynamic`.
|
|
1132
|
-
- "fetch": Các từ điển được lấy động bằng cách sử dụng API đồng bộ trực tiếp (live sync API). Thay thế `useIntlayer` bằng `useDictionaryDynamic`.
|
|
1133
|
-
- _Lưu ý_: Việc nhập động dựa vào Suspense và có thể ảnh hưởng nhẹ đến hiệu suất render.
|
|
1134
|
-
- _Lưu ý_: Nếu tắt, tất cả các locale sẽ được tải cùng một lúc, ngay cả khi chúng không được sử dụng.
|
|
1135
|
-
- _Lưu ý_: Tùy chọn này dựa vào các plugin `@intlayer/babel` và `@intlayer/swc`.
|
|
1136
|
-
- _Lưu ý_: Đảm bảo tất cả các khóa được khai báo tĩnh trong các lệnh gọi `useIntlayer`. Ví dụ: `useIntlayer('navbar')`.
|
|
1137
|
-
- _Lưu ý_: Tùy chọn này sẽ bị bỏ qua nếu `optimize` bị tắt.
|
|
1138
|
-
- _Lưu ý_: Nếu được đặt thành "live", chỉ những từ điển bao gồm nội dung từ xa và được đánh dấu là "live" mới được chuyển đổi sang chế độ live. Các từ điển khác sẽ được nhập động dưới dạng chế độ "dynamic" để tối ưu số lượng truy vấn fetch và hiệu suất tải.
|
|
1139
|
-
- _Lưu ý_: Chế độ live sẽ sử dụng live sync API để lấy các từ điển. Nếu cuộc gọi API thất bại, các từ điển sẽ được nhập động dưới dạng chế độ "dynamic".
|
|
1140
|
-
- _Lưu ý_: Tùy chọn này sẽ không ảnh hưởng đến các hàm `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` và `useDictionaryDynamic`.
|
|
1141
1162
|
- **checkTypes**:
|
|
1142
1163
|
- _Loại_: `boolean`
|
|
1143
1164
|
- _Mặc định_: `false`
|
|
@@ -1177,7 +1198,7 @@ Các cài đặt kiểm soát trình biên dịch Intlayer, trình biên dịch
|
|
|
1177
1198
|
|
|
1178
1199
|
- **dictionaryKeyPrefix**:
|
|
1179
1200
|
- _Kiểu_: `string`
|
|
1180
|
-
- _Mặc định_: `'
|
|
1201
|
+
- _Mặc định_: `''`
|
|
1181
1202
|
- _Mô tả_: Tiền tố cho các khóa từ điển được trích xuất.
|
|
1182
1203
|
- _Ví dụ_: `'my-key-'`
|
|
1183
1204
|
- _Lưu ý_: Khi từ điển được trích xuất, khóa được tạo dựa trên tên tệp. Tiền tố này được thêm vào khóa đã tạo để ngăn chặn xung đột.
|
|
@@ -1201,30 +1222,37 @@ Các cài đặt kiểm soát trình biên dịch Intlayer, trình biên dịch
|
|
|
1201
1222
|
- _Mô tả_: Các mẫu xác định những tệp nào sẽ bị loại trừ trong quá trình tối ưu hóa.
|
|
1202
1223
|
- _Ví dụ_: `['**/node_modules/**', '!**/node_modules/react/**']`
|
|
1203
1224
|
|
|
1204
|
-
- **outputDir**:
|
|
1205
|
-
- _Kiểu_: `string`
|
|
1206
|
-
- _Mặc định_: `'compiler'`
|
|
1207
|
-
- _Mô tả_: Thư mục nơi các từ điển trích xuất sẽ được lưu trữ, tương đối so với đường dẫn gốc dự án của bạn.
|
|
1208
|
-
|
|
1209
1225
|
- **output**:
|
|
1210
|
-
-
|
|
1211
|
-
- _Mặc định_: `
|
|
1212
|
-
- _Mô tả_: Xác định đường dẫn tệp đầu ra. Thay thế `outputDir`.
|
|
1213
|
-
-
|
|
1214
|
-
-
|
|
1226
|
+
- _Kiểu_: `FilePathPattern`
|
|
1227
|
+
- _Mặc định_: `undefined`
|
|
1228
|
+
- _Mô tả_: Xác định đường dẫn tệp đầu ra. Thay thế `outputDir`. Hỗ trợ các biến động thông qua template string hoặc hàm. Các biến được hỗ trợ: `{{fileName}}`, `{{key}}`, `{{locale}}`, `{{extension}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{format}}`, `{{componentFormat}}`, và `{{componentDirPath}}`.
|
|
1229
|
+
- _Lưu ý_: Các đường dẫn bắt đầu bằng `./` được giải quyết tương đối so với thư mục component. Các đường dẫn bắt đầu bằng `/` được giải quyết tương đối so với thư mục gốc của dự án (`baseDir`).
|
|
1230
|
+
- _Lưu ý_: Việc bao gồm biến `{{locale}}` trong đường dẫn sẽ cho phép tạo các từ điển được tách biệt theo ngôn ngữ.
|
|
1231
|
+
- _Ví dụ_:
|
|
1232
|
+
- **Tạo các tệp đa ngôn ngữ bên cạnh component**:
|
|
1233
|
+
- Chuỗi: `'./{{fileName}}{{extension}}'`
|
|
1234
|
+
- Hàm: `({ fileName, extension }) => \`./${fileName}${extension}\``
|
|
1235
|
+
|
|
1236
|
+
- **Xuất các tệp JSON tập trung cho mỗi ngôn ngữ**:
|
|
1237
|
+
- Chuỗi: `'/locales/{{locale}}/{{key}}.content.json'`
|
|
1238
|
+
- Hàm: `({ key, locale }) => \`/locales/${locale}/${key}.content.json\``
|
|
1215
1239
|
|
|
1216
1240
|
- **noMetadata**:
|
|
1217
|
-
-
|
|
1241
|
+
- _Kiểu_: `boolean`
|
|
1218
1242
|
- _Mặc định_: `false`
|
|
1219
|
-
- _Mô tả_: Cho biết liệu siêu dữ liệu có nên được lưu trong tệp hay không. Nếu true, trình biên dịch sẽ không lưu siêu dữ liệu của từ điển (khóa, trình bao bọc nội dung).
|
|
1243
|
+
- _Mô tả_: Cho biết liệu siêu dữ liệu có nên được lưu trong tệp hay không. Nếu true, trình biên dịch sẽ không lưu siêu dữ liệu của từ điển (khóa, trình bao bọc nội dung). Hữu ích cho đầu ra JSON i18next hoặc ICU MessageFormat cho mỗi ngôn ngữ.
|
|
1220
1244
|
- _Ghi chú_: Hữu ích nếu được sử dụng với plugin `loadJSON`.
|
|
1221
|
-
- _Ví dụ_:
|
|
1245
|
+
- _Ví dụ_:
|
|
1246
|
+
Nếu `true` :
|
|
1247
|
+
|
|
1222
1248
|
```json
|
|
1223
1249
|
{
|
|
1224
1250
|
"key": "value"
|
|
1225
1251
|
}
|
|
1226
1252
|
```
|
|
1253
|
+
|
|
1227
1254
|
Nếu `false`:
|
|
1255
|
+
|
|
1228
1256
|
```json
|
|
1229
1257
|
{
|
|
1230
1258
|
"key": "value",
|
|
@@ -344,8 +344,8 @@ Khuyên dùng bỏ qua các tệp được tạo bởi Intlayer. Điều này ch
|
|
|
344
344
|
|
|
345
345
|
Để thực hiện việc này, bạn có thể thêm các hướng dẫn sau vào tệp `.gitignore` của mình:
|
|
346
346
|
|
|
347
|
-
```
|
|
348
|
-
#
|
|
347
|
+
```bash
|
|
348
|
+
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
349
349
|
.intlayer
|
|
350
350
|
```
|
|
351
351
|
|
|
@@ -395,8 +395,8 @@ Khuyên dùng bỏ qua các tệp được tạo bởi Intlayer. Điều này gi
|
|
|
395
395
|
|
|
396
396
|
Để thực hiện việc này, bạn có thể thêm các hướng dẫn sau vào tệp `.gitignore` của mình:
|
|
397
397
|
|
|
398
|
-
```
|
|
399
|
-
#
|
|
398
|
+
```bash
|
|
399
|
+
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
400
400
|
.intlayer
|
|
401
401
|
```
|
|
402
402
|
|
|
@@ -226,8 +226,8 @@ Khuyến nghị bạn nên bỏ qua các file được tạo bởi Intlayer. Đi
|
|
|
226
226
|
|
|
227
227
|
Để làm điều này, bạn có thể thêm các chỉ dẫn sau vào file `.gitignore` của bạn:
|
|
228
228
|
|
|
229
|
-
```
|
|
230
|
-
#
|
|
229
|
+
```bash
|
|
230
|
+
# Bỏ qua các file được tạo bởi Intlayer
|
|
231
231
|
.intlayer
|
|
232
232
|
```
|
|
233
233
|
|
|
@@ -498,8 +498,8 @@ Intlayer tạo các định nghĩa kiểu trong một thư mục ẩn (mặc đ
|
|
|
498
498
|
|
|
499
499
|
Để tránh commit các file được tạo tự động bởi Intlayer, hãy thêm đoạn sau vào `.gitignore` của bạn:
|
|
500
500
|
|
|
501
|
-
```
|
|
502
|
-
#
|
|
501
|
+
```bash
|
|
502
|
+
# Bỏ qua các file được tạo bởi Intlayer
|
|
503
503
|
.intlayer
|
|
504
504
|
```
|
|
505
505
|
|