@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/en/compiler.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Intlayer Compiler | Automated Content Extraction for i18n
|
|
5
5
|
description: Automate your internationalization process with the Intlayer Compiler. Extract content directly from your components for faster, more efficient i18n in Vite, Next.js, and more.
|
|
6
6
|
keywords:
|
|
@@ -161,7 +161,7 @@ See complete tutorial: [Intlayer Compiler with Next.js](https://github.com/aymer
|
|
|
161
161
|
|
|
162
162
|
To customize the compiler behavior, you can update the `intlayer.config.ts` file in the root of your project.
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
````ts fileName="intlayer.config.ts"
|
|
165
165
|
import { type IntlayerConfig, Locales } from "intlayer";
|
|
166
166
|
|
|
167
167
|
const config: IntlayerConfig = {
|
|
@@ -173,43 +173,67 @@ const config: IntlayerConfig = {
|
|
|
173
173
|
enabled: true,
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
176
|
+
* Defines the output files path. Replaces `outputDir`.
|
|
177
|
+
*
|
|
178
|
+
* - `./` paths are resolved relative to the component directory.
|
|
179
|
+
* - `/` paths are resolved relative to the project root (`baseDir`).
|
|
180
|
+
*
|
|
181
|
+
* - Including the `{{locale}}` variable in the path will trigger the generation of separate dictionaries per locale.
|
|
182
|
+
*
|
|
183
|
+
* Example:
|
|
184
|
+
* ```ts
|
|
185
|
+
* {
|
|
186
|
+
* // Create Multilingual .content.ts files close to the component
|
|
187
|
+
* output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
188
|
+
*
|
|
189
|
+
* // output: './{{fileName}}{{extension}}', // Equivalent using template string
|
|
190
|
+
* }
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* ```ts
|
|
194
|
+
* {
|
|
195
|
+
* // Create centralize per-locale JSON at the root of the project
|
|
196
|
+
* output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
|
|
197
|
+
*
|
|
198
|
+
* // output: '/locales/{{locale}}/{{key}}.content.json', // Equivalent using template string
|
|
199
|
+
* }
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* Variable list:
|
|
203
|
+
* - `fileName`: The name of the file.
|
|
204
|
+
* - `key`: The key of the content.
|
|
205
|
+
* - `locale`: The locale of the content.
|
|
206
|
+
* - `extension`: The extension of the file.
|
|
207
|
+
* - `componentFileName`: The name of the component file.
|
|
208
|
+
* - `componentExtension`: The extension of the component file.
|
|
209
|
+
* - `format`: The format of the dictionary.
|
|
210
|
+
* - `componentFormat`: The format of the component dictionary.
|
|
211
|
+
* - `componentDirPath`: The directory path of the component.
|
|
177
212
|
*/
|
|
178
|
-
|
|
179
|
-
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
180
|
-
"!**/node_modules/**",
|
|
181
|
-
],
|
|
213
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
182
214
|
|
|
183
215
|
/**
|
|
184
|
-
*
|
|
185
|
-
|
|
186
|
-
excludePattern: ["**/node_modules/**"],
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Output directory for the optimized dictionaries.
|
|
216
|
+
* Indicates if the components should be saved after being transformed.
|
|
217
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
190
218
|
*/
|
|
191
|
-
|
|
219
|
+
saveComponents: false,
|
|
192
220
|
|
|
193
221
|
/**
|
|
194
|
-
* Inset only content
|
|
222
|
+
* Inset only content into the generated file. Useful for per-locale i18next or ICU MessageFormat JSON outputs.
|
|
223
|
+
*
|
|
224
|
+
* - `output: ({ locale, key }) => `./locale/${locale}/${key}.json`,`
|
|
195
225
|
*/
|
|
196
226
|
noMetadata: false,
|
|
197
227
|
|
|
198
228
|
/**
|
|
199
229
|
* Dictionary key prefix
|
|
200
230
|
*/
|
|
201
|
-
dictionaryKeyPrefix: "", //
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Indicates if the components should be saved after being transformed.
|
|
205
|
-
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
206
|
-
*/
|
|
207
|
-
saveComponents: false,
|
|
231
|
+
dictionaryKeyPrefix: "", // Add an optional prefix for the extracted dictionary keys
|
|
208
232
|
},
|
|
209
233
|
};
|
|
210
234
|
|
|
211
235
|
export default config;
|
|
212
|
-
|
|
236
|
+
````
|
|
213
237
|
|
|
214
238
|
### Compiler Configuration Reference
|
|
215
239
|
|
|
@@ -222,23 +246,18 @@ The following properties can be configured in the `compiler` block of your `intl
|
|
|
222
246
|
|
|
223
247
|
- **dictionaryKeyPrefix**:
|
|
224
248
|
- _Type_: `string`
|
|
225
|
-
- _Default_: `'
|
|
249
|
+
- _Default_: `''`
|
|
226
250
|
- _Description_: Prefix for the extracted dictionary keys.
|
|
227
251
|
|
|
228
252
|
- **transformPattern**:
|
|
229
253
|
- _Type_: `string | string[]`
|
|
230
254
|
- _Default_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
231
|
-
- _Description_: Patterns to traverse the code to optimize.
|
|
255
|
+
- _Description_: (Deprecated: use `build.traversePattern` instead) Patterns to traverse the code to optimize.
|
|
232
256
|
|
|
233
257
|
- **excludePattern**:
|
|
234
258
|
- _Type_: `string | string[]`
|
|
235
259
|
- _Default_: `['**/node_modules/**']`
|
|
236
|
-
- _Description_: Patterns to exclude from the optimization.
|
|
237
|
-
|
|
238
|
-
- **outputDir** (Deprecated):
|
|
239
|
-
- _Type_: `string`
|
|
240
|
-
- _Default_: `'compiler'`
|
|
241
|
-
- _Description_: The directory where the extracted dictionaries will be stored.
|
|
260
|
+
- _Description_: (Deprecated: use `build.traversePattern` instead) Patterns to exclude from the optimization.
|
|
242
261
|
|
|
243
262
|
- **output**:
|
|
244
263
|
- _Type_: `FilePathPattern`
|
|
@@ -251,7 +270,7 @@ The following properties can be configured in the `compiler` block of your `intl
|
|
|
251
270
|
- **noMetadata**:
|
|
252
271
|
- _Type_: `boolean`
|
|
253
272
|
- _Default_: `false`
|
|
254
|
-
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper).
|
|
273
|
+
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper). Useful for per-locale i18next or ICU MessageFormat JSON outputs.
|
|
255
274
|
- _Note_: Useful if used with `loadJSON` plugin.
|
|
256
275
|
- _Example_:
|
|
257
276
|
If `true`:
|
|
@@ -287,4 +306,12 @@ npx intlayer test # Test if there is missing translations
|
|
|
287
306
|
npx intlayer fill # Fill missing translations
|
|
288
307
|
```
|
|
289
308
|
|
|
290
|
-
|
|
309
|
+
### Extract
|
|
310
|
+
|
|
311
|
+
Intlayer provide a CLI tool to extract content from your code. You can use the `intlayer extract` command to extract content from your code.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
npx intlayer extract
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
> For more details, refer to the [CLI documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/index.md)
|
package/docs/en/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: Configuration
|
|
5
5
|
description: Learn how to configure Intlayer for your application. Understand the various settings and options available to customize Intlayer to your needs.
|
|
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: Move 'baseDir' from 'content' to 'system' config
|
|
20
20
|
- version: 8.2.0
|
|
21
21
|
date: 2026-03-09
|
|
@@ -119,7 +119,7 @@ Intlayer accepts JSON, JS, MJS, and TS configuration file formats:
|
|
|
119
119
|
|
|
120
120
|
## Example config file
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
````typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
123
123
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
124
124
|
import { nextjsRewrite } from "intlayer/routing";
|
|
125
125
|
import { z } from "zod";
|
|
@@ -217,7 +217,7 @@ const config: IntlayerConfig = {
|
|
|
217
217
|
* Options: 'cookie', 'localStorage', 'sessionStorage', 'header', or an array of these.
|
|
218
218
|
* Default: ['cookie', 'header']
|
|
219
219
|
*/
|
|
220
|
-
storage: "cookie",
|
|
220
|
+
storage: ["cookie", "header"],
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
223
|
* Base path for the application URLs.
|
|
@@ -283,13 +283,13 @@ const config: IntlayerConfig = {
|
|
|
283
283
|
editor: {
|
|
284
284
|
/**
|
|
285
285
|
* Whether the visual editor is enabled.
|
|
286
|
-
* Default:
|
|
286
|
+
* Default: false
|
|
287
287
|
*/
|
|
288
288
|
enabled: true,
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* URL of your application for origin validation.
|
|
292
|
-
* Default: "
|
|
292
|
+
* Default: ""
|
|
293
293
|
*/
|
|
294
294
|
applicationURL: "http://localhost:3000",
|
|
295
295
|
|
|
@@ -387,9 +387,9 @@ const config: IntlayerConfig = {
|
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* Output format for generated dictionary files.
|
|
390
|
-
* Default: ['
|
|
390
|
+
* Default: ['cjs', 'esm']
|
|
391
391
|
*/
|
|
392
|
-
outputFormat: ["esm"],
|
|
392
|
+
outputFormat: ["cjs", "esm"],
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* Indicates if the build should check TypeScript types.
|
|
@@ -464,43 +464,70 @@ const config: IntlayerConfig = {
|
|
|
464
464
|
compiler: {
|
|
465
465
|
/**
|
|
466
466
|
* Indicates if the compiler should be enabled.
|
|
467
|
-
*
|
|
467
|
+
*
|
|
468
|
+
* - false: Disable the compiler.
|
|
469
|
+
* - true: Enable the compiler.
|
|
470
|
+
* - "build-only": Skip the compiler during development and speed up start times.
|
|
471
|
+
*
|
|
472
|
+
* Default: false
|
|
468
473
|
*/
|
|
469
474
|
enabled: true,
|
|
470
475
|
|
|
471
476
|
/**
|
|
472
|
-
*
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
*
|
|
477
|
+
* Defines the output files path. Replaces `outputDir`.
|
|
478
|
+
*
|
|
479
|
+
* - `./` paths are resolved relative to the component directory.
|
|
480
|
+
* - `/` paths are resolved relative to the project root (`baseDir`).
|
|
481
|
+
*
|
|
482
|
+
* - Including the `{{locale}}` variable in the path will trigger the generation of separate dictionaries per locale.
|
|
483
|
+
*
|
|
484
|
+
* Example:
|
|
485
|
+
* ```ts
|
|
486
|
+
* {
|
|
487
|
+
* // Create Multilingual .content.ts files close to the component
|
|
488
|
+
* output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
489
|
+
*
|
|
490
|
+
* // output: './{{fileName}}{{extension}}', // Equivalent using template string
|
|
491
|
+
* }
|
|
492
|
+
* ```
|
|
493
|
+
*
|
|
494
|
+
* ```ts
|
|
495
|
+
* {
|
|
496
|
+
* // Create centralize per-locale JSON at the root of the project
|
|
497
|
+
* output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
|
|
498
|
+
*
|
|
499
|
+
* // output: '/locales/{{locale}}/{{key}}.content.json', // Equivalent using template string
|
|
500
|
+
* }
|
|
501
|
+
* ```
|
|
502
|
+
*
|
|
503
|
+
* Variable list:
|
|
504
|
+
* - `fileName`: The name of the file.
|
|
505
|
+
* - `key`: The key of the content.
|
|
506
|
+
* - `locale`: The locale of the content.
|
|
507
|
+
* - `extension`: The extension of the file.
|
|
508
|
+
* - `componentFileName`: The name of the component file.
|
|
509
|
+
* - `componentExtension`: The extension of the component file.
|
|
510
|
+
* - `format`: The format of the dictionary.
|
|
511
|
+
* - `componentFormat`: The format of the component dictionary.
|
|
512
|
+
* - `componentDirPath`: The directory path of the component.
|
|
481
513
|
*/
|
|
482
|
-
|
|
514
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
483
515
|
|
|
484
516
|
/**
|
|
485
|
-
*
|
|
517
|
+
* Indicates if the components should be saved after being transformed.
|
|
518
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
486
519
|
*/
|
|
487
|
-
|
|
520
|
+
saveComponents: false,
|
|
488
521
|
|
|
489
522
|
/**
|
|
490
|
-
* Inset only content
|
|
523
|
+
* Inset only content into the generated file. Useful for per-locale i18next or ICU MessageFormat JSON outputs.
|
|
491
524
|
*/
|
|
492
525
|
noMetadata: false,
|
|
493
526
|
|
|
494
527
|
/**
|
|
495
528
|
* Dictionary key prefix
|
|
496
529
|
*/
|
|
497
|
-
dictionaryKeyPrefix: "", //
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Indicates if the components should be saved after being transformed.
|
|
501
|
-
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
502
|
-
*/
|
|
503
|
-
saveComponents: false,
|
|
530
|
+
dictionaryKeyPrefix: "", // Add an optional prefix for the extracted dictionary keys
|
|
504
531
|
},
|
|
505
532
|
|
|
506
533
|
/**
|
|
@@ -519,7 +546,7 @@ const config: IntlayerConfig = {
|
|
|
519
546
|
};
|
|
520
547
|
|
|
521
548
|
export default config;
|
|
522
|
-
|
|
549
|
+
````
|
|
523
550
|
|
|
524
551
|
---
|
|
525
552
|
|
|
@@ -537,7 +564,7 @@ Defines settings related to internationalization, including available locales an
|
|
|
537
564
|
|
|
538
565
|
- **locales**:
|
|
539
566
|
- _Type_: `string[]`
|
|
540
|
-
- _Default_: `[
|
|
567
|
+
- _Default_: `[Locales.ENGLISH]`
|
|
541
568
|
- _Description_: The list of supported locales in the application.
|
|
542
569
|
- _Example_: `['en', 'fr', 'es']`
|
|
543
570
|
|
|
@@ -558,7 +585,7 @@ Defines settings related to internationalization, including available locales an
|
|
|
558
585
|
|
|
559
586
|
- **defaultLocale**:
|
|
560
587
|
- _Type_: `string`
|
|
561
|
-
- _Default_: `
|
|
588
|
+
- _Default_: `Locales.ENGLISH`
|
|
562
589
|
- _Description_: The default locale used as a fallback if the requested locale is not found.
|
|
563
590
|
- _Example_: `'en'`
|
|
564
591
|
- _Note_: This is used to determine the locale when none is specified in the URL, cookie, or header.
|
|
@@ -573,7 +600,7 @@ Defines settings related to the integrated editor, including server port and act
|
|
|
573
600
|
|
|
574
601
|
- **applicationURL**:
|
|
575
602
|
- _Type_: `string`
|
|
576
|
-
- _Default_: `
|
|
603
|
+
- _Default_: `''`
|
|
577
604
|
- _Description_: The URL of the application. Used to restrict the origin of the editor for security reasons.
|
|
578
605
|
- _Example_:
|
|
579
606
|
- `'http://localhost:3000'`
|
|
@@ -637,7 +664,7 @@ Defines settings related to the integrated editor, including server port and act
|
|
|
637
664
|
|
|
638
665
|
- **liveSync**:
|
|
639
666
|
- _Type_: `boolean`
|
|
640
|
-
- _Default_: `
|
|
667
|
+
- _Default_: `true`
|
|
641
668
|
- _Description_: Indicates if the application server should hot reload the content of the application when a change is detected on the CMS / Visual Editor / Backend.
|
|
642
669
|
- _Example_: `true`
|
|
643
670
|
- _Note_: For example, when a new dictionary is added or updated, the application will update the content to display in the page.
|
|
@@ -676,7 +703,7 @@ Settings that control routing behavior, including URL structure, locale storage,
|
|
|
676
703
|
|
|
677
704
|
- **storage**:
|
|
678
705
|
- _Type_: `false | 'cookie' | 'localStorage' | 'sessionStorage' | 'header' | CookiesAttributes | StorageAttributes | Array`
|
|
679
|
-
- _Default_: `'
|
|
706
|
+
- _Default_: `['cookie', 'header']`
|
|
680
707
|
- _Description_: Configuration for storing the locale in the client.
|
|
681
708
|
|
|
682
709
|
- **cookie**:
|
|
@@ -779,7 +806,6 @@ const config: IntlayerConfig = {
|
|
|
779
806
|
routing: {
|
|
780
807
|
mode: "prefix-no-default",
|
|
781
808
|
storage: "localStorage",
|
|
782
|
-
headerName: "x-intlayer-locale",
|
|
783
809
|
basePath: "",
|
|
784
810
|
},
|
|
785
811
|
};
|
|
@@ -812,7 +838,6 @@ const config: IntlayerConfig = {
|
|
|
812
838
|
httpOnly: false,
|
|
813
839
|
},
|
|
814
840
|
],
|
|
815
|
-
headerName: "x-intlayer-locale",
|
|
816
841
|
basePath: "",
|
|
817
842
|
},
|
|
818
843
|
};
|
|
@@ -833,7 +858,6 @@ const config: IntlayerConfig = {
|
|
|
833
858
|
routing: {
|
|
834
859
|
mode: "search-params",
|
|
835
860
|
storage: "localStorage",
|
|
836
|
-
headerName: "x-intlayer-locale",
|
|
837
861
|
basePath: "",
|
|
838
862
|
},
|
|
839
863
|
};
|
|
@@ -857,7 +881,6 @@ const config: IntlayerConfig = {
|
|
|
857
881
|
type: "sessionStorage",
|
|
858
882
|
name: "app-locale",
|
|
859
883
|
},
|
|
860
|
-
headerName: "x-custom-locale",
|
|
861
884
|
basePath: "/my-app",
|
|
862
885
|
},
|
|
863
886
|
};
|
|
@@ -872,7 +895,6 @@ export default config;
|
|
|
872
895
|
import { nextjsRewrite } from "intlayer/routing";
|
|
873
896
|
|
|
874
897
|
const config: IntlayerConfig = {
|
|
875
|
-
|
|
876
898
|
internationalization: {
|
|
877
899
|
locales: ["en", "fr"],
|
|
878
900
|
defaultLocale: "en",
|
|
@@ -893,12 +915,11 @@ const config: IntlayerConfig = {
|
|
|
893
915
|
en: "/blog/[category]/[id]",
|
|
894
916
|
fr: "/journal/[category]/[id]",
|
|
895
917
|
},
|
|
896
|
-
|
|
918
|
+
}),
|
|
919
|
+
},
|
|
897
920
|
};
|
|
898
921
|
|
|
899
|
-
export default config
|
|
900
|
-
},
|
|
901
|
-
});
|
|
922
|
+
export default config;
|
|
902
923
|
```
|
|
903
924
|
|
|
904
925
|
---
|
|
@@ -916,7 +937,7 @@ Settings related to content handling within the application, including directory
|
|
|
916
937
|
|
|
917
938
|
- **fileExtensions**:
|
|
918
939
|
- _Type_: `string[]`
|
|
919
|
-
- _Default_: `['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']`
|
|
940
|
+
- _Default_: `['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.json5', '.content.jsonc', '.content.tsx', '.content.jsx']`
|
|
920
941
|
- _Description_: File extensions to look for when building dictionaries.
|
|
921
942
|
- _Example_: `['.data.ts', '.data.js', '.data.json']`
|
|
922
943
|
- _Note_: Customizing file extensions can help avoid conflicts.
|
|
@@ -1188,24 +1209,6 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1188
1209
|
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1189
1210
|
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
1190
1211
|
|
|
1191
|
-
- **importMode**:
|
|
1192
|
-
- _Type_: `'static' | 'dynamic' | 'fetch'`
|
|
1193
|
-
- _Default_: `'static'`
|
|
1194
|
-
- _Description_: Controls how dictionaries are imported.
|
|
1195
|
-
- _Example_: `'dynamic'`
|
|
1196
|
-
- _Note_: Available modes:
|
|
1197
|
-
- "static": Dictionaries are imported statically. Replaces `useIntlayer` with `useDictionary`.
|
|
1198
|
-
- "dynamic": Dictionaries are imported dynamically using Suspense. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
1199
|
-
- "fetch": Dictionaries are fetched dynamically using the live sync API. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
1200
|
-
- _Note_: Dynamic imports rely on Suspense and may slightly impact rendering performance.
|
|
1201
|
-
- _Note_: If disabled all locales will be loaded at once, even if they are not used.
|
|
1202
|
-
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1203
|
-
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
1204
|
-
- _Note_: This option will be ignored if `optimize` is disabled.
|
|
1205
|
-
- _Note_: If set to "fetch", only the dictionaries that are including remote content, and set as "fetch" flags will be transformed as fetch mode. Others will be imported dynamically as "dynamic" mode to optimize the number of fetch queries, and load performance.
|
|
1206
|
-
- _Note_: Fetch mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
|
|
1207
|
-
- _Note_: This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
|
|
1208
|
-
- _Note_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1209
1212
|
- **checkTypes**:
|
|
1210
1213
|
- _Type_: `boolean`
|
|
1211
1214
|
- _Default_: `false`
|
|
@@ -1213,8 +1216,8 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1213
1216
|
- _Note_: This can slow down the build.
|
|
1214
1217
|
|
|
1215
1218
|
- **outputFormat**:
|
|
1216
|
-
- _Type_: `'esm' | 'cjs'`
|
|
1217
|
-
- _Default_: `'esm'`
|
|
1219
|
+
- _Type_: `('esm' | 'cjs')[]`
|
|
1220
|
+
- _Default_: `['cjs', 'esm']`
|
|
1218
1221
|
- _Description_: Controls the output format of the dictionaries.
|
|
1219
1222
|
- _Example_: `'cjs'`
|
|
1220
1223
|
- _Note_: The output format of the dictionaries.
|
|
@@ -1245,7 +1248,7 @@ Settings that control the Intlayer compiler, which extracts dictionaries straigh
|
|
|
1245
1248
|
|
|
1246
1249
|
- **dictionaryKeyPrefix**:
|
|
1247
1250
|
- _Type_: `string`
|
|
1248
|
-
- _Default_: `'
|
|
1251
|
+
- _Default_: `''`
|
|
1249
1252
|
- _Description_: Prefix for the extracted dictionary keys.
|
|
1250
1253
|
- _Example_: `'my-key-'`
|
|
1251
1254
|
- _Note_: When dictionaries are extracted, the key is generated based on the file name. This prefix is added to the generated key to prevent conflicts.
|
|
@@ -1269,23 +1272,25 @@ Settings that control the Intlayer compiler, which extracts dictionaries straigh
|
|
|
1269
1272
|
- _Description_: Patterns that define which files should be excluded during optimization.
|
|
1270
1273
|
- _Example_: `['**/node_modules/**', '!**/node_modules/react/**']`
|
|
1271
1274
|
|
|
1272
|
-
- **outputDir**:
|
|
1273
|
-
- _Type_: `string`
|
|
1274
|
-
- _Default_: `'compiler'`
|
|
1275
|
-
- _Description_: The directory where the extracted dictionaries will be stored, relative to your project base path.
|
|
1276
|
-
|
|
1277
1275
|
- **output**:
|
|
1278
1276
|
- _Type_: `FilePathPattern`
|
|
1279
|
-
- _Default_: `
|
|
1280
|
-
- _Description_: Defines the output files path. Replaces `outputDir`. Handles dynamic variables
|
|
1281
|
-
- _Note_:
|
|
1282
|
-
- _Note_:
|
|
1283
|
-
- _Example_:
|
|
1277
|
+
- _Default_: `undefined`
|
|
1278
|
+
- _Description_: Defines the output files path. Replaces `outputDir`. Handles dynamic variables via template strings or a function. Supported variables: `{{fileName}}`, `{{key}}`, `{{locale}}`, `{{extension}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{format}}`, `{{componentFormat}}`, and `{{componentDirPath}}`.
|
|
1279
|
+
- _Note_: `./` paths are resolved relative to the component directory. `/` paths are resolved relative to the project root (`baseDir`).
|
|
1280
|
+
- _Note_: Including the `{{locale}}` variable in the path will trigger the generation of separate dictionaries per locale.
|
|
1281
|
+
- _Example_:
|
|
1282
|
+
- **Multilingual files near component**:
|
|
1283
|
+
- String: `'./{{fileName}}{{extension}}'`
|
|
1284
|
+
- Function: `({ fileName, extension }) => \`./${fileName}${extension}``
|
|
1285
|
+
|
|
1286
|
+
- **Centralized per-locale JSON**:
|
|
1287
|
+
- String: `'/locales/{{locale}}/{{key}}.content.json'`
|
|
1288
|
+
- Function: `({ key, locale }) => \`/locales/${locale}/${key}.content.json``
|
|
1284
1289
|
|
|
1285
1290
|
- **noMetadata**:
|
|
1286
1291
|
- _Type_: `boolean`
|
|
1287
1292
|
- _Default_: `false`
|
|
1288
|
-
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper).
|
|
1293
|
+
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper). Useful for per-locale i18next or ICU MessageFormat JSON outputs.
|
|
1289
1294
|
- _Note_: Useful if used with `loadJSON` plugin.
|
|
1290
1295
|
- _Example_:
|
|
1291
1296
|
If `true`:
|
|
@@ -342,7 +342,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
342
342
|
|
|
343
343
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
344
344
|
|
|
345
|
-
```
|
|
345
|
+
```bash
|
|
346
346
|
# Ignore the files generated by Intlayer
|
|
347
347
|
.intlayer
|
|
348
348
|
```
|
|
@@ -398,7 +398,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
398
398
|
|
|
399
399
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
400
400
|
|
|
401
|
-
```
|
|
401
|
+
```bash
|
|
402
402
|
# Ignore the files generated by Intlayer
|
|
403
403
|
.intlayer
|
|
404
404
|
```
|
|
@@ -226,7 +226,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
226
226
|
|
|
227
227
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
228
228
|
|
|
229
|
-
```
|
|
229
|
+
```bash
|
|
230
230
|
# Ignore the files generated by Intlayer
|
|
231
231
|
.intlayer
|
|
232
232
|
```
|