@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-12-06
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Cách dịch ứng dụng Next.js 16 năm 2026
|
|
5
5
|
description: Khám phá cách làm cho trang web Next.js 16 của bạn đa ngôn ngữ. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch nó.
|
|
6
6
|
keywords:
|
|
@@ -1695,6 +1695,179 @@ Tiện ích mở rộng này cung cấp:
|
|
|
1695
1695
|
|
|
1696
1696
|
Để biết thêm chi tiết về cách sử dụng tiện ích mở rộng, hãy tham khảo [tài liệu Tiện ích mở rộng Intlayer VS Code](https://intlayer.org/doc/vs-code-extension).
|
|
1697
1697
|
|
|
1698
|
+
### (Tùy chọn) Bước 1 : Trích xuất nội dung các thành phần của bạn
|
|
1699
|
+
|
|
1700
|
+
Nếu bạn có một cơ sở mã hiện có, việc chuyển đổi hàng nghìn tệp có thể tốn nhiều thời gian.
|
|
1701
|
+
|
|
1702
|
+
Để đơn giản hóa quy trình này, Intlayer đề xuất một [trình biên dịch](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/compiler.md) / [trình trích xuất](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/extract.md) để chuyển đổi các thành phần của bạn và trích xuất nội dung.
|
|
1703
|
+
|
|
1704
|
+
Để thiết lập, bạn có thể thêm phần `compiler` vào tệp `intlayer.config.ts` của mình:
|
|
1705
|
+
|
|
1706
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1707
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1708
|
+
|
|
1709
|
+
const config: IntlayerConfig = {
|
|
1710
|
+
// ... Phần còn lại của cấu hình
|
|
1711
|
+
compiler: {
|
|
1712
|
+
/**
|
|
1713
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
1714
|
+
*/
|
|
1715
|
+
enabled: true,
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
1719
|
+
*/
|
|
1720
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
1724
|
+
*/
|
|
1725
|
+
saveComponents: false,
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* Tiền tố khóa từ điển
|
|
1729
|
+
*/
|
|
1730
|
+
dictionaryKeyPrefix: "",
|
|
1731
|
+
},
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1734
|
+
export default config;
|
|
1735
|
+
```
|
|
1736
|
+
|
|
1737
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1738
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1739
|
+
const config = {
|
|
1740
|
+
// ... Phần còn lại của cấu hình
|
|
1741
|
+
compiler: {
|
|
1742
|
+
/**
|
|
1743
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
1744
|
+
*/
|
|
1745
|
+
enabled: true,
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
1749
|
+
*/
|
|
1750
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
1754
|
+
*/
|
|
1755
|
+
saveComponents: false,
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* Tiền tố khóa từ điển
|
|
1759
|
+
*/
|
|
1760
|
+
dictionaryKeyPrefix: "",
|
|
1761
|
+
},
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
export default config;
|
|
1765
|
+
```
|
|
1766
|
+
|
|
1767
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1768
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1769
|
+
const config = {
|
|
1770
|
+
// ... Phần còn lại của cấu hình
|
|
1771
|
+
compiler: {
|
|
1772
|
+
/**
|
|
1773
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
1774
|
+
*/
|
|
1775
|
+
enabled: true,
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
1779
|
+
*/
|
|
1780
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
1784
|
+
*/
|
|
1785
|
+
saveComponents: false,
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* Tiền tố khóa từ điển
|
|
1789
|
+
*/
|
|
1790
|
+
dictionaryKeyPrefix: "",
|
|
1791
|
+
},
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
module.exports = config;
|
|
1795
|
+
```
|
|
1796
|
+
|
|
1797
|
+
<Tabs>
|
|
1798
|
+
<Tab value='Lệnh trích xuất'>
|
|
1799
|
+
|
|
1800
|
+
Chạy trình trích xuất để chuyển đổi các thành phần và trích xuất nội dung
|
|
1801
|
+
|
|
1802
|
+
```bash packageManager="npm"
|
|
1803
|
+
npx intlayer extract
|
|
1804
|
+
```
|
|
1805
|
+
|
|
1806
|
+
```bash packageManager="pnpm"
|
|
1807
|
+
pnpm intlayer extract
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
```bash packageManager="yarn"
|
|
1811
|
+
yarn intlayer extract
|
|
1812
|
+
```
|
|
1813
|
+
|
|
1814
|
+
```bash packageManager="bun"
|
|
1815
|
+
bunx intlayer extract
|
|
1816
|
+
```
|
|
1817
|
+
|
|
1818
|
+
</Tab>
|
|
1819
|
+
<Tab value='Trình biên dịch Babel'>
|
|
1820
|
+
|
|
1821
|
+
```bash packageManager="npm"
|
|
1822
|
+
npm install @intlayer/babel --save-dev
|
|
1823
|
+
```
|
|
1824
|
+
|
|
1825
|
+
```bash packageManager="pnpm"
|
|
1826
|
+
pnpm add @intlayer/babel --save-dev
|
|
1827
|
+
```
|
|
1828
|
+
|
|
1829
|
+
```bash packageManager="yarn"
|
|
1830
|
+
yarn add @intlayer/babel --save-dev
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
```bash packageManager="bun"
|
|
1834
|
+
bun add @intlayer/babel --dev
|
|
1835
|
+
```
|
|
1836
|
+
|
|
1837
|
+
```js fileName="babel.config.js"
|
|
1838
|
+
const {
|
|
1839
|
+
intlayerExtractBabelPlugin,
|
|
1840
|
+
getExtractPluginOptions,
|
|
1841
|
+
} = require("@intlayer/babel");
|
|
1842
|
+
|
|
1843
|
+
module.exports = {
|
|
1844
|
+
presets: ["next/babel"],
|
|
1845
|
+
plugins: [
|
|
1846
|
+
// Trích xuất nội dung từ các thành phần vào từ điển
|
|
1847
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
1848
|
+
],
|
|
1849
|
+
};
|
|
1850
|
+
```
|
|
1851
|
+
|
|
1852
|
+
```bash packageManager="npm"
|
|
1853
|
+
npm run build # Hoặc npm run dev
|
|
1854
|
+
```
|
|
1855
|
+
|
|
1856
|
+
```bash packageManager="pnpm"
|
|
1857
|
+
pnpm run build # Or pnpm run dev
|
|
1858
|
+
```
|
|
1859
|
+
|
|
1860
|
+
```bash packageManager="yarn"
|
|
1861
|
+
yarn build # Or yarn dev
|
|
1862
|
+
```
|
|
1863
|
+
|
|
1864
|
+
```bash packageManager="bun"
|
|
1865
|
+
bun run build # Or bun run dev
|
|
1866
|
+
```
|
|
1867
|
+
|
|
1868
|
+
</Tab>
|
|
1869
|
+
</Tabs>
|
|
1870
|
+
|
|
1698
1871
|
### Đi Xa Hơn
|
|
1699
1872
|
|
|
1700
1873
|
Để đi xa hơn, bạn có thể triển khai [trình chỉnh sửa trực quan](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_visual_editor.md) hoặc bên ngoài hóa nội dung của bạn bằng cách sử dụng [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-10
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Chuyển đổi ứng dụng Next.js hiện tại thành ứng dụng đa ngôn ngữ năm 2026
|
|
5
5
|
description: Khám phá cách biến ứng dụng Next.js hiện tại của bạn thành một ứng dụng đa ngôn ngữ bằng cách sử dụng Intlayer Compiler. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch ứng dụng của bạn bằng AI.
|
|
6
6
|
keywords:
|
|
@@ -501,6 +501,179 @@ Tiện ích mở rộng này cung cấp:
|
|
|
501
501
|
|
|
502
502
|
Đọc [tài liệu Tiện ích mở rộng VS Code của Intlayer](https://intlayer.org/doc/vs-code-extension) để biết hướng dẫn chi tiết về cách sử dụng tiện ích mở rộng.
|
|
503
503
|
|
|
504
|
+
### (Tùy chọn) Bước 1 : Trích xuất nội dung các thành phần của bạn
|
|
505
|
+
|
|
506
|
+
Nếu bạn có một cơ sở mã hiện có, việc chuyển đổi hàng nghìn tệp có thể tốn nhiều thời gian.
|
|
507
|
+
|
|
508
|
+
Để đơn giản hóa quy trình này, Intlayer đề xuất một [trình biên dịch](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/compiler.md) / [trình trích xuất](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/extract.md) để chuyển đổi các thành phần của bạn và trích xuất nội dung.
|
|
509
|
+
|
|
510
|
+
Để thiết lập, bạn có thể thêm phần `compiler` vào tệp `intlayer.config.ts` của mình:
|
|
511
|
+
|
|
512
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
513
|
+
import { type IntlayerConfig } from "intlayer";
|
|
514
|
+
|
|
515
|
+
const config: IntlayerConfig = {
|
|
516
|
+
// ... Phần còn lại của cấu hình
|
|
517
|
+
compiler: {
|
|
518
|
+
/**
|
|
519
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
520
|
+
*/
|
|
521
|
+
enabled: true,
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
525
|
+
*/
|
|
526
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
530
|
+
*/
|
|
531
|
+
saveComponents: false,
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Tiền tố khóa từ điển
|
|
535
|
+
*/
|
|
536
|
+
dictionaryKeyPrefix: "",
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
export default config;
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
544
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
545
|
+
const config = {
|
|
546
|
+
// ... Phần còn lại của cấu hình
|
|
547
|
+
compiler: {
|
|
548
|
+
/**
|
|
549
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
550
|
+
*/
|
|
551
|
+
enabled: true,
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
555
|
+
*/
|
|
556
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
560
|
+
*/
|
|
561
|
+
saveComponents: false,
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Tiền tố khóa từ điển
|
|
565
|
+
*/
|
|
566
|
+
dictionaryKeyPrefix: "",
|
|
567
|
+
},
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
export default config;
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
574
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
575
|
+
const config = {
|
|
576
|
+
// ... Phần còn lại của cấu hình
|
|
577
|
+
compiler: {
|
|
578
|
+
/**
|
|
579
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
580
|
+
*/
|
|
581
|
+
enabled: true,
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
585
|
+
*/
|
|
586
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
590
|
+
*/
|
|
591
|
+
saveComponents: false,
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Tiền tố khóa từ điển
|
|
595
|
+
*/
|
|
596
|
+
dictionaryKeyPrefix: "",
|
|
597
|
+
},
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
module.exports = config;
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
<Tabs>
|
|
604
|
+
<Tab value='Lệnh trích xuất'>
|
|
605
|
+
|
|
606
|
+
Chạy trình trích xuất để chuyển đổi các thành phần và trích xuất nội dung
|
|
607
|
+
|
|
608
|
+
```bash packageManager="npm"
|
|
609
|
+
npx intlayer extract
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
```bash packageManager="pnpm"
|
|
613
|
+
pnpm intlayer extract
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
```bash packageManager="yarn"
|
|
617
|
+
yarn intlayer extract
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
```bash packageManager="bun"
|
|
621
|
+
bunx intlayer extract
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
</Tab>
|
|
625
|
+
<Tab value='Trình biên dịch Babel'>
|
|
626
|
+
|
|
627
|
+
```bash packageManager="npm"
|
|
628
|
+
npm install @intlayer/babel --save-dev
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
```bash packageManager="pnpm"
|
|
632
|
+
pnpm add @intlayer/babel --save-dev
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
```bash packageManager="yarn"
|
|
636
|
+
yarn add @intlayer/babel --save-dev
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
```bash packageManager="bun"
|
|
640
|
+
bun add @intlayer/babel --dev
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
```js fileName="babel.config.js"
|
|
644
|
+
const {
|
|
645
|
+
intlayerExtractBabelPlugin,
|
|
646
|
+
getExtractPluginOptions,
|
|
647
|
+
} = require("@intlayer/babel");
|
|
648
|
+
|
|
649
|
+
module.exports = {
|
|
650
|
+
presets: ["next/babel"],
|
|
651
|
+
plugins: [
|
|
652
|
+
// Trích xuất nội dung từ các thành phần vào từ điển
|
|
653
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
654
|
+
],
|
|
655
|
+
};
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
```bash packageManager="npm"
|
|
659
|
+
npm run build # Hoặc npm run dev
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
```bash packageManager="pnpm"
|
|
663
|
+
pnpm run build # Or pnpm run dev
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
```bash packageManager="yarn"
|
|
667
|
+
yarn build # Or yarn dev
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
```bash packageManager="bun"
|
|
671
|
+
bun run build # Or bun run dev
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
</Tab>
|
|
675
|
+
</Tabs>
|
|
676
|
+
|
|
504
677
|
### Đi xa hơn
|
|
505
678
|
|
|
506
679
|
Để tiến xa hơn, bạn có thể triển khai [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_visual_editor.md) hoặc ngoại hóa nội dung của mình bằng cách sử dụng [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md).
|
|
@@ -650,8 +650,8 @@ Intlayer tạo ra các định nghĩa kiểu trong một thư mục ẩn (mặc
|
|
|
650
650
|
|
|
651
651
|
Để tránh commit các file được Intlayer tự động tạo, hãy thêm đoạn sau vào `.gitignore` của bạn:
|
|
652
652
|
|
|
653
|
-
```
|
|
654
|
-
#
|
|
653
|
+
```bash
|
|
654
|
+
# Bỏ qua các file do Intlayer tạo ra
|
|
655
655
|
.intlayer
|
|
656
656
|
```
|
|
657
657
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-04
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: React Router v7 i18n - Cách dịch ứng dụng React Router v7 năm 2026
|
|
5
5
|
description: Tìm hiểu cách thêm quốc tế hóa (i18n) vào ứng dụng React Router v7 của bạn bằng Intlayer. Theo dõi hướng dẫn toàn diện này để làm cho ứng dụng của bạn đa ngôn ngữ với định tuyến nhận biết locale.
|
|
6
6
|
keywords:
|
|
@@ -514,6 +514,229 @@ export default function RootLayout() {
|
|
|
514
514
|
}
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
+
### (Tùy chọn) Bước 1 : Trích xuất nội dung các thành phần của bạn
|
|
518
|
+
|
|
519
|
+
Nếu bạn có một cơ sở mã hiện có, việc chuyển đổi hàng nghìn tệp có thể tốn nhiều thời gian.
|
|
520
|
+
|
|
521
|
+
Để đơn giản hóa quy trình này, Intlayer đề xuất một [trình biên dịch](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/compiler.md) / [trình trích xuất](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/extract.md) để chuyển đổi các thành phần của bạn và trích xuất nội dung.
|
|
522
|
+
|
|
523
|
+
Để thiết lập, bạn có thể thêm phần `compiler` vào tệp `intlayer.config.ts` của mình:
|
|
524
|
+
|
|
525
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
526
|
+
import { type IntlayerConfig } from "intlayer";
|
|
527
|
+
|
|
528
|
+
const config: IntlayerConfig = {
|
|
529
|
+
// ... Phần còn lại của cấu hình
|
|
530
|
+
compiler: {
|
|
531
|
+
/**
|
|
532
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
533
|
+
*/
|
|
534
|
+
enabled: true,
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
538
|
+
*/
|
|
539
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
543
|
+
*/
|
|
544
|
+
saveComponents: false,
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Tiền tố khóa từ điển
|
|
548
|
+
*/
|
|
549
|
+
dictionaryKeyPrefix: "",
|
|
550
|
+
},
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
export default config;
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
557
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
558
|
+
const config = {
|
|
559
|
+
// ... Phần còn lại của cấu hình
|
|
560
|
+
compiler: {
|
|
561
|
+
/**
|
|
562
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
563
|
+
*/
|
|
564
|
+
enabled: true,
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
568
|
+
*/
|
|
569
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
573
|
+
*/
|
|
574
|
+
saveComponents: false,
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Tiền tố khóa từ điển
|
|
578
|
+
*/
|
|
579
|
+
dictionaryKeyPrefix: "",
|
|
580
|
+
},
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
export default config;
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
587
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
588
|
+
const config = {
|
|
589
|
+
// ... Phần còn lại của cấu hình
|
|
590
|
+
compiler: {
|
|
591
|
+
/**
|
|
592
|
+
* Cho biết trình biên dịch có nên được bật hay không.
|
|
593
|
+
*/
|
|
594
|
+
enabled: true,
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Xác định đường dẫn các tệp đầu ra
|
|
598
|
+
*/
|
|
599
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Cho biết các thành phần có nên được lưu sau khi chuyển đổi hay không. Bằng cách đó, trình biên dịch có thể được chạy chỉ một lần để chuyển đổi ứng dụng, sau đó có thể được gỡ bỏ.
|
|
603
|
+
*/
|
|
604
|
+
saveComponents: false,
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Tiền tố khóa từ điển
|
|
608
|
+
*/
|
|
609
|
+
dictionaryKeyPrefix: "",
|
|
610
|
+
},
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
module.exports = config;
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
<Tabs>
|
|
617
|
+
<Tab value='Lệnh trích xuất'>
|
|
618
|
+
|
|
619
|
+
Chạy trình trích xuất để chuyển đổi các thành phần và trích xuất nội dung
|
|
620
|
+
|
|
621
|
+
```bash packageManager="npm"
|
|
622
|
+
npx intlayer extract
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
```bash packageManager="pnpm"
|
|
626
|
+
pnpm intlayer extract
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
```bash packageManager="yarn"
|
|
630
|
+
yarn intlayer extract
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
```bash packageManager="bun"
|
|
634
|
+
bunx intlayer extract
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
</Tab>
|
|
638
|
+
<Tab value='Trình biên dịch Babel'>
|
|
639
|
+
|
|
640
|
+
Cập nhật `vite.config.ts` của bạn để bao gồm plugin `intlayerCompiler`:
|
|
641
|
+
|
|
642
|
+
```ts fileName="vite.config.ts"
|
|
643
|
+
import { defineConfig } from "vite";
|
|
644
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
645
|
+
|
|
646
|
+
export default defineConfig({
|
|
647
|
+
plugins: [
|
|
648
|
+
intlayer(),
|
|
649
|
+
intlayerCompiler(), // Thêm plugin trình biên dịch
|
|
650
|
+
],
|
|
651
|
+
});
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
```bash packageManager="npm"
|
|
655
|
+
npm run build # Hoặc npm run dev
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
```bash packageManager="pnpm"
|
|
659
|
+
pnpm run build # Or pnpm run dev
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
```bash packageManager="yarn"
|
|
663
|
+
yarn build # Or yarn dev
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
```bash packageManager="bun"
|
|
667
|
+
bun run build # Or bun run dev
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
</Tab>
|
|
671
|
+
</Tabs>
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Configure TypeScript
|
|
676
|
+
|
|
677
|
+
Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
678
|
+
|
|
679
|
+
Ensure your TypeScript configuration includes the autogenerated types:
|
|
680
|
+
|
|
681
|
+
```json5 fileName="tsconfig.json"
|
|
682
|
+
{
|
|
683
|
+
// ... your existing configurations
|
|
684
|
+
include: [
|
|
685
|
+
// ... your existing includes
|
|
686
|
+
".intlayer/**/*.ts", // Include the auto-generated types
|
|
687
|
+
],
|
|
688
|
+
}
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
## Git Configuration
|
|
694
|
+
|
|
695
|
+
It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
|
|
696
|
+
|
|
697
|
+
To do this, you can add the following instructions to your `.gitignore` file:
|
|
698
|
+
|
|
699
|
+
```plaintext fileName=".gitignore"
|
|
700
|
+
# Ignore the files generated by Intlayer
|
|
701
|
+
.intlayer
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
## VS Code Extension
|
|
707
|
+
|
|
708
|
+
To improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.
|
|
709
|
+
|
|
710
|
+
[Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
711
|
+
|
|
712
|
+
This extension provides:
|
|
713
|
+
|
|
714
|
+
- **Autocompletion** for translation keys.
|
|
715
|
+
- **Real-time error detection** for missing translations.
|
|
716
|
+
- **Inline previews** of translated content.
|
|
717
|
+
- **Quick actions** to easily create and update translations.
|
|
718
|
+
|
|
719
|
+
For more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
723
|
+
## Go Further
|
|
724
|
+
|
|
725
|
+
To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md) or externalize your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md).
|
|
726
|
+
|
|
727
|
+
---
|
|
728
|
+
|
|
729
|
+
## Documentation References
|
|
730
|
+
|
|
731
|
+
- [Intlayer Documentation](https://intlayer.org)
|
|
732
|
+
- [React Router v7 Documentation](https://reactrouter.com/)
|
|
733
|
+
- [useIntlayer hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useIntlayer.md)
|
|
734
|
+
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useLocale.md)
|
|
735
|
+
- [Content Declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md)
|
|
736
|
+
- [Configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md)
|
|
737
|
+
|
|
738
|
+
This comprehensive guide provides everything you need to integrate Intlayer with React Router v7 for a fully internationalized application with locale-aware routing and TypeScript support.
|
|
739
|
+
|
|
517
740
|
### Bước 11: Thêm middleware (Tùy chọn)
|
|
518
741
|
|
|
519
742
|
Bạn cũng có thể sử dụng `intlayerProxy` để thêm routing phía server cho ứng dụng của bạn. Plugin này sẽ tự động phát hiện locale hiện tại dựa trên URL và thiết lập cookie locale phù hợp. Nếu không có locale nào được chỉ định, plugin sẽ xác định locale phù hợp nhất dựa trên ngôn ngữ trình duyệt của người dùng. Nếu không phát hiện được locale nào, nó sẽ chuyển hướng đến locale mặc định.
|