@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
|
@@ -561,6 +561,165 @@ To be able to visualize the intlayer editor selector, you will have to use the c
|
|
|
561
561
|
</div>
|
|
562
562
|
```
|
|
563
563
|
|
|
564
|
+
### (Optional) Step 12: Extract the content of your components
|
|
565
|
+
|
|
566
|
+
If you have an existing codebase, transforming thousands of files can be time-consuming.
|
|
567
|
+
|
|
568
|
+
To ease this process, Intlayer propose a [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/extract.md) to transform your components and extract the content.
|
|
569
|
+
|
|
570
|
+
To set it up, you can add a `compiler` section in your `intlayer.config.ts` file:
|
|
571
|
+
|
|
572
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
573
|
+
import { type IntlayerConfig } from "intlayer";
|
|
574
|
+
|
|
575
|
+
const config: IntlayerConfig = {
|
|
576
|
+
// ... Rest of your config
|
|
577
|
+
compiler: {
|
|
578
|
+
/**
|
|
579
|
+
* Indicates if the compiler should be enabled.
|
|
580
|
+
*/
|
|
581
|
+
enabled: true,
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Defines the output files path
|
|
585
|
+
*/
|
|
586
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Indicates if the components should be saved after being transformed.
|
|
590
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
591
|
+
*/
|
|
592
|
+
saveComponents: false,
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Dictionary key prefix
|
|
596
|
+
*/
|
|
597
|
+
dictionaryKeyPrefix: "",
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
export default config;
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
605
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
606
|
+
const config = {
|
|
607
|
+
// ... Rest of your config
|
|
608
|
+
compiler: {
|
|
609
|
+
/**
|
|
610
|
+
* Indicates if the compiler should be enabled.
|
|
611
|
+
*/
|
|
612
|
+
enabled: true,
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Defines the output files path
|
|
616
|
+
*/
|
|
617
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Indicates if the components should be saved after being transformed.
|
|
621
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
622
|
+
*/
|
|
623
|
+
saveComponents: false,
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Dictionary key prefix
|
|
627
|
+
*/
|
|
628
|
+
dictionaryKeyPrefix: "",
|
|
629
|
+
},
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
export default config;
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
636
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
637
|
+
const config = {
|
|
638
|
+
// ... Rest of your config
|
|
639
|
+
compiler: {
|
|
640
|
+
/**
|
|
641
|
+
* Indicates if the compiler should be enabled.
|
|
642
|
+
*/
|
|
643
|
+
enabled: true,
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Defines the output files path
|
|
647
|
+
*/
|
|
648
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Indicates if the components should be saved after being transformed.
|
|
652
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
653
|
+
*/
|
|
654
|
+
saveComponents: false,
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Dictionary key prefix
|
|
658
|
+
*/
|
|
659
|
+
dictionaryKeyPrefix: "",
|
|
660
|
+
},
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
module.exports = config;
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
<Tabs>
|
|
667
|
+
<Tab value='Extract command'>
|
|
668
|
+
|
|
669
|
+
Run the extractor to transform your components and extract the content
|
|
670
|
+
|
|
671
|
+
```bash packageManager="npm"
|
|
672
|
+
npx intlayer extract
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
```bash packageManager="pnpm"
|
|
676
|
+
pnpm intlayer extract
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
```bash packageManager="yarn"
|
|
680
|
+
yarn intlayer extract
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
```bash packageManager="bun"
|
|
684
|
+
bunx intlayer extract
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
</Tab>
|
|
688
|
+
<Tab value='Babel compiler'>
|
|
689
|
+
|
|
690
|
+
Update your `vite.config.ts` to include the `intlayerCompiler` plugin:
|
|
691
|
+
|
|
692
|
+
```ts fileName="vite.config.ts"
|
|
693
|
+
import { defineConfig } from "vite";
|
|
694
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
695
|
+
|
|
696
|
+
export default defineConfig({
|
|
697
|
+
plugins: [
|
|
698
|
+
intlayer(),
|
|
699
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
700
|
+
],
|
|
701
|
+
});
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
```bash packageManager="npm"
|
|
705
|
+
npm run build # Or npm run dev
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
```bash packageManager="pnpm"
|
|
709
|
+
pnpm run build # Or pnpm run dev
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
```bash packageManager="yarn"
|
|
713
|
+
yarn build # Or yarn dev
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
```bash packageManager="bun"
|
|
717
|
+
bun run build # Or bun run dev
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
</Tab>
|
|
721
|
+
</Tabs>
|
|
722
|
+
|
|
564
723
|
### Git Configuration
|
|
565
724
|
|
|
566
725
|
It is recommended to ignore the files generated by Intlayer.
|
|
@@ -753,9 +753,168 @@ export const Route = createFileRoute("/{-$locale}/$")({
|
|
|
753
753
|
});
|
|
754
754
|
```
|
|
755
755
|
|
|
756
|
+
### (Optional) Step 15: Extract the content of your components
|
|
757
|
+
|
|
758
|
+
If you have an existing codebase, transforming thousands of files can be time-consuming.
|
|
759
|
+
|
|
760
|
+
To ease this process, Intlayer propose a [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/extract.md) to transform your components and extract the content.
|
|
761
|
+
|
|
762
|
+
To set it up, you can add a `compiler` section in your `intlayer.config.ts` file:
|
|
763
|
+
|
|
764
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
765
|
+
import { type IntlayerConfig } from "intlayer";
|
|
766
|
+
|
|
767
|
+
const config: IntlayerConfig = {
|
|
768
|
+
// ... Rest of your config
|
|
769
|
+
compiler: {
|
|
770
|
+
/**
|
|
771
|
+
* Indicates if the compiler should be enabled.
|
|
772
|
+
*/
|
|
773
|
+
enabled: true,
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Defines the output files path
|
|
777
|
+
*/
|
|
778
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Indicates if the components should be saved after being transformed.
|
|
782
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
783
|
+
*/
|
|
784
|
+
saveComponents: false,
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Dictionary key prefix
|
|
788
|
+
*/
|
|
789
|
+
dictionaryKeyPrefix: "",
|
|
790
|
+
},
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
export default config;
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
797
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
798
|
+
const config = {
|
|
799
|
+
// ... Rest of your config
|
|
800
|
+
compiler: {
|
|
801
|
+
/**
|
|
802
|
+
* Indicates if the compiler should be enabled.
|
|
803
|
+
*/
|
|
804
|
+
enabled: true,
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Defines the output files path
|
|
808
|
+
*/
|
|
809
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Indicates if the components should be saved after being transformed.
|
|
813
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
814
|
+
*/
|
|
815
|
+
saveComponents: false,
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Dictionary key prefix
|
|
819
|
+
*/
|
|
820
|
+
dictionaryKeyPrefix: "",
|
|
821
|
+
},
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
export default config;
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
828
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
829
|
+
const config = {
|
|
830
|
+
// ... Rest of your config
|
|
831
|
+
compiler: {
|
|
832
|
+
/**
|
|
833
|
+
* Indicates if the compiler should be enabled.
|
|
834
|
+
*/
|
|
835
|
+
enabled: true,
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Defines the output files path
|
|
839
|
+
*/
|
|
840
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Indicates if the components should be saved after being transformed.
|
|
844
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
845
|
+
*/
|
|
846
|
+
saveComponents: false,
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Dictionary key prefix
|
|
850
|
+
*/
|
|
851
|
+
dictionaryKeyPrefix: "",
|
|
852
|
+
},
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
module.exports = config;
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
<Tabs>
|
|
859
|
+
<Tab value='Extract command'>
|
|
860
|
+
|
|
861
|
+
Run the extractor to transform your components and extract the content
|
|
862
|
+
|
|
863
|
+
```bash packageManager="npm"
|
|
864
|
+
npx intlayer extract
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
```bash packageManager="pnpm"
|
|
868
|
+
pnpm intlayer extract
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
```bash packageManager="yarn"
|
|
872
|
+
yarn intlayer extract
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
```bash packageManager="bun"
|
|
876
|
+
bunx intlayer extract
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
</Tab>
|
|
880
|
+
<Tab value='Babel compiler'>
|
|
881
|
+
|
|
882
|
+
Update your `vite.config.ts` to include the `intlayerCompiler` plugin:
|
|
883
|
+
|
|
884
|
+
```ts fileName="vite.config.ts"
|
|
885
|
+
import { defineConfig } from "vite";
|
|
886
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
887
|
+
|
|
888
|
+
export default defineConfig({
|
|
889
|
+
plugins: [
|
|
890
|
+
intlayer(),
|
|
891
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
892
|
+
],
|
|
893
|
+
});
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
```bash packageManager="npm"
|
|
897
|
+
npm run build # Or npm run dev
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
```bash packageManager="pnpm"
|
|
901
|
+
pnpm run build # Or pnpm run dev
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
```bash packageManager="yarn"
|
|
905
|
+
yarn build # Or yarn dev
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
```bash packageManager="bun"
|
|
909
|
+
bun run build # Or bun run dev
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
</Tab>
|
|
913
|
+
</Tabs>
|
|
914
|
+
|
|
756
915
|
---
|
|
757
916
|
|
|
758
|
-
### Step
|
|
917
|
+
### Step 16: Configure TypeScript (Optional)
|
|
759
918
|
|
|
760
919
|
Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
761
920
|
|
|
@@ -1316,6 +1316,165 @@ return (
|
|
|
1316
1316
|
);
|
|
1317
1317
|
```
|
|
1318
1318
|
|
|
1319
|
+
### (Optional) Step 12: Extract the content of your components
|
|
1320
|
+
|
|
1321
|
+
If you have an existing codebase, transforming thousands of files can be time-consuming.
|
|
1322
|
+
|
|
1323
|
+
To ease this process, Intlayer propose a [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/extract.md) to transform your components and extract the content.
|
|
1324
|
+
|
|
1325
|
+
To set it up, you can add a `compiler` section in your `intlayer.config.ts` file:
|
|
1326
|
+
|
|
1327
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1328
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1329
|
+
|
|
1330
|
+
const config: IntlayerConfig = {
|
|
1331
|
+
// ... Rest of your config
|
|
1332
|
+
compiler: {
|
|
1333
|
+
/**
|
|
1334
|
+
* Indicates if the compiler should be enabled.
|
|
1335
|
+
*/
|
|
1336
|
+
enabled: true,
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Defines the output files path
|
|
1340
|
+
*/
|
|
1341
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Indicates if the components should be saved after being transformed.
|
|
1345
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1346
|
+
*/
|
|
1347
|
+
saveComponents: false,
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Dictionary key prefix
|
|
1351
|
+
*/
|
|
1352
|
+
dictionaryKeyPrefix: "",
|
|
1353
|
+
},
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
export default config;
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1360
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1361
|
+
const config = {
|
|
1362
|
+
// ... Rest of your config
|
|
1363
|
+
compiler: {
|
|
1364
|
+
/**
|
|
1365
|
+
* Indicates if the compiler should be enabled.
|
|
1366
|
+
*/
|
|
1367
|
+
enabled: true,
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Defines the output files path
|
|
1371
|
+
*/
|
|
1372
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Indicates if the components should be saved after being transformed.
|
|
1376
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1377
|
+
*/
|
|
1378
|
+
saveComponents: false,
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Dictionary key prefix
|
|
1382
|
+
*/
|
|
1383
|
+
dictionaryKeyPrefix: "",
|
|
1384
|
+
},
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
export default config;
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1391
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1392
|
+
const config = {
|
|
1393
|
+
// ... Rest of your config
|
|
1394
|
+
compiler: {
|
|
1395
|
+
/**
|
|
1396
|
+
* Indicates if the compiler should be enabled.
|
|
1397
|
+
*/
|
|
1398
|
+
enabled: true,
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* Defines the output files path
|
|
1402
|
+
*/
|
|
1403
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Indicates if the components should be saved after being transformed.
|
|
1407
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1408
|
+
*/
|
|
1409
|
+
saveComponents: false,
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Dictionary key prefix
|
|
1413
|
+
*/
|
|
1414
|
+
dictionaryKeyPrefix: "",
|
|
1415
|
+
},
|
|
1416
|
+
};
|
|
1417
|
+
|
|
1418
|
+
module.exports = config;
|
|
1419
|
+
```
|
|
1420
|
+
|
|
1421
|
+
<Tabs>
|
|
1422
|
+
<Tab value='Extract command'>
|
|
1423
|
+
|
|
1424
|
+
Run the extractor to transform your components and extract the content
|
|
1425
|
+
|
|
1426
|
+
```bash packageManager="npm"
|
|
1427
|
+
npx intlayer extract
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
```bash packageManager="pnpm"
|
|
1431
|
+
pnpm intlayer extract
|
|
1432
|
+
```
|
|
1433
|
+
|
|
1434
|
+
```bash packageManager="yarn"
|
|
1435
|
+
yarn intlayer extract
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
```bash packageManager="bun"
|
|
1439
|
+
bunx intlayer extract
|
|
1440
|
+
```
|
|
1441
|
+
|
|
1442
|
+
</Tab>
|
|
1443
|
+
<Tab value='Babel compiler'>
|
|
1444
|
+
|
|
1445
|
+
Update your `vite.config.ts` to include the `intlayerCompiler` plugin:
|
|
1446
|
+
|
|
1447
|
+
```ts fileName="vite.config.ts"
|
|
1448
|
+
import { defineConfig } from "vite";
|
|
1449
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
1450
|
+
|
|
1451
|
+
export default defineConfig({
|
|
1452
|
+
plugins: [
|
|
1453
|
+
intlayer(),
|
|
1454
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
1455
|
+
],
|
|
1456
|
+
});
|
|
1457
|
+
```
|
|
1458
|
+
|
|
1459
|
+
```bash packageManager="npm"
|
|
1460
|
+
npm run build # Or npm run dev
|
|
1461
|
+
```
|
|
1462
|
+
|
|
1463
|
+
```bash packageManager="pnpm"
|
|
1464
|
+
pnpm run build # Or pnpm run dev
|
|
1465
|
+
```
|
|
1466
|
+
|
|
1467
|
+
```bash packageManager="yarn"
|
|
1468
|
+
yarn build # Or yarn dev
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
```bash packageManager="bun"
|
|
1472
|
+
bun run build # Or bun run dev
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
</Tab>
|
|
1476
|
+
</Tabs>
|
|
1477
|
+
|
|
1319
1478
|
### Configure TypeScript
|
|
1320
1479
|
|
|
1321
1480
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|
|
@@ -1350,7 +1509,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
1350
1509
|
|
|
1351
1510
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
1352
1511
|
|
|
1353
|
-
```
|
|
1512
|
+
```bash
|
|
1354
1513
|
# Ignore the files generated by Intlayer
|
|
1355
1514
|
.intlayer
|
|
1356
1515
|
```
|
|
@@ -1357,6 +1357,165 @@ Link.displayName = "Link";
|
|
|
1357
1357
|
|
|
1358
1358
|
By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience while also benefitting from improved SEO and usability.
|
|
1359
1359
|
|
|
1360
|
+
### (Optional) Step 11: Extract the content of your components
|
|
1361
|
+
|
|
1362
|
+
If you have an existing codebase, transforming thousands of files can be time-consuming.
|
|
1363
|
+
|
|
1364
|
+
To ease this process, Intlayer propose a [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/extract.md) to transform your components and extract the content.
|
|
1365
|
+
|
|
1366
|
+
To set it up, you can add a `compiler` section in your `intlayer.config.ts` file:
|
|
1367
|
+
|
|
1368
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1369
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1370
|
+
|
|
1371
|
+
const config: IntlayerConfig = {
|
|
1372
|
+
// ... Rest of your config
|
|
1373
|
+
compiler: {
|
|
1374
|
+
/**
|
|
1375
|
+
* Indicates if the compiler should be enabled.
|
|
1376
|
+
*/
|
|
1377
|
+
enabled: true,
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Defines the output files path
|
|
1381
|
+
*/
|
|
1382
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Indicates if the components should be saved after being transformed.
|
|
1386
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1387
|
+
*/
|
|
1388
|
+
saveComponents: false,
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Dictionary key prefix
|
|
1392
|
+
*/
|
|
1393
|
+
dictionaryKeyPrefix: "",
|
|
1394
|
+
},
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
export default config;
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1401
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1402
|
+
const config = {
|
|
1403
|
+
// ... Rest of your config
|
|
1404
|
+
compiler: {
|
|
1405
|
+
/**
|
|
1406
|
+
* Indicates if the compiler should be enabled.
|
|
1407
|
+
*/
|
|
1408
|
+
enabled: true,
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Defines the output files path
|
|
1412
|
+
*/
|
|
1413
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* Indicates if the components should be saved after being transformed.
|
|
1417
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1418
|
+
*/
|
|
1419
|
+
saveComponents: false,
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Dictionary key prefix
|
|
1423
|
+
*/
|
|
1424
|
+
dictionaryKeyPrefix: "",
|
|
1425
|
+
},
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1428
|
+
export default config;
|
|
1429
|
+
```
|
|
1430
|
+
|
|
1431
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1432
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1433
|
+
const config = {
|
|
1434
|
+
// ... Rest of your config
|
|
1435
|
+
compiler: {
|
|
1436
|
+
/**
|
|
1437
|
+
* Indicates if the compiler should be enabled.
|
|
1438
|
+
*/
|
|
1439
|
+
enabled: true,
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* Defines the output files path
|
|
1443
|
+
*/
|
|
1444
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* Indicates if the components should be saved after being transformed.
|
|
1448
|
+
* That way, the compiler can be run only once to transform the app, and then it can be removed.
|
|
1449
|
+
*/
|
|
1450
|
+
saveComponents: false,
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Dictionary key prefix
|
|
1454
|
+
*/
|
|
1455
|
+
dictionaryKeyPrefix: "",
|
|
1456
|
+
},
|
|
1457
|
+
};
|
|
1458
|
+
|
|
1459
|
+
module.exports = config;
|
|
1460
|
+
```
|
|
1461
|
+
|
|
1462
|
+
<Tabs>
|
|
1463
|
+
<Tab value='Extract command'>
|
|
1464
|
+
|
|
1465
|
+
Run the extractor to transform your components and extract the content
|
|
1466
|
+
|
|
1467
|
+
```bash packageManager="npm"
|
|
1468
|
+
npx intlayer extract
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
```bash packageManager="pnpm"
|
|
1472
|
+
pnpm intlayer extract
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
```bash packageManager="yarn"
|
|
1476
|
+
yarn intlayer extract
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
```bash packageManager="bun"
|
|
1480
|
+
bunx intlayer extract
|
|
1481
|
+
```
|
|
1482
|
+
|
|
1483
|
+
</Tab>
|
|
1484
|
+
<Tab value='Babel compiler'>
|
|
1485
|
+
|
|
1486
|
+
Update your `vite.config.ts` to include the `intlayerCompiler` plugin:
|
|
1487
|
+
|
|
1488
|
+
```ts fileName="vite.config.ts"
|
|
1489
|
+
import { defineConfig } from "vite";
|
|
1490
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
1491
|
+
|
|
1492
|
+
export default defineConfig({
|
|
1493
|
+
plugins: [
|
|
1494
|
+
intlayer(),
|
|
1495
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
1496
|
+
],
|
|
1497
|
+
});
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1500
|
+
```bash packageManager="npm"
|
|
1501
|
+
npm run build # Or npm run dev
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1504
|
+
```bash packageManager="pnpm"
|
|
1505
|
+
pnpm run build # Or pnpm run dev
|
|
1506
|
+
```
|
|
1507
|
+
|
|
1508
|
+
```bash packageManager="yarn"
|
|
1509
|
+
yarn build # Or yarn dev
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
```bash packageManager="bun"
|
|
1513
|
+
bun run build # Or bun run dev
|
|
1514
|
+
```
|
|
1515
|
+
|
|
1516
|
+
</Tab>
|
|
1517
|
+
</Tabs>
|
|
1518
|
+
|
|
1360
1519
|
### Configure TypeScript
|
|
1361
1520
|
|
|
1362
1521
|
Intlayer use module augmentation to get benefits of TypeScript and make your codebase stronger.
|