@intlayer/docs 9.0.0-canary.5 → 9.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/docs.entry.cjs +80 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +80 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +4 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/compiler.md +6 -3
- package/docs/ar/custom_domains.md +8 -2
- package/docs/ar/custom_url_rewrites.md +8 -2
- package/docs/ar/intlayer_with_analog.md +5 -1
- package/docs/ar/intlayer_with_astro.md +2 -0
- package/docs/ar/intlayer_with_astro_lit.md +2 -0
- package/docs/ar/intlayer_with_astro_preact.md +2 -0
- package/docs/ar/intlayer_with_astro_react.md +2 -0
- package/docs/ar/intlayer_with_astro_solid.md +2 -0
- package/docs/ar/intlayer_with_astro_svelte.md +2 -0
- package/docs/ar/intlayer_with_astro_vanilla.md +2 -0
- package/docs/ar/intlayer_with_astro_vue.md +2 -0
- package/docs/ar/intlayer_with_lynx+react.md +6 -1
- package/docs/ar/intlayer_with_nextjs_16.md +2 -0
- package/docs/ar/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/ar/intlayer_with_react_native+expo.md +62 -80
- package/docs/ar/intlayer_with_react_router_v7.md +3 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/ar/intlayer_with_storybook.md +7 -1
- package/docs/ar/intlayer_with_svelte_kit.md +8 -3
- package/docs/ar/intlayer_with_tanstack+solid.md +18 -11
- package/docs/ar/intlayer_with_tanstack.md +16 -7
- package/docs/ar/intlayer_with_vite+lit.md +8 -2
- package/docs/ar/intlayer_with_vite+preact.md +2 -0
- package/docs/ar/intlayer_with_vite+react.md +8 -3
- package/docs/ar/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/ar/intlayer_with_vite+solid.md +2 -0
- package/docs/ar/intlayer_with_vite+svelte.md +4 -2
- package/docs/ar/intlayer_with_vite+vanilla.md +16 -5
- package/docs/ar/intlayer_with_vite+vue.md +8 -3
- package/docs/ar/packages/@intlayer_babel/export.md +131 -0
- package/docs/ar/packages/react-native-intlayer/exports.md +48 -14
- package/docs/ar/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/ar/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/ar/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/ar/releases/v9.md +45 -1
- package/docs/bn/custom_domains.md +8 -2
- package/docs/bn/intlayer_with_storybook.md +7 -1
- package/docs/bn/intlayer_with_vite+lit.md +8 -2
- package/docs/bn/intlayer_with_vite+vanilla.md +16 -5
- package/docs/cs/custom_domains.md +8 -2
- package/docs/cs/intlayer_with_storybook.md +7 -1
- package/docs/cs/intlayer_with_vite+lit.md +8 -2
- package/docs/cs/intlayer_with_vite+vanilla.md +16 -5
- package/docs/de/compiler.md +6 -3
- package/docs/de/custom_domains.md +8 -2
- package/docs/de/custom_url_rewrites.md +8 -2
- package/docs/de/intlayer_with_analog.md +5 -1
- package/docs/de/intlayer_with_astro.md +3 -1
- package/docs/de/intlayer_with_astro_lit.md +3 -1
- package/docs/de/intlayer_with_astro_preact.md +3 -1
- package/docs/de/intlayer_with_astro_react.md +3 -1
- package/docs/de/intlayer_with_astro_solid.md +3 -1
- package/docs/de/intlayer_with_astro_svelte.md +3 -1
- package/docs/de/intlayer_with_astro_vanilla.md +3 -1
- package/docs/de/intlayer_with_astro_vue.md +3 -1
- package/docs/de/intlayer_with_lynx+react.md +6 -1
- package/docs/de/intlayer_with_nextjs_16.md +2 -0
- package/docs/de/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/de/intlayer_with_react_native+expo.md +56 -69
- package/docs/de/intlayer_with_react_router_v7.md +3 -1
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +8 -3
- package/docs/de/intlayer_with_storybook.md +7 -1
- package/docs/de/intlayer_with_svelte_kit.md +9 -4
- package/docs/de/intlayer_with_tanstack+solid.md +18 -11
- package/docs/de/intlayer_with_tanstack.md +17 -8
- package/docs/de/intlayer_with_vite+lit.md +13 -4
- package/docs/de/intlayer_with_vite+preact.md +3 -1
- package/docs/de/intlayer_with_vite+react.md +9 -4
- package/docs/de/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/de/intlayer_with_vite+solid.md +3 -1
- package/docs/de/intlayer_with_vite+svelte.md +9 -4
- package/docs/de/intlayer_with_vite+vanilla.md +16 -5
- package/docs/de/intlayer_with_vite+vue.md +9 -4
- package/docs/de/packages/@intlayer_babel/export.md +131 -0
- package/docs/de/packages/react-native-intlayer/exports.md +47 -13
- package/docs/de/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/de/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/de/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/de/releases/v9.md +23 -1
- package/docs/en/compiler.md +5 -1
- package/docs/en/custom_domains.md +8 -2
- package/docs/en/custom_url_rewrites.md +8 -2
- package/docs/en/intlayer_with_analog.md +5 -1
- package/docs/en/intlayer_with_astro.md +2 -2
- package/docs/en/intlayer_with_astro_lit.md +2 -2
- package/docs/en/intlayer_with_astro_preact.md +2 -2
- package/docs/en/intlayer_with_astro_react.md +2 -2
- package/docs/en/intlayer_with_astro_solid.md +2 -2
- package/docs/en/intlayer_with_astro_svelte.md +2 -2
- package/docs/en/intlayer_with_astro_vanilla.md +2 -2
- package/docs/en/intlayer_with_astro_vue.md +2 -2
- package/docs/en/intlayer_with_lynx+react.md +6 -1
- package/docs/en/intlayer_with_nextjs_16.md +2 -0
- package/docs/en/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/en/intlayer_with_react_native+expo.md +20 -19
- package/docs/en/intlayer_with_react_router_v7.md +8 -3
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +8 -3
- package/docs/en/intlayer_with_storybook.md +7 -1
- package/docs/en/intlayer_with_svelte_kit.md +8 -5
- package/docs/en/intlayer_with_tanstack+solid.md +18 -9
- package/docs/en/intlayer_with_tanstack.md +16 -7
- package/docs/en/intlayer_with_vite+lit.md +13 -4
- package/docs/en/intlayer_with_vite+preact.md +8 -3
- package/docs/en/intlayer_with_vite+react.md +8 -3
- package/docs/en/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/en/intlayer_with_vite+solid.md +8 -3
- package/docs/en/intlayer_with_vite+svelte.md +8 -3
- package/docs/en/intlayer_with_vite+vanilla.md +15 -6
- package/docs/en/intlayer_with_vite+vue.md +8 -3
- package/docs/en/packages/@intlayer_babel/export.md +131 -0
- package/docs/en/packages/react-native-intlayer/exports.md +47 -13
- package/docs/en/packages/vite-intlayer/exports.md +38 -13
- package/docs/en/packages/vite-intlayer/intlayer.md +133 -14
- package/docs/en/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/en/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/en/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/en/packages/vite-intlayer/intlayerPrune.md +90 -12
- package/docs/en/releases/v9.md +25 -1
- package/docs/en-GB/compiler.md +6 -3
- package/docs/en-GB/custom_domains.md +8 -2
- package/docs/en-GB/custom_url_rewrites.md +8 -2
- package/docs/en-GB/intlayer_with_analog.md +5 -1
- package/docs/en-GB/intlayer_with_astro.md +2 -0
- package/docs/en-GB/intlayer_with_astro_lit.md +2 -0
- package/docs/en-GB/intlayer_with_astro_preact.md +2 -0
- package/docs/en-GB/intlayer_with_astro_react.md +2 -0
- package/docs/en-GB/intlayer_with_astro_solid.md +2 -0
- package/docs/en-GB/intlayer_with_astro_svelte.md +2 -0
- package/docs/en-GB/intlayer_with_astro_vanilla.md +2 -0
- package/docs/en-GB/intlayer_with_astro_vue.md +2 -0
- package/docs/en-GB/intlayer_with_lynx+react.md +6 -1
- package/docs/en-GB/intlayer_with_react_native+expo.md +46 -95
- package/docs/en-GB/intlayer_with_react_router_v7.md +6 -3
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +6 -3
- package/docs/en-GB/intlayer_with_storybook.md +7 -1
- package/docs/en-GB/intlayer_with_svelte_kit.md +6 -3
- package/docs/en-GB/intlayer_with_tanstack+solid.md +18 -11
- package/docs/en-GB/intlayer_with_tanstack.md +14 -7
- package/docs/en-GB/intlayer_with_vite+lit.md +13 -4
- package/docs/en-GB/intlayer_with_vite+react.md +6 -3
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/en-GB/intlayer_with_vite+svelte.md +6 -3
- package/docs/en-GB/intlayer_with_vite+vanilla.md +15 -4
- package/docs/en-GB/intlayer_with_vite+vue.md +6 -3
- package/docs/en-GB/packages/@intlayer_babel/export.md +131 -0
- package/docs/en-GB/packages/react-native-intlayer/exports.md +51 -18
- package/docs/en-GB/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/en-GB/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/en-GB/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/en-GB/releases/v9.md +23 -1
- package/docs/es/compiler.md +6 -3
- package/docs/es/custom_domains.md +8 -2
- package/docs/es/custom_url_rewrites.md +8 -2
- package/docs/es/intlayer_with_analog.md +5 -1
- package/docs/es/intlayer_with_astro.md +3 -1
- package/docs/es/intlayer_with_astro_lit.md +3 -1
- package/docs/es/intlayer_with_astro_preact.md +3 -1
- package/docs/es/intlayer_with_astro_react.md +3 -1
- package/docs/es/intlayer_with_astro_solid.md +3 -1
- package/docs/es/intlayer_with_astro_svelte.md +3 -1
- package/docs/es/intlayer_with_astro_vanilla.md +3 -1
- package/docs/es/intlayer_with_astro_vue.md +3 -1
- package/docs/es/intlayer_with_lynx+react.md +6 -1
- package/docs/es/intlayer_with_nextjs_16.md +2 -0
- package/docs/es/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/es/intlayer_with_react_native+expo.md +49 -81
- package/docs/es/intlayer_with_react_router_v7.md +3 -1
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +9 -4
- package/docs/es/intlayer_with_storybook.md +7 -1
- package/docs/es/intlayer_with_svelte_kit.md +9 -4
- package/docs/es/intlayer_with_tanstack+solid.md +18 -11
- package/docs/es/intlayer_with_tanstack.md +17 -8
- package/docs/es/intlayer_with_vite+lit.md +13 -4
- package/docs/es/intlayer_with_vite+preact.md +3 -1
- package/docs/es/intlayer_with_vite+react.md +9 -4
- package/docs/es/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/es/intlayer_with_vite+solid.md +3 -1
- package/docs/es/intlayer_with_vite+svelte.md +4 -2
- package/docs/es/intlayer_with_vite+vanilla.md +16 -5
- package/docs/es/intlayer_with_vite+vue.md +9 -4
- package/docs/es/packages/@intlayer_babel/export.md +131 -0
- package/docs/es/packages/react-native-intlayer/exports.md +47 -13
- package/docs/es/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/es/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/es/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/es/releases/v9.md +23 -1
- package/docs/fr/compiler.md +6 -3
- package/docs/fr/custom_domains.md +8 -2
- package/docs/fr/custom_url_rewrites.md +8 -2
- package/docs/fr/intlayer_with_analog.md +5 -1
- package/docs/fr/intlayer_with_astro.md +3 -1
- package/docs/fr/intlayer_with_astro_lit.md +3 -1
- package/docs/fr/intlayer_with_astro_preact.md +3 -1
- package/docs/fr/intlayer_with_astro_react.md +3 -1
- package/docs/fr/intlayer_with_astro_solid.md +3 -1
- package/docs/fr/intlayer_with_astro_svelte.md +3 -1
- package/docs/fr/intlayer_with_astro_vanilla.md +3 -1
- package/docs/fr/intlayer_with_astro_vue.md +3 -1
- package/docs/fr/intlayer_with_lynx+react.md +6 -1
- package/docs/fr/intlayer_with_nextjs_16.md +2 -0
- package/docs/fr/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/fr/intlayer_with_react_native+expo.md +60 -69
- package/docs/fr/intlayer_with_react_router_v7.md +3 -1
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/fr/intlayer_with_storybook.md +7 -1
- package/docs/fr/intlayer_with_svelte_kit.md +9 -4
- package/docs/fr/intlayer_with_tanstack+solid.md +18 -11
- package/docs/fr/intlayer_with_tanstack.md +17 -8
- package/docs/fr/intlayer_with_vite+lit.md +13 -4
- package/docs/fr/intlayer_with_vite+preact.md +3 -1
- package/docs/fr/intlayer_with_vite+react.md +9 -4
- package/docs/fr/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/fr/intlayer_with_vite+solid.md +3 -1
- package/docs/fr/intlayer_with_vite+svelte.md +9 -4
- package/docs/fr/intlayer_with_vite+vanilla.md +16 -5
- package/docs/fr/intlayer_with_vite+vue.md +9 -4
- package/docs/fr/packages/@intlayer_babel/export.md +131 -0
- package/docs/fr/packages/react-native-intlayer/exports.md +47 -13
- package/docs/fr/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/fr/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/fr/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/fr/releases/v9.md +23 -1
- package/docs/hi/compiler.md +6 -3
- package/docs/hi/custom_domains.md +8 -2
- package/docs/hi/custom_url_rewrites.md +8 -2
- package/docs/hi/intlayer_with_analog.md +5 -1
- package/docs/hi/intlayer_with_astro.md +6 -3
- package/docs/hi/intlayer_with_astro_lit.md +6 -3
- package/docs/hi/intlayer_with_astro_preact.md +6 -3
- package/docs/hi/intlayer_with_astro_react.md +6 -3
- package/docs/hi/intlayer_with_astro_solid.md +6 -3
- package/docs/hi/intlayer_with_astro_svelte.md +6 -3
- package/docs/hi/intlayer_with_astro_vanilla.md +6 -3
- package/docs/hi/intlayer_with_astro_vue.md +6 -3
- package/docs/hi/intlayer_with_lynx+react.md +6 -1
- package/docs/hi/intlayer_with_react_native+expo.md +96 -88
- package/docs/hi/intlayer_with_react_router_v7.md +6 -3
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +6 -3
- package/docs/hi/intlayer_with_storybook.md +7 -1
- package/docs/hi/intlayer_with_svelte_kit.md +12 -6
- package/docs/hi/intlayer_with_tanstack+solid.md +18 -11
- package/docs/hi/intlayer_with_tanstack.md +20 -10
- package/docs/hi/intlayer_with_vite+lit.md +8 -2
- package/docs/hi/intlayer_with_vite+preact.md +6 -3
- package/docs/hi/intlayer_with_vite+react.md +12 -6
- package/docs/hi/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/hi/intlayer_with_vite+solid.md +6 -3
- package/docs/hi/intlayer_with_vite+svelte.md +7 -4
- package/docs/hi/intlayer_with_vite+vanilla.md +16 -5
- package/docs/hi/intlayer_with_vite+vue.md +12 -6
- package/docs/hi/packages/@intlayer_babel/export.md +131 -0
- package/docs/hi/packages/react-native-intlayer/exports.md +48 -14
- package/docs/hi/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/hi/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/hi/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/hi/releases/v9.md +23 -1
- package/docs/id/compiler.md +6 -3
- package/docs/id/custom_domains.md +8 -2
- package/docs/id/custom_url_rewrites.md +8 -2
- package/docs/id/intlayer_with_analog.md +5 -1
- package/docs/id/intlayer_with_astro.md +3 -1
- package/docs/id/intlayer_with_astro_lit.md +3 -1
- package/docs/id/intlayer_with_astro_preact.md +3 -1
- package/docs/id/intlayer_with_astro_react.md +3 -1
- package/docs/id/intlayer_with_astro_solid.md +3 -1
- package/docs/id/intlayer_with_astro_svelte.md +3 -1
- package/docs/id/intlayer_with_astro_vanilla.md +3 -1
- package/docs/id/intlayer_with_astro_vue.md +3 -1
- package/docs/id/intlayer_with_lynx+react.md +6 -1
- package/docs/id/intlayer_with_nextjs_16.md +2 -0
- package/docs/id/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/id/intlayer_with_react_native+expo.md +51 -34
- package/docs/id/intlayer_with_react_router_v7.md +3 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +9 -4
- package/docs/id/intlayer_with_storybook.md +7 -1
- package/docs/id/intlayer_with_svelte_kit.md +9 -4
- package/docs/id/intlayer_with_tanstack+solid.md +18 -11
- package/docs/id/intlayer_with_tanstack.md +17 -8
- package/docs/id/intlayer_with_vite+lit.md +8 -2
- package/docs/id/intlayer_with_vite+preact.md +3 -1
- package/docs/id/intlayer_with_vite+react.md +9 -4
- package/docs/id/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/id/intlayer_with_vite+solid.md +3 -1
- package/docs/id/intlayer_with_vite+svelte.md +5 -3
- package/docs/id/intlayer_with_vite+vanilla.md +16 -5
- package/docs/id/intlayer_with_vite+vue.md +9 -4
- package/docs/id/packages/@intlayer_babel/export.md +131 -0
- package/docs/id/packages/react-native-intlayer/exports.md +47 -13
- package/docs/id/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/id/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/id/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/id/releases/v9.md +23 -1
- package/docs/it/compiler.md +6 -3
- package/docs/it/custom_domains.md +8 -2
- package/docs/it/custom_url_rewrites.md +8 -2
- package/docs/it/intlayer_with_analog.md +5 -1
- package/docs/it/intlayer_with_astro.md +3 -1
- package/docs/it/intlayer_with_astro_lit.md +3 -1
- package/docs/it/intlayer_with_astro_preact.md +3 -1
- package/docs/it/intlayer_with_astro_react.md +3 -1
- package/docs/it/intlayer_with_astro_solid.md +3 -1
- package/docs/it/intlayer_with_astro_svelte.md +3 -1
- package/docs/it/intlayer_with_astro_vanilla.md +3 -1
- package/docs/it/intlayer_with_astro_vue.md +3 -1
- package/docs/it/intlayer_with_lynx+react.md +6 -1
- package/docs/it/intlayer_with_nextjs_16.md +2 -0
- package/docs/it/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/it/intlayer_with_react_native+expo.md +38 -73
- package/docs/it/intlayer_with_react_router_v7.md +3 -1
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/it/intlayer_with_storybook.md +7 -1
- package/docs/it/intlayer_with_svelte_kit.md +9 -4
- package/docs/it/intlayer_with_tanstack+solid.md +18 -11
- package/docs/it/intlayer_with_tanstack.md +17 -8
- package/docs/it/intlayer_with_vite+lit.md +13 -4
- package/docs/it/intlayer_with_vite+preact.md +3 -1
- package/docs/it/intlayer_with_vite+react.md +9 -4
- package/docs/it/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/it/intlayer_with_vite+solid.md +3 -1
- package/docs/it/intlayer_with_vite+svelte.md +4 -2
- package/docs/it/intlayer_with_vite+vanilla.md +16 -5
- package/docs/it/intlayer_with_vite+vue.md +9 -4
- package/docs/it/packages/@intlayer_babel/export.md +131 -0
- package/docs/it/packages/react-native-intlayer/exports.md +47 -13
- package/docs/it/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/it/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/it/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/it/releases/v9.md +23 -1
- package/docs/ja/compiler.md +6 -3
- package/docs/ja/custom_domains.md +8 -2
- package/docs/ja/custom_url_rewrites.md +8 -2
- package/docs/ja/intlayer_with_analog.md +5 -1
- package/docs/ja/intlayer_with_astro.md +2 -0
- package/docs/ja/intlayer_with_astro_lit.md +2 -0
- package/docs/ja/intlayer_with_astro_preact.md +2 -0
- package/docs/ja/intlayer_with_astro_react.md +2 -0
- package/docs/ja/intlayer_with_astro_solid.md +2 -0
- package/docs/ja/intlayer_with_astro_svelte.md +2 -0
- package/docs/ja/intlayer_with_astro_vanilla.md +2 -0
- package/docs/ja/intlayer_with_astro_vue.md +2 -0
- package/docs/ja/intlayer_with_lynx+react.md +6 -1
- package/docs/ja/intlayer_with_nextjs_16.md +2 -0
- package/docs/ja/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/ja/intlayer_with_react_native+expo.md +104 -138
- package/docs/ja/intlayer_with_react_router_v7.md +8 -3
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/ja/intlayer_with_storybook.md +7 -1
- package/docs/ja/intlayer_with_svelte_kit.md +2 -0
- package/docs/ja/intlayer_with_tanstack+solid.md +18 -11
- package/docs/ja/intlayer_with_tanstack.md +18 -11
- package/docs/ja/intlayer_with_vite+lit.md +13 -4
- package/docs/ja/intlayer_with_vite+preact.md +8 -3
- package/docs/ja/intlayer_with_vite+react.md +3 -1
- package/docs/ja/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/ja/intlayer_with_vite+solid.md +3 -1
- package/docs/ja/intlayer_with_vite+svelte.md +5 -3
- package/docs/ja/intlayer_with_vite+vanilla.md +16 -5
- package/docs/ja/intlayer_with_vite+vue.md +9 -4
- package/docs/ja/packages/@intlayer_babel/export.md +131 -0
- package/docs/ja/packages/react-native-intlayer/exports.md +47 -14
- package/docs/ja/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/ja/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/ja/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/ja/releases/v9.md +23 -1
- package/docs/ko/compiler.md +6 -3
- package/docs/ko/custom_domains.md +8 -2
- package/docs/ko/custom_url_rewrites.md +8 -2
- package/docs/ko/intlayer_with_analog.md +5 -1
- package/docs/ko/intlayer_with_astro.md +3 -1
- package/docs/ko/intlayer_with_astro_lit.md +3 -1
- package/docs/ko/intlayer_with_astro_preact.md +3 -1
- package/docs/ko/intlayer_with_astro_react.md +3 -1
- package/docs/ko/intlayer_with_astro_solid.md +3 -1
- package/docs/ko/intlayer_with_astro_svelte.md +3 -1
- package/docs/ko/intlayer_with_astro_vanilla.md +3 -1
- package/docs/ko/intlayer_with_astro_vue.md +3 -1
- package/docs/ko/intlayer_with_lynx+react.md +6 -1
- package/docs/ko/intlayer_with_nextjs_16.md +2 -0
- package/docs/ko/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/ko/intlayer_with_react_native+expo.md +237 -30
- package/docs/ko/intlayer_with_react_router_v7.md +3 -1
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/ko/intlayer_with_storybook.md +7 -1
- package/docs/ko/intlayer_with_svelte_kit.md +9 -4
- package/docs/ko/intlayer_with_tanstack+solid.md +18 -11
- package/docs/ko/intlayer_with_tanstack.md +17 -8
- package/docs/ko/intlayer_with_vite+lit.md +13 -4
- package/docs/ko/intlayer_with_vite+preact.md +3 -1
- package/docs/ko/intlayer_with_vite+react.md +3 -1
- package/docs/ko/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/ko/intlayer_with_vite+svelte.md +5 -3
- package/docs/ko/intlayer_with_vite+vanilla.md +16 -5
- package/docs/ko/intlayer_with_vite+vue.md +9 -4
- package/docs/ko/packages/@intlayer_babel/export.md +131 -0
- package/docs/ko/packages/react-native-intlayer/exports.md +48 -14
- package/docs/ko/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/ko/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/ko/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/ko/releases/v9.md +23 -1
- package/docs/nl/custom_domains.md +8 -2
- package/docs/nl/intlayer_with_storybook.md +7 -1
- package/docs/nl/intlayer_with_vite+lit.md +8 -2
- package/docs/nl/intlayer_with_vite+vanilla.md +16 -5
- package/docs/pl/compiler.md +6 -3
- package/docs/pl/custom_domains.md +8 -2
- package/docs/pl/custom_url_rewrites.md +8 -2
- package/docs/pl/intlayer_with_analog.md +5 -1
- package/docs/pl/intlayer_with_astro.md +6 -4
- package/docs/pl/intlayer_with_astro_lit.md +3 -1
- package/docs/pl/intlayer_with_astro_preact.md +3 -1
- package/docs/pl/intlayer_with_astro_react.md +3 -1
- package/docs/pl/intlayer_with_astro_solid.md +3 -1
- package/docs/pl/intlayer_with_astro_svelte.md +3 -1
- package/docs/pl/intlayer_with_astro_vanilla.md +3 -1
- package/docs/pl/intlayer_with_astro_vue.md +3 -1
- package/docs/pl/intlayer_with_lynx+react.md +6 -1
- package/docs/pl/intlayer_with_nextjs_16.md +2 -0
- package/docs/pl/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/pl/intlayer_with_react_native+expo.md +81 -47
- package/docs/pl/intlayer_with_react_router_v7.md +3 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/pl/intlayer_with_storybook.md +7 -1
- package/docs/pl/intlayer_with_svelte_kit.md +9 -4
- package/docs/pl/intlayer_with_tanstack+solid.md +18 -9
- package/docs/pl/intlayer_with_tanstack.md +17 -8
- package/docs/pl/intlayer_with_vite+lit.md +8 -2
- package/docs/pl/intlayer_with_vite+preact.md +3 -1
- package/docs/pl/intlayer_with_vite+react.md +9 -4
- package/docs/pl/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/pl/intlayer_with_vite+solid.md +3 -1
- package/docs/pl/intlayer_with_vite+svelte.md +4 -2
- package/docs/pl/intlayer_with_vite+vanilla.md +16 -5
- package/docs/pl/intlayer_with_vite+vue.md +9 -4
- package/docs/pl/packages/@intlayer_babel/export.md +131 -0
- package/docs/pl/packages/react-native-intlayer/exports.md +47 -13
- package/docs/pl/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/pl/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/pl/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/pl/releases/v9.md +23 -1
- package/docs/pt/compiler.md +6 -3
- package/docs/pt/custom_domains.md +8 -2
- package/docs/pt/custom_url_rewrites.md +8 -2
- package/docs/pt/intlayer_with_analog.md +5 -1
- package/docs/pt/intlayer_with_astro.md +6 -4
- package/docs/pt/intlayer_with_astro_lit.md +3 -1
- package/docs/pt/intlayer_with_astro_preact.md +3 -1
- package/docs/pt/intlayer_with_astro_react.md +3 -1
- package/docs/pt/intlayer_with_astro_solid.md +3 -1
- package/docs/pt/intlayer_with_astro_svelte.md +3 -1
- package/docs/pt/intlayer_with_astro_vanilla.md +3 -1
- package/docs/pt/intlayer_with_astro_vue.md +3 -1
- package/docs/pt/intlayer_with_lynx+react.md +6 -1
- package/docs/pt/intlayer_with_nextjs_16.md +2 -0
- package/docs/pt/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/pt/intlayer_with_react_native+expo.md +44 -76
- package/docs/pt/intlayer_with_react_router_v7.md +8 -3
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/pt/intlayer_with_storybook.md +7 -1
- package/docs/pt/intlayer_with_svelte_kit.md +9 -4
- package/docs/pt/intlayer_with_tanstack+solid.md +18 -9
- package/docs/pt/intlayer_with_tanstack.md +17 -8
- package/docs/pt/intlayer_with_vite+lit.md +13 -4
- package/docs/pt/intlayer_with_vite+preact.md +3 -1
- package/docs/pt/intlayer_with_vite+react.md +9 -4
- package/docs/pt/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/pt/intlayer_with_vite+solid.md +3 -1
- package/docs/pt/intlayer_with_vite+svelte.md +4 -2
- package/docs/pt/intlayer_with_vite+vanilla.md +16 -5
- package/docs/pt/intlayer_with_vite+vue.md +9 -4
- package/docs/pt/packages/@intlayer_babel/export.md +131 -0
- package/docs/pt/packages/react-native-intlayer/exports.md +47 -13
- package/docs/pt/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/pt/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/pt/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/pt/releases/v9.md +23 -1
- package/docs/ru/compiler.md +6 -3
- package/docs/ru/custom_domains.md +8 -2
- package/docs/ru/custom_url_rewrites.md +8 -2
- package/docs/ru/intlayer_with_analog.md +5 -1
- package/docs/ru/intlayer_with_astro.md +3 -1
- package/docs/ru/intlayer_with_astro_lit.md +3 -1
- package/docs/ru/intlayer_with_astro_preact.md +3 -1
- package/docs/ru/intlayer_with_astro_react.md +3 -1
- package/docs/ru/intlayer_with_astro_solid.md +3 -1
- package/docs/ru/intlayer_with_astro_svelte.md +3 -1
- package/docs/ru/intlayer_with_astro_vanilla.md +3 -1
- package/docs/ru/intlayer_with_astro_vue.md +3 -1
- package/docs/ru/intlayer_with_lynx+react.md +6 -1
- package/docs/ru/intlayer_with_nextjs_16.md +2 -0
- package/docs/ru/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/ru/intlayer_with_react_native+expo.md +77 -61
- package/docs/ru/intlayer_with_react_router_v7.md +3 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/ru/intlayer_with_storybook.md +7 -1
- package/docs/ru/intlayer_with_svelte_kit.md +9 -4
- package/docs/ru/intlayer_with_tanstack+solid.md +18 -11
- package/docs/ru/intlayer_with_tanstack.md +17 -8
- package/docs/ru/intlayer_with_vite+lit.md +13 -4
- package/docs/ru/intlayer_with_vite+preact.md +3 -1
- package/docs/ru/intlayer_with_vite+react.md +9 -4
- package/docs/ru/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/ru/intlayer_with_vite+solid.md +3 -1
- package/docs/ru/intlayer_with_vite+svelte.md +4 -2
- package/docs/ru/intlayer_with_vite+vanilla.md +16 -5
- package/docs/ru/intlayer_with_vite+vue.md +9 -4
- package/docs/ru/packages/@intlayer_babel/export.md +131 -0
- package/docs/ru/packages/react-native-intlayer/exports.md +49 -16
- package/docs/ru/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/ru/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/ru/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/ru/releases/v9.md +23 -1
- package/docs/tr/compiler.md +6 -3
- package/docs/tr/custom_domains.md +8 -2
- package/docs/tr/custom_url_rewrites.md +8 -2
- package/docs/tr/intlayer_with_analog.md +5 -1
- package/docs/tr/intlayer_with_astro_lit.md +3 -1
- package/docs/tr/intlayer_with_astro_preact.md +3 -1
- package/docs/tr/intlayer_with_astro_react.md +3 -1
- package/docs/tr/intlayer_with_astro_solid.md +3 -1
- package/docs/tr/intlayer_with_astro_svelte.md +3 -1
- package/docs/tr/intlayer_with_astro_vanilla.md +3 -1
- package/docs/tr/intlayer_with_astro_vue.md +3 -1
- package/docs/tr/intlayer_with_lynx+react.md +6 -1
- package/docs/tr/intlayer_with_nextjs_16.md +2 -0
- package/docs/tr/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/tr/intlayer_with_react_native+expo.md +36 -57
- package/docs/tr/intlayer_with_react_router_v7.md +3 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/tr/intlayer_with_storybook.md +7 -1
- package/docs/tr/intlayer_with_svelte_kit.md +9 -4
- package/docs/tr/intlayer_with_tanstack+solid.md +18 -11
- package/docs/tr/intlayer_with_tanstack.md +17 -8
- package/docs/tr/intlayer_with_vite+lit.md +8 -2
- package/docs/tr/intlayer_with_vite+preact.md +3 -1
- package/docs/tr/intlayer_with_vite+react.md +9 -4
- package/docs/tr/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/tr/intlayer_with_vite+solid.md +3 -1
- package/docs/tr/intlayer_with_vite+svelte.md +4 -2
- package/docs/tr/intlayer_with_vite+vanilla.md +16 -5
- package/docs/tr/intlayer_with_vite+vue.md +9 -4
- package/docs/tr/packages/@intlayer_babel/export.md +131 -0
- package/docs/tr/packages/react-native-intlayer/exports.md +48 -15
- package/docs/tr/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/tr/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/tr/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/tr/releases/v9.md +23 -1
- package/docs/uk/compiler.md +6 -3
- package/docs/uk/custom_domains.md +8 -2
- package/docs/uk/custom_url_rewrites.md +8 -2
- package/docs/uk/intlayer_with_analog.md +5 -1
- package/docs/uk/intlayer_with_astro.md +3 -1
- package/docs/uk/intlayer_with_astro_lit.md +3 -1
- package/docs/uk/intlayer_with_astro_preact.md +3 -1
- package/docs/uk/intlayer_with_astro_react.md +3 -1
- package/docs/uk/intlayer_with_astro_solid.md +3 -1
- package/docs/uk/intlayer_with_astro_svelte.md +3 -1
- package/docs/uk/intlayer_with_astro_vanilla.md +3 -1
- package/docs/uk/intlayer_with_astro_vue.md +3 -1
- package/docs/uk/intlayer_with_lynx+react.md +6 -1
- package/docs/uk/intlayer_with_nextjs_16.md +2 -0
- package/docs/uk/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/uk/intlayer_with_react_native+expo.md +70 -53
- package/docs/uk/intlayer_with_react_router_v7.md +3 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/uk/intlayer_with_storybook.md +7 -1
- package/docs/uk/intlayer_with_svelte_kit.md +9 -4
- package/docs/uk/intlayer_with_tanstack+solid.md +18 -11
- package/docs/uk/intlayer_with_tanstack.md +17 -8
- package/docs/uk/intlayer_with_vite+lit.md +8 -2
- package/docs/uk/intlayer_with_vite+preact.md +3 -1
- package/docs/uk/intlayer_with_vite+react.md +9 -4
- package/docs/uk/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/uk/intlayer_with_vite+solid.md +3 -1
- package/docs/uk/intlayer_with_vite+svelte.md +9 -4
- package/docs/uk/intlayer_with_vite+vanilla.md +16 -5
- package/docs/uk/intlayer_with_vite+vue.md +9 -4
- package/docs/uk/packages/@intlayer_babel/export.md +131 -0
- package/docs/uk/packages/react-native-intlayer/exports.md +47 -13
- package/docs/uk/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/uk/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/uk/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/uk/releases/v9.md +23 -1
- package/docs/ur/custom_domains.md +8 -2
- package/docs/ur/intlayer_with_storybook.md +7 -1
- package/docs/ur/intlayer_with_vite+lit.md +8 -2
- package/docs/ur/intlayer_with_vite+vanilla.md +16 -5
- package/docs/vi/compiler.md +6 -3
- package/docs/vi/custom_domains.md +8 -2
- package/docs/vi/custom_url_rewrites.md +8 -2
- package/docs/vi/intlayer_with_analog.md +5 -1
- package/docs/vi/intlayer_with_astro.md +3 -1
- package/docs/vi/intlayer_with_astro_lit.md +3 -1
- package/docs/vi/intlayer_with_astro_preact.md +3 -1
- package/docs/vi/intlayer_with_astro_react.md +3 -1
- package/docs/vi/intlayer_with_astro_solid.md +3 -1
- package/docs/vi/intlayer_with_astro_svelte.md +3 -1
- package/docs/vi/intlayer_with_astro_vanilla.md +3 -1
- package/docs/vi/intlayer_with_astro_vue.md +3 -1
- package/docs/vi/intlayer_with_lynx+react.md +6 -1
- package/docs/vi/intlayer_with_nextjs_15.md +2 -0
- package/docs/vi/intlayer_with_nextjs_16.md +2 -0
- package/docs/vi/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/vi/intlayer_with_react_native+expo.md +49 -33
- package/docs/vi/intlayer_with_react_router_v7.md +3 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +9 -4
- package/docs/vi/intlayer_with_storybook.md +7 -1
- package/docs/vi/intlayer_with_svelte_kit.md +9 -4
- package/docs/vi/intlayer_with_tanstack+solid.md +18 -11
- package/docs/vi/intlayer_with_tanstack.md +17 -8
- package/docs/vi/intlayer_with_vite+lit.md +8 -2
- package/docs/vi/intlayer_with_vite+preact.md +3 -1
- package/docs/vi/intlayer_with_vite+react.md +9 -4
- package/docs/vi/intlayer_with_vite+react_compiler.md +9 -2
- package/docs/vi/intlayer_with_vite+solid.md +3 -1
- package/docs/vi/intlayer_with_vite+svelte.md +9 -4
- package/docs/vi/intlayer_with_vite+vanilla.md +16 -5
- package/docs/vi/intlayer_with_vite+vue.md +9 -4
- package/docs/vi/packages/@intlayer_babel/export.md +131 -0
- package/docs/vi/packages/react-native-intlayer/exports.md +47 -13
- package/docs/vi/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/vi/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/vi/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/vi/releases/v9.md +23 -1
- package/docs/zh/compiler.md +6 -3
- package/docs/zh/custom_domains.md +8 -2
- package/docs/zh/custom_url_rewrites.md +8 -2
- package/docs/zh/intlayer_with_astro.md +3 -1
- package/docs/zh/intlayer_with_astro_lit.md +3 -1
- package/docs/zh/intlayer_with_astro_preact.md +3 -1
- package/docs/zh/intlayer_with_astro_react.md +3 -1
- package/docs/zh/intlayer_with_astro_solid.md +3 -1
- package/docs/zh/intlayer_with_astro_svelte.md +3 -1
- package/docs/zh/intlayer_with_astro_vanilla.md +3 -1
- package/docs/zh/intlayer_with_astro_vue.md +3 -1
- package/docs/zh/intlayer_with_nextjs_16.md +2 -0
- package/docs/zh/intlayer_with_nextjs_compiler.md +2 -0
- package/docs/zh/intlayer_with_react_native+expo.md +221 -82
- package/docs/zh/intlayer_with_react_router_v7.md +3 -1
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +3 -1
- package/docs/zh/intlayer_with_storybook.md +7 -1
- package/docs/zh/intlayer_with_svelte_kit.md +9 -4
- package/docs/zh/intlayer_with_vite+preact.md +3 -1
- package/docs/zh/intlayer_with_vite+react.md +9 -4
- package/docs/zh/intlayer_with_vite+svelte.md +9 -4
- package/docs/zh/intlayer_with_vite+vue.md +9 -4
- package/docs/zh/packages/@intlayer_babel/export.md +131 -0
- package/docs/zh/packages/react-native-intlayer/exports.md +48 -14
- package/docs/zh/packages/vite-intlayer/intlayerCompiler.md +120 -0
- package/docs/zh/packages/vite-intlayer/intlayerMinify.md +92 -0
- package/docs/zh/packages/vite-intlayer/intlayerProxy.md +172 -0
- package/docs/zh/releases/v9.md +23 -1
- package/package.json +6 -6
- package/src/generated/docs.entry.ts +80 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-06-18
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-06-25
|
|
4
4
|
title: "Expo + React Native i18n - 翻译你的应用的完整指南"
|
|
5
5
|
description: "告别 i18next。2026 年构建多语言 (i18n) Expo + React Native 应用的完整指南。使用 AI 代理翻译并优化包体积、SEO 和性能。"
|
|
6
6
|
keywords:
|
|
@@ -17,6 +17,9 @@ slugs:
|
|
|
17
17
|
applicationTemplate: https://github.com/aymericzip/intlayer-react-native-template
|
|
18
18
|
applicationShowcase: https://intlayer-react-native.vercel.app
|
|
19
19
|
history:
|
|
20
|
+
- version: 9.0.0
|
|
21
|
+
date: 2026-06-25
|
|
22
|
+
changes: "直接从 react-native-intlayer 导入 provider 和 hook;react-intlayer 不再需要作为直接依赖项"
|
|
20
23
|
- version: 8.9.0
|
|
21
24
|
date: 2026-05-04
|
|
22
25
|
changes: "更新 Solid useIntlayer API 用法以直接访问属性"
|
|
@@ -29,7 +32,7 @@ history:
|
|
|
29
32
|
author: aymericzip
|
|
30
33
|
---
|
|
31
34
|
|
|
32
|
-
# 翻译您的 Expo and React Native 应用 |
|
|
35
|
+
# 翻译您的 Expo and React Native 应用 | 国际化(i18n)
|
|
33
36
|
|
|
34
37
|
<Tabs defaultTab="code">
|
|
35
38
|
<Tab label="代码" value="code">
|
|
@@ -37,7 +40,7 @@ author: aymericzip
|
|
|
37
40
|
<iframe
|
|
38
41
|
src="https://ide.intlayer.org/aymericzip/intlayer-react-native-template?file=intlayer.config.ts"
|
|
39
42
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
40
|
-
title="Demo CodeSandbox - Intlayer"
|
|
43
|
+
title="Demo CodeSandbox - 如何使用 Intlayer 国际化您的应用"
|
|
41
44
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
42
45
|
loading="lazy"
|
|
43
46
|
/>
|
|
@@ -56,24 +59,66 @@ author: aymericzip
|
|
|
56
59
|
</Tab>
|
|
57
60
|
</Tabs>
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
## 目录
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
<TOC/>
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
用于配置、字典内容、类型生成和 CLI 命令的核心 i18n 工具包。
|
|
66
|
+
## 为什么选择 Intlayer 而非其他方案?
|
|
65
67
|
|
|
66
|
-
-
|
|
67
|
-
React 集成提供了上下文提供程序和 React 挂钩,您将在 React Native 中使用它们来获取和切换语言环境。
|
|
68
|
+
与 `react-native-localize` 或 `i18next` 等主流方案相比,Intlayer 是一个集成了以下优化功能的解决方案:
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
React Native 集成提供了 Metro 插件,用于将 Intlayer 与 React Native 捆绑器集成。
|
|
70
|
+
<AccordionGroup>
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
<Accordion header="完整的 React Native 覆盖">
|
|
73
|
+
|
|
74
|
+
Intlayer 经过优化,可与 React Native 和 Expo 完美配合,提供**组件级内容作用域**、**TypeScript 支持**以及在移动应用中扩展国际化 (i18n) 所需的所有功能。
|
|
75
|
+
|
|
76
|
+
</Accordion>
|
|
77
|
+
|
|
78
|
+
<Accordion header="可维护性">
|
|
79
|
+
|
|
80
|
+
将应用内容限定作用域**有助于维护**大规模应用程序。您可以复制或删除单个功能文件夹,而无需承受审查整个内容代码库的心理负担。此外,Intlayer **具有完整的类型支持**,确保内容的准确性。
|
|
81
|
+
|
|
82
|
+
</Accordion>
|
|
83
|
+
|
|
84
|
+
<Accordion header="AI 代理">
|
|
85
|
+
|
|
86
|
+
内容共置**减少了大型语言模型 (LLM) 所需的上下文**。Intlayer 还附带了一套工具,例如用于检测缺失翻译的 **CLI**、**[LSP](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/lsp.md)**、**[MCP](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md)** 和 **[agent skills](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/agent_skills.md)**,使 AI 代理的开发者体验 (DX) 更加顺畅。
|
|
87
|
+
|
|
88
|
+
</Accordion>
|
|
89
|
+
|
|
90
|
+
<Accordion header="自动化">
|
|
91
|
+
|
|
92
|
+
使用您选择的 LLM,以 AI 提供商的成本在 CI/CD 管道中自动进行翻译。Intlayer 还提供**编译器**来自动提取内容,以及[网络平台](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md)来帮助**在后台进行翻译**。
|
|
93
|
+
|
|
94
|
+
</Accordion>
|
|
95
|
+
|
|
96
|
+
<Accordion header="性能">
|
|
97
|
+
|
|
98
|
+
将大型 JSON 文件连接到组件可能会导致性能和响应性问题。Intlayer 在构建时优化内容加载。
|
|
99
|
+
|
|
100
|
+
</Accordion>
|
|
101
|
+
|
|
102
|
+
<Accordion header="非开发者扩展">
|
|
103
|
+
|
|
104
|
+
Intlayer 不仅仅是一个 i18n 解决方案,它还提供**自托管的[可视化编辑器](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md)**和**[完整 CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md)**,帮助您**实时**管理多语言内容,使翻译人员、文案人员和其他团队成员的协作更加无缝。内容可以本地和/或远程存储。
|
|
105
|
+
|
|
106
|
+
</Accordion>
|
|
73
107
|
|
|
74
|
-
|
|
108
|
+
<Accordion header="包体积">
|
|
75
109
|
|
|
76
|
-
|
|
110
|
+
无需将大型 JSON 文件加载到页面中,只需加载必要的内容。Intlayer 帮助**将包体积和视图大小减少多达 50%**。
|
|
111
|
+
|
|
112
|
+
</Accordion>
|
|
113
|
+
</AccordionGroup>
|
|
114
|
+
|
|
115
|
+
<Steps>
|
|
116
|
+
|
|
117
|
+
<Step number={1} title="安装依赖">
|
|
118
|
+
|
|
119
|
+
请参阅 GitHub 上的[应用模板](https://github.com/aymericzip/intlayer-react-native-template)。
|
|
120
|
+
|
|
121
|
+
在您的 React Native 项目中,安装以下包:
|
|
77
122
|
|
|
78
123
|
```bash packageManager="npm"
|
|
79
124
|
npx intlayer-cli init --interactive
|
|
@@ -96,55 +141,101 @@ bunx intlayer-cli init --interactive
|
|
|
96
141
|
> 该命令将检测您的环境并安装所需的软件包。例如:
|
|
97
142
|
|
|
98
143
|
```bash packageManager="npm"
|
|
99
|
-
npm install intlayer react-intlayer
|
|
100
|
-
npm install --save-dev react-native-intlayer
|
|
144
|
+
npm install intlayer react-native-intlayer
|
|
101
145
|
```
|
|
102
146
|
|
|
103
147
|
```bash packageManager="pnpm"
|
|
104
|
-
pnpm add intlayer react-intlayer
|
|
105
|
-
pnpm add --save-dev react-native-intlayer
|
|
148
|
+
pnpm add intlayer react-native-intlayer
|
|
106
149
|
```
|
|
107
150
|
|
|
108
151
|
```bash packageManager="yarn"
|
|
109
|
-
yarn add intlayer react-intlayer
|
|
110
|
-
yarn add --save-dev react-native-intlayer
|
|
152
|
+
yarn add intlayer react-native-intlayer
|
|
111
153
|
```
|
|
112
154
|
|
|
113
155
|
```bash packageManager="bun"
|
|
114
|
-
bun add intlayer react-intlayer
|
|
115
|
-
bun add --dev react-native-intlayer
|
|
156
|
+
bun add intlayer react-native-intlayer
|
|
116
157
|
```
|
|
117
158
|
|
|
118
|
-
|
|
159
|
+
### 套餐
|
|
119
160
|
|
|
120
|
-
|
|
161
|
+
- **intlayer**
|
|
162
|
+
用于配置、字典内容、类型生成和 CLI 命令的核心 i18n 工具包。
|
|
121
163
|
|
|
122
|
-
|
|
164
|
+
- **react-native-intlayer**
|
|
165
|
+
React Native 集成,提供您将用于获取和切换语言环境的上下文 provider 和 React hook、React Native polyfill,以及将 Intlayer 与 React Native 打包器集成的 Metro 插件。它重新导出 `react-intlayer` 的所有内容,因此在 React Native 应用中只需要这一个包。
|
|
123
166
|
|
|
124
|
-
|
|
125
|
-
import { Stack } from "expo-router";
|
|
126
|
-
import { getLocales } from "expo-localization";
|
|
127
|
-
import { IntlayerProvider } from "react-native-intlayer";
|
|
128
|
-
import { type FC } from "react";
|
|
167
|
+
---
|
|
129
168
|
|
|
169
|
+
</Step>
|
|
130
170
|
|
|
131
|
-
|
|
171
|
+
<Step number={2} title="创建 Intlayer 配置">
|
|
172
|
+
|
|
173
|
+
在您的项目根目录(或任何方便的位置)创建一个 **Intlayer 配置**文件。它可能如下所示:
|
|
174
|
+
|
|
175
|
+
```ts fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
176
|
+
/**
|
|
177
|
+
* 如果 Locales 类型不可用,请尝试在 tsconfig.json 中将 moduleResolution 设置为 "bundler"
|
|
178
|
+
*/
|
|
179
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
180
|
+
|
|
181
|
+
const config: IntlayerConfig = {
|
|
182
|
+
internationalization: {
|
|
183
|
+
locales: [
|
|
184
|
+
Locales.ENGLISH,
|
|
185
|
+
Locales.FRENCH,
|
|
186
|
+
Locales.SPANISH,
|
|
187
|
+
// ... 添加您需要的其他语言环境
|
|
188
|
+
],
|
|
189
|
+
defaultLocale: Locales.ENGLISH,
|
|
190
|
+
},
|
|
191
|
+
};
|
|
132
192
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
193
|
+
export default config;
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
在此配置中,您可以:
|
|
197
|
+
|
|
198
|
+
- 配置**支持的语言环境列表**。
|
|
199
|
+
- 设置**默认**语言环境。
|
|
200
|
+
- 以后,您可以添加更多高级选项(例如日志、自定义内容目录等)。
|
|
201
|
+
- 请参阅 [Intlayer 配置文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md) 了解更多信息。
|
|
202
|
+
|
|
203
|
+
</Step>
|
|
204
|
+
|
|
205
|
+
<Step number={3} title="添加 Metro 插件">
|
|
206
|
+
|
|
207
|
+
Metro 是 React Native 的打包器。它是使用 `react-native init` 命令创建的 React Native 项目的默认打包器。要在 Metro 中使用 Intlayer,您需要将插件添加到 `metro.config.js` 文件中:
|
|
208
|
+
|
|
209
|
+
```js fileName="metro.config.js"
|
|
210
|
+
const { getDefaultConfig } = require("expo/metro-config");
|
|
211
|
+
const { configMetroIntlayer } = require("react-native-intlayer/metro");
|
|
212
|
+
|
|
213
|
+
module.exports = (async () => {
|
|
214
|
+
const defaultConfig = getDefaultConfig(__dirname);
|
|
215
|
+
|
|
216
|
+
return await configMetroIntlayer(defaultConfig);
|
|
217
|
+
})();
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
> 注意:`configMetroIntlayer` 是一个 Promise 函数。如果您想同步使用它,请改用 `configMetroIntlayerSync`,或避免使用 IFFE(立即调用函数表达式)。
|
|
221
|
+
> 注意:`configMetroIntlayerSync` 不允许在服务器启动时构建 intlayer 字典
|
|
222
|
+
|
|
223
|
+
</Step>
|
|
224
|
+
|
|
225
|
+
<Step number={4} title="添加 Intlayer provider">
|
|
226
|
+
|
|
227
|
+
为了在您的应用程序中保持用户语言的同步,您需要使用来自 `react-native-intlayer` 的 `IntlayerProvider` 组件包裹您的根组件。
|
|
228
|
+
|
|
229
|
+
> 始终从 `react-native-intlayer` 导入。其 `IntlayerProvider` 包含 Intlayer 使用的 web API 的 polyfill,该包重新导出了 `react-intlayer` 中的所有 hook 和工具。
|
|
138
230
|
|
|
139
231
|
此外,您需要在 `index.js` 文件中添加 `intlayerPolyfill` 函数,以确保 Intlayer 能够正常工作。
|
|
140
232
|
|
|
141
|
-
```tsx fileName="app/_layout.tsx" codeFormat="typescript"
|
|
233
|
+
```tsx fileName="app/_layout.tsx" codeFormat={["typescript", "esm"]}
|
|
142
234
|
import { Stack } from "expo-router";
|
|
143
235
|
import { getLocales } from "expo-localization";
|
|
144
236
|
import { IntlayerProvider } from "react-native-intlayer";
|
|
145
237
|
import { type FC } from "react";
|
|
146
238
|
|
|
147
|
-
|
|
148
239
|
const getDeviceLocale = () => getLocales()[0]?.languageTag;
|
|
149
240
|
|
|
150
241
|
const RootLayout: FC = () => {
|
|
@@ -158,9 +249,29 @@ const RootLayout: FC = () => {
|
|
|
158
249
|
};
|
|
159
250
|
|
|
160
251
|
export default RootLayout;
|
|
161
|
-
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
</Step>
|
|
162
255
|
|
|
163
|
-
|
|
256
|
+
<Step number={5} title="声明您的内容">
|
|
257
|
+
|
|
258
|
+
在项目中任意位置(通常在 `src/` 目录中)创建**内容声明**文件,使用 Intlayer 支持的任何扩展格式:
|
|
259
|
+
|
|
260
|
+
- `.content.json`
|
|
261
|
+
- `.content.jsonc`
|
|
262
|
+
- `.content.json5`
|
|
263
|
+
- `.content.ts`
|
|
264
|
+
- `.content.tsx`
|
|
265
|
+
- `.content.js`
|
|
266
|
+
- `.content.jsx`
|
|
267
|
+
- `.content.mjs`
|
|
268
|
+
- `.content.mjx`
|
|
269
|
+
- `.content.cjs`
|
|
270
|
+
- `.content.md`
|
|
271
|
+
- `.content.mdx`
|
|
272
|
+
- `.content.yaml`
|
|
273
|
+
- `.content.yml`
|
|
274
|
+
- 等等
|
|
164
275
|
|
|
165
276
|
> **Expo Router (web): 请将 `.content.*` 文件保留在 `app/` 目录之外。** Expo Router 会将 `app/` 内的每个 JavaScript/TypeScript 文件视为一个路由。在 web 上,它的路由发现会直接扫描文件系统,并且 **不** 遵循 Metro 的 `resolver.blockList`,因此同位置的 `*.content.ts` 会被注册为一个路由。像 `app/(tabs)/_layout.content.ts` 这样的文件甚至会被解析为布局(`.content` 部分被读取为平台后缀),这会与实际的 `_layout.tsx` 发生冲突并抛出错误:
|
|
166
277
|
>
|
|
@@ -170,35 +281,63 @@ export default RootLayout;
|
|
|
170
281
|
>
|
|
171
282
|
> 请将您的声明放置在 `app/` 之外的目录中(例如 `content/` 或 `src/content/`)。Intlayer 会发现项目中任意位置的 `.content.*` 文件,字典通过它们的 `key` 进行引用,因此不需要进行任何导入更改。在原生端这不是必需的(Metro 的 `blockList` 已经隐藏了它们),但使用非 `app/` 目录可确保这两个平台都能正常工作。
|
|
172
283
|
|
|
173
|
-
|
|
284
|
+
示例(带有 React Native TSX 节点的 TypeScript):
|
|
285
|
+
|
|
286
|
+
```tsx fileName="src/app.content.tsx" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
287
|
+
import { t, type Dictionary } from "intlayer";
|
|
288
|
+
import type { ReactNode } from "react";
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 我们"app"域的内容字典
|
|
292
|
+
*/
|
|
293
|
+
import { t, type Dictionary } from "intlayer";
|
|
294
|
+
|
|
295
|
+
const homeScreenContent = {
|
|
296
|
+
key: "home-screen",
|
|
297
|
+
content: {
|
|
298
|
+
title: t({
|
|
299
|
+
en: "Welcome!",
|
|
300
|
+
fr: "Bienvenue!",
|
|
301
|
+
es: "¡Bienvenido!",
|
|
302
|
+
}),
|
|
303
|
+
},
|
|
304
|
+
} satisfies Dictionary;
|
|
174
305
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const { getLocales } = require("expo-localization");
|
|
178
|
-
const { IntlayerProvider } = require("react-native-intlayer");
|
|
306
|
+
export default homeScreenContent;
|
|
307
|
+
```
|
|
179
308
|
|
|
309
|
+
```json fileName="src/app.content.json" contentDeclarationFormat="json"
|
|
310
|
+
{
|
|
311
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
312
|
+
"key": "app",
|
|
313
|
+
"content": {
|
|
314
|
+
"title": {
|
|
315
|
+
"nodeType": "translation",
|
|
316
|
+
"translation": {
|
|
317
|
+
"en": "Welcome!",
|
|
318
|
+
"fr": "Bienvenue!",
|
|
319
|
+
"es": "¡Bienvenido!"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
```
|
|
180
325
|
|
|
181
|
-
|
|
182
|
-
const getDeviceLocale = () => getLocales()[0]?.languageTag;
|
|
326
|
+
> 有关内容声明的详细信息,请参阅 [Intlayer 内容文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md)。
|
|
183
327
|
|
|
184
|
-
|
|
185
|
-
return (
|
|
186
|
-
<IntlayerProvider defaultLocale={getDeviceLocale()}>
|
|
187
|
-
<Stack>
|
|
188
|
-
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
|
189
|
-
</Stack>
|
|
190
|
-
</IntlayerProvider>
|
|
191
|
-
);
|
|
192
|
-
};
|
|
328
|
+
---
|
|
193
329
|
|
|
194
|
-
|
|
195
|
-
|
|
330
|
+
</Step>
|
|
331
|
+
|
|
332
|
+
<Step number={6} title="在组件中使用 Intlayer">
|
|
333
|
+
|
|
334
|
+
在子组件中使用 `useIntlayer` hook 获取本地化内容。
|
|
196
335
|
|
|
197
336
|
### 示例
|
|
198
337
|
|
|
199
338
|
```tsx fileName="app/(tabs)/index.tsx" codeFormat={["typescript", "esm"]}
|
|
200
339
|
import { Image, StyleSheet, Platform } from "react-native";
|
|
201
|
-
import { useIntlayer } from "intlayer";
|
|
340
|
+
import { useIntlayer } from "react-native-intlayer";
|
|
202
341
|
import { HelloWave } from "@/components/HelloWave";
|
|
203
342
|
import ParallaxScrollView from "@/components/ParallaxScrollView";
|
|
204
343
|
import { ThemedText } from "@/components/ThemedText";
|
|
@@ -228,9 +367,9 @@ const HomeScreen = (): FC => {
|
|
|
228
367
|
|
|
229
368
|
const styles = StyleSheet.create({
|
|
230
369
|
titleContainer: {
|
|
231
|
-
flexDirection: "row",
|
|
232
|
-
alignItems: "center",
|
|
233
|
-
gap: 8,
|
|
370
|
+
flexDirection: "row",
|
|
371
|
+
alignItems: "center",
|
|
372
|
+
gap: 8,
|
|
234
373
|
},
|
|
235
374
|
});
|
|
236
375
|
|
|
@@ -239,21 +378,21 @@ export default HomeScreen;
|
|
|
239
378
|
|
|
240
379
|
> 当在基于字符串的属性中使用 `content.someKey`(例如按钮的 `title` 或 `Text` 组件的 `children`)时,**请调用 `content.someKey.value`** 来获取实际的字符串。
|
|
241
380
|
|
|
242
|
-
> 如果您的应用程序已经存在,您可以结合使用 [Intlayer 编译器](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/compiler.md) 和 [提取命令](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/extract.md)
|
|
381
|
+
> 如果您的应用程序已经存在,您可以结合使用 [Intlayer 编译器](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/compiler.md) 和 [提取命令](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/extract.md) 在一秒钟内转换数千个组件。
|
|
243
382
|
|
|
244
383
|
---
|
|
245
384
|
|
|
246
|
-
|
|
385
|
+
</Step>
|
|
247
386
|
|
|
248
|
-
<Step number={
|
|
387
|
+
<Step number={7} title="更改应用程序语言环境" isOptional={true}>
|
|
249
388
|
|
|
250
|
-
要在组件内部切换语言环境,可以使用 `useLocale`
|
|
389
|
+
要在组件内部切换语言环境,可以使用 `useLocale` hook 的 `setLocale` 方法:
|
|
251
390
|
|
|
252
391
|
```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat={["typescript", "esm"]}
|
|
253
392
|
import { type FC } from "react";
|
|
254
393
|
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
|
|
255
394
|
import { getLocaleName } from "intlayer";
|
|
256
|
-
import { useLocale } from "react-intlayer";
|
|
395
|
+
import { useLocale } from "react-native-intlayer";
|
|
257
396
|
|
|
258
397
|
export const LocaleSwitcher: FC = () => {
|
|
259
398
|
const { setLocale, availableLocales } = useLocale();
|
|
@@ -275,28 +414,28 @@ export const LocaleSwitcher: FC = () => {
|
|
|
275
414
|
|
|
276
415
|
const styles = StyleSheet.create({
|
|
277
416
|
container: {
|
|
278
|
-
flexDirection: "row",
|
|
279
|
-
justifyContent: "center",
|
|
280
|
-
alignItems: "center",
|
|
281
|
-
gap: 8,
|
|
417
|
+
flexDirection: "row",
|
|
418
|
+
justifyContent: "center",
|
|
419
|
+
alignItems: "center",
|
|
420
|
+
gap: 8,
|
|
282
421
|
},
|
|
283
422
|
button: {
|
|
284
|
-
paddingVertical: 6,
|
|
285
|
-
paddingHorizontal: 12,
|
|
286
|
-
borderRadius: 6,
|
|
287
|
-
backgroundColor: "#ddd",
|
|
423
|
+
paddingVertical: 6,
|
|
424
|
+
paddingHorizontal: 12,
|
|
425
|
+
borderRadius: 6,
|
|
426
|
+
backgroundColor: "#ddd",
|
|
288
427
|
},
|
|
289
428
|
text: {
|
|
290
|
-
fontSize: 14,
|
|
291
|
-
fontWeight: "500",
|
|
292
|
-
color: "#333",
|
|
429
|
+
fontSize: 14,
|
|
430
|
+
fontWeight: "500",
|
|
431
|
+
color: "#333",
|
|
293
432
|
},
|
|
294
433
|
});
|
|
295
434
|
```
|
|
296
435
|
|
|
297
436
|
这会触发所有使用 Intlayer 内容的组件重新渲染,现在显示新语言环境的翻译内容。
|
|
298
437
|
|
|
299
|
-
> 详情请参见 [`useLocale` 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/
|
|
438
|
+
> 详情请参见 [`useLocale` 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useLocale.md)。
|
|
300
439
|
|
|
301
440
|
</Step>
|
|
302
441
|
|
|
@@ -367,13 +506,13 @@ Intlayer 会在一个隐藏文件夹中(默认是 `.intlayer`)生成类型
|
|
|
367
506
|
|
|
368
507
|
React Native 的稳定性不如 React Web,因此要特别注意版本对齐。
|
|
369
508
|
|
|
370
|
-
Intlayer 主要针对 Web Intl API;在 React Native 上,你必须包含适当的
|
|
509
|
+
Intlayer 主要针对 Web Intl API;在 React Native 上,你必须包含适当的 polyfill。
|
|
371
510
|
|
|
372
511
|
检查清单:
|
|
373
512
|
|
|
374
|
-
- 使用最新版本的 `intlayer
|
|
513
|
+
- 使用最新版本的 `intlayer` 和 `react-native-intlayer`。
|
|
375
514
|
- 启用 Intlayer polyfill。
|
|
376
|
-
- 如果你使用 `getLocaleName` 或其他基于 Intl-API 的工具,请提前导入这些
|
|
515
|
+
- 如果你使用 `getLocaleName` 或其他基于 Intl-API 的工具,请提前导入这些 polyfill(例如在 `index.js` 或 `App.tsx` 中):
|
|
377
516
|
|
|
378
517
|
```ts
|
|
379
518
|
import "intl";
|
|
@@ -339,6 +339,8 @@ bun x intlayer extract
|
|
|
339
339
|
</Tab>
|
|
340
340
|
<Tab value='Babel 编译器'>
|
|
341
341
|
|
|
342
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
343
|
+
|
|
342
344
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
343
345
|
|
|
344
346
|
```ts fileName="vite.config.ts"
|
|
@@ -348,7 +350,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
348
350
|
export default defineConfig({
|
|
349
351
|
plugins: [
|
|
350
352
|
intlayer(),
|
|
351
|
-
intlayerCompiler(), //
|
|
353
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
352
354
|
],
|
|
353
355
|
});
|
|
354
356
|
```
|
|
@@ -294,6 +294,8 @@ bun x intlayer extract
|
|
|
294
294
|
</Tab>
|
|
295
295
|
<Tab value='Babel 编译器'>
|
|
296
296
|
|
|
297
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
298
|
+
|
|
297
299
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
298
300
|
|
|
299
301
|
```ts fileName="vite.config.ts"
|
|
@@ -303,7 +305,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
303
305
|
export default defineConfig({
|
|
304
306
|
plugins: [
|
|
305
307
|
intlayer(),
|
|
306
|
-
intlayerCompiler(), //
|
|
308
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
307
309
|
],
|
|
308
310
|
});
|
|
309
311
|
```
|
|
@@ -103,7 +103,13 @@ const config: StorybookConfig = {
|
|
|
103
103
|
} as const;
|
|
104
104
|
|
|
105
105
|
const viteConfig = defineConfig(() => ({
|
|
106
|
-
plugins: [
|
|
106
|
+
plugins: [
|
|
107
|
+
intlayer({
|
|
108
|
+
proxy: {
|
|
109
|
+
ignore: (req) => req.url?.startsWith("/api"),
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
],
|
|
107
113
|
}));
|
|
108
114
|
|
|
109
115
|
return mergeConfig(baseConfig, viteConfig(env));
|
|
@@ -229,14 +229,17 @@ goto(localizedPath); // 根据语言环境导航到 /en/about 或 /fr/about
|
|
|
229
229
|
|
|
230
230
|
```ts fileName="vite.config.ts"
|
|
231
231
|
import { defineConfig } from "vite";
|
|
232
|
-
import { intlayer
|
|
232
|
+
import { intlayer } from "vite-intlayer";
|
|
233
233
|
import { sveltekit } from "@sveltejs/kit/vite";
|
|
234
234
|
|
|
235
235
|
// https://vitejs.dev/config/
|
|
236
236
|
export default defineConfig({
|
|
237
237
|
plugins: [
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
intlayer({
|
|
239
|
+
proxy: {
|
|
240
|
+
ignore: (req) => req.url?.startsWith("/api"),
|
|
241
|
+
},
|
|
242
|
+
}),
|
|
240
243
|
sveltekit(),
|
|
241
244
|
],],
|
|
242
245
|
});
|
|
@@ -334,6 +337,8 @@ bun x intlayer extract
|
|
|
334
337
|
</Tab>
|
|
335
338
|
<Tab value='Babel 编译器'>
|
|
336
339
|
|
|
340
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
341
|
+
|
|
337
342
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
338
343
|
|
|
339
344
|
```ts fileName="vite.config.ts"
|
|
@@ -343,7 +348,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
343
348
|
export default defineConfig({
|
|
344
349
|
plugins: [
|
|
345
350
|
intlayer(),
|
|
346
|
-
intlayerCompiler(), //
|
|
351
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
347
352
|
],
|
|
348
353
|
});
|
|
349
354
|
```
|
|
@@ -495,6 +495,8 @@ bun x intlayer extract
|
|
|
495
495
|
</Tab>
|
|
496
496
|
<Tab value='Babel 编译器'>
|
|
497
497
|
|
|
498
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
499
|
+
|
|
498
500
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
499
501
|
|
|
500
502
|
```ts fileName="vite.config.ts"
|
|
@@ -504,7 +506,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
504
506
|
export default defineConfig({
|
|
505
507
|
plugins: [
|
|
506
508
|
intlayer(),
|
|
507
|
-
intlayerCompiler(), //
|
|
509
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
508
510
|
],
|
|
509
511
|
});
|
|
510
512
|
```
|
|
@@ -225,14 +225,17 @@ const App: FC = () => (
|
|
|
225
225
|
```typescript {3,7} fileName="vite.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
226
226
|
import { defineConfig } from "vite";
|
|
227
227
|
import react from "@vitejs/plugin-react-swc";
|
|
228
|
-
import { intlayer
|
|
228
|
+
import { intlayer } from "vite-intlayer";
|
|
229
229
|
|
|
230
230
|
// https://vitejs.dev/config/
|
|
231
231
|
export default defineConfig({
|
|
232
232
|
plugins: [
|
|
233
|
-
intlayerProxy(), // should be placed first
|
|
234
233
|
react(),
|
|
235
|
-
intlayer(
|
|
234
|
+
intlayer({
|
|
235
|
+
proxy: {
|
|
236
|
+
ignore: (req) => req.url?.startsWith("/api"),
|
|
237
|
+
},
|
|
238
|
+
}),
|
|
236
239
|
],
|
|
237
240
|
});
|
|
238
241
|
```
|
|
@@ -536,6 +539,8 @@ bun x intlayer extract
|
|
|
536
539
|
</Tab>
|
|
537
540
|
<Tab value='Babel 编译器'>
|
|
538
541
|
|
|
542
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
543
|
+
|
|
539
544
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
540
545
|
|
|
541
546
|
```ts fileName="vite.config.ts"
|
|
@@ -545,7 +550,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
545
550
|
export default defineConfig({
|
|
546
551
|
plugins: [
|
|
547
552
|
intlayer(),
|
|
548
|
-
intlayerCompiler(), //
|
|
553
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
549
554
|
],
|
|
550
555
|
});
|
|
551
556
|
```
|
|
@@ -460,14 +460,17 @@ $: content = useIntlayer('app', locale);
|
|
|
460
460
|
```typescript {3,7} fileName="vite.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
461
461
|
import { defineConfig } from "vite";
|
|
462
462
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
463
|
-
import { intlayer
|
|
463
|
+
import { intlayer } from "vite-intlayer";
|
|
464
464
|
|
|
465
465
|
// https://vitejs.dev/config/
|
|
466
466
|
export default defineConfig({
|
|
467
467
|
plugins: [
|
|
468
|
-
intlayerProxy(), // should be placed first
|
|
469
468
|
svelte(),
|
|
470
|
-
intlayer(
|
|
469
|
+
intlayer({
|
|
470
|
+
proxy: {
|
|
471
|
+
ignore: (req) => req.url?.startsWith("/api"),
|
|
472
|
+
},
|
|
473
|
+
}),
|
|
471
474
|
],
|
|
472
475
|
});
|
|
473
476
|
```
|
|
@@ -598,6 +601,8 @@ bun x intlayer extract
|
|
|
598
601
|
</Tab>
|
|
599
602
|
<Tab value='Babel 编译器'>
|
|
600
603
|
|
|
604
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
605
|
+
|
|
601
606
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
602
607
|
|
|
603
608
|
```ts fileName="vite.config.ts"
|
|
@@ -607,7 +612,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
607
612
|
export default defineConfig({
|
|
608
613
|
plugins: [
|
|
609
614
|
intlayer(),
|
|
610
|
-
intlayerCompiler(), //
|
|
615
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
611
616
|
],
|
|
612
617
|
});
|
|
613
618
|
```
|
|
@@ -636,14 +636,17 @@ import LocaleSwitcher from "@components/LocaleSwitcher.vue";
|
|
|
636
636
|
```typescript {3,7} fileName="vite.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
637
637
|
import { defineConfig } from "vite";
|
|
638
638
|
import vue from "@vitejs/plugin-vue";
|
|
639
|
-
import { intlayer
|
|
639
|
+
import { intlayer } from "vite-intlayer";
|
|
640
640
|
|
|
641
641
|
// https://vitejs.dev/config/
|
|
642
642
|
export default defineConfig({
|
|
643
643
|
plugins: [
|
|
644
|
-
intlayerProxy(), // should be placed first
|
|
645
644
|
vue(),
|
|
646
|
-
intlayer(
|
|
645
|
+
intlayer({
|
|
646
|
+
proxy: {
|
|
647
|
+
ignore: (req) => req.url?.startsWith("/api"),
|
|
648
|
+
},
|
|
649
|
+
}),
|
|
647
650
|
],
|
|
648
651
|
});
|
|
649
652
|
```
|
|
@@ -967,6 +970,8 @@ bun x intlayer extract
|
|
|
967
970
|
</Tab>
|
|
968
971
|
<Tab value='Babel 编译器'>
|
|
969
972
|
|
|
973
|
+
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
974
|
+
|
|
970
975
|
更新您的 `vite.config.ts` 以包含 `intlayerCompiler` 插件:
|
|
971
976
|
|
|
972
977
|
```ts fileName="vite.config.ts"
|
|
@@ -976,7 +981,7 @@ import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
|
976
981
|
export default defineConfig({
|
|
977
982
|
plugins: [
|
|
978
983
|
intlayer(),
|
|
979
|
-
intlayerCompiler(), //
|
|
984
|
+
intlayerCompiler(), // Adds the compiler plugin
|
|
980
985
|
],
|
|
981
986
|
});
|
|
982
987
|
```
|