@intlayer/docs 9.5.4 → 9.5.5
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/README.md +2 -1
- package/blog/ar/how_to_pick_react_i18n_library.md +28 -0
- package/blog/ar/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/de/how_to_pick_react_i18n_library.md +28 -0
- package/blog/de/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/en/how_to_pick_react_i18n_library.md +28 -0
- package/blog/en/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/en-GB/how_to_pick_react_i18n_library.md +28 -0
- package/blog/en-GB/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/es/how_to_pick_react_i18n_library.md +28 -0
- package/blog/es/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/fr/how_to_pick_react_i18n_library.md +28 -0
- package/blog/fr/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/hi/how_to_pick_react_i18n_library.md +28 -0
- package/blog/hi/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/id/how_to_pick_react_i18n_library.md +28 -0
- package/blog/id/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/it/how_to_pick_react_i18n_library.md +28 -0
- package/blog/it/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/ja/how_to_pick_react_i18n_library.md +28 -0
- package/blog/ja/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/ko/how_to_pick_react_i18n_library.md +28 -0
- package/blog/ko/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/pl/how_to_pick_react_i18n_library.md +28 -0
- package/blog/pl/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/pt/how_to_pick_react_i18n_library.md +28 -0
- package/blog/pt/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/ru/how_to_pick_react_i18n_library.md +28 -0
- package/blog/ru/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/tr/how_to_pick_react_i18n_library.md +28 -0
- package/blog/tr/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/uk/how_to_pick_react_i18n_library.md +28 -0
- package/blog/uk/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/vi/how_to_pick_react_i18n_library.md +28 -0
- package/blog/vi/how_to_pick_solid_i18n_library.md +19 -5
- package/blog/zh/how_to_pick_react_i18n_library.md +28 -0
- package/blog/zh/how_to_pick_solid_i18n_library.md +19 -5
- package/dist/cjs/generated/docs.entry.cjs +220 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +220 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +11 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/how_works_intlayer.md +86 -14
- package/docs/ar/intlayer_visual_editor.md +7 -0
- package/docs/ar/intlayer_with_astro.md +60 -36
- package/docs/ar/intlayer_with_astro_preact.md +7 -0
- package/docs/ar/intlayer_with_astro_react.md +7 -0
- package/docs/ar/intlayer_with_astro_solid.md +7 -0
- package/docs/ar/intlayer_with_astro_svelte.md +7 -0
- package/docs/ar/intlayer_with_astro_vanilla.md +7 -0
- package/docs/ar/intlayer_with_astro_vue.md +7 -0
- package/docs/ar/intlayer_with_nextjs_14.md +7 -0
- package/docs/ar/intlayer_with_nextjs_15.md +7 -0
- package/docs/ar/intlayer_with_nextjs_16.md +7 -0
- package/docs/ar/intlayer_with_react_router_v7.md +7 -0
- package/docs/ar/intlayer_with_remix_3.md +73 -112
- package/docs/ar/intlayer_with_tanstack+solid.md +7 -0
- package/docs/ar/intlayer_with_tanstack.md +7 -0
- package/docs/ar/intlayer_with_vite+preact.md +7 -0
- package/docs/ar/intlayer_with_vite+react.md +7 -0
- package/docs/ar/intlayer_with_vite+solid.md +7 -0
- package/docs/ar/packages/astro-intlayer/exports.md +161 -9
- package/docs/ar/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/ar/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/ar/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/ar/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/ar/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/ar/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/ar/packages/remix-intlayer/exports.md +80 -0
- package/docs/ar/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/ar/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/ar/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/ar/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/ar/readme.md +2 -1
- package/docs/de/how_works_intlayer.md +86 -14
- package/docs/de/intlayer_visual_editor.md +7 -0
- package/docs/de/intlayer_with_astro.md +60 -36
- package/docs/de/intlayer_with_astro_preact.md +7 -0
- package/docs/de/intlayer_with_astro_react.md +7 -0
- package/docs/de/intlayer_with_astro_solid.md +7 -0
- package/docs/de/intlayer_with_astro_svelte.md +7 -0
- package/docs/de/intlayer_with_astro_vanilla.md +7 -0
- package/docs/de/intlayer_with_astro_vue.md +7 -0
- package/docs/de/intlayer_with_nextjs_14.md +7 -0
- package/docs/de/intlayer_with_nextjs_15.md +7 -0
- package/docs/de/intlayer_with_nextjs_16.md +7 -0
- package/docs/de/intlayer_with_react_router_v7.md +7 -0
- package/docs/de/intlayer_with_remix_3.md +70 -109
- package/docs/de/intlayer_with_tanstack+solid.md +7 -0
- package/docs/de/intlayer_with_tanstack.md +7 -0
- package/docs/de/intlayer_with_vite+preact.md +7 -0
- package/docs/de/intlayer_with_vite+react.md +7 -0
- package/docs/de/intlayer_with_vite+solid.md +7 -0
- package/docs/de/packages/astro-intlayer/exports.md +164 -12
- package/docs/de/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/de/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/de/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/de/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/de/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/de/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/de/packages/remix-intlayer/exports.md +176 -0
- package/docs/de/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/de/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/de/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/de/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/de/readme.md +2 -1
- package/docs/en/how_works_intlayer.md +86 -14
- package/docs/en/intlayer_visual_editor.md +7 -0
- package/docs/en/intlayer_with_astro.md +63 -41
- package/docs/en/intlayer_with_astro_preact.md +7 -0
- package/docs/en/intlayer_with_astro_react.md +7 -0
- package/docs/en/intlayer_with_astro_solid.md +7 -0
- package/docs/en/intlayer_with_astro_svelte.md +7 -0
- package/docs/en/intlayer_with_astro_vanilla.md +7 -0
- package/docs/en/intlayer_with_astro_vue.md +7 -0
- package/docs/en/intlayer_with_nextjs_14.md +7 -0
- package/docs/en/intlayer_with_nextjs_15.md +7 -0
- package/docs/en/intlayer_with_nextjs_16.md +7 -0
- package/docs/en/intlayer_with_react_router_v7.md +7 -0
- package/docs/en/intlayer_with_remix_3.md +74 -122
- package/docs/en/intlayer_with_tanstack+solid.md +7 -0
- package/docs/en/intlayer_with_tanstack.md +7 -0
- package/docs/en/intlayer_with_vite+preact.md +7 -0
- package/docs/en/intlayer_with_vite+react.md +7 -0
- package/docs/en/intlayer_with_vite+solid.md +7 -0
- package/docs/en/introduction.md +2 -1
- package/docs/en/packages/astro-intlayer/exports.md +161 -9
- package/docs/en/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/en/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/en/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/en/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/en/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/en/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/en/packages/remix-intlayer/exports.md +176 -0
- package/docs/en/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/en/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/en/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/en/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/en/readme.md +2 -1
- package/docs/en-GB/how_works_intlayer.md +86 -14
- package/docs/en-GB/intlayer_visual_editor.md +7 -0
- package/docs/en-GB/intlayer_with_astro.md +60 -36
- package/docs/en-GB/intlayer_with_astro_preact.md +7 -0
- package/docs/en-GB/intlayer_with_astro_react.md +7 -0
- package/docs/en-GB/intlayer_with_astro_solid.md +7 -0
- package/docs/en-GB/intlayer_with_astro_svelte.md +7 -0
- package/docs/en-GB/intlayer_with_astro_vanilla.md +7 -0
- package/docs/en-GB/intlayer_with_astro_vue.md +7 -0
- package/docs/en-GB/intlayer_with_nextjs_14.md +7 -0
- package/docs/en-GB/intlayer_with_nextjs_15.md +7 -0
- package/docs/en-GB/intlayer_with_nextjs_16.md +7 -0
- package/docs/en-GB/intlayer_with_react_router_v7.md +7 -0
- package/docs/en-GB/intlayer_with_remix_3.md +66 -105
- package/docs/en-GB/intlayer_with_tanstack+solid.md +7 -0
- package/docs/en-GB/intlayer_with_tanstack.md +7 -0
- package/docs/en-GB/intlayer_with_vite+preact.md +7 -0
- package/docs/en-GB/intlayer_with_vite+react.md +7 -0
- package/docs/en-GB/intlayer_with_vite+solid.md +7 -0
- package/docs/en-GB/packages/astro-intlayer/exports.md +162 -10
- package/docs/en-GB/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/en-GB/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/en-GB/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/en-GB/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/en-GB/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/en-GB/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/en-GB/packages/remix-intlayer/exports.md +176 -0
- package/docs/en-GB/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/en-GB/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/en-GB/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/en-GB/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/en-GB/readme.md +2 -1
- package/docs/es/how_works_intlayer.md +86 -14
- package/docs/es/intlayer_visual_editor.md +7 -0
- package/docs/es/intlayer_with_astro.md +60 -36
- package/docs/es/intlayer_with_astro_preact.md +7 -0
- package/docs/es/intlayer_with_astro_react.md +7 -0
- package/docs/es/intlayer_with_astro_solid.md +7 -0
- package/docs/es/intlayer_with_astro_svelte.md +7 -0
- package/docs/es/intlayer_with_astro_vanilla.md +7 -0
- package/docs/es/intlayer_with_astro_vue.md +7 -0
- package/docs/es/intlayer_with_nextjs_14.md +7 -0
- package/docs/es/intlayer_with_nextjs_15.md +7 -0
- package/docs/es/intlayer_with_nextjs_16.md +7 -0
- package/docs/es/intlayer_with_react_router_v7.md +7 -0
- package/docs/es/intlayer_with_remix_3.md +73 -112
- package/docs/es/intlayer_with_tanstack+solid.md +7 -0
- package/docs/es/intlayer_with_tanstack.md +7 -0
- package/docs/es/intlayer_with_vite+preact.md +7 -0
- package/docs/es/intlayer_with_vite+react.md +7 -0
- package/docs/es/intlayer_with_vite+solid.md +7 -0
- package/docs/es/packages/astro-intlayer/exports.md +162 -10
- package/docs/es/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/es/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/es/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/es/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/es/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/es/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/es/packages/remix-intlayer/exports.md +176 -0
- package/docs/es/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/es/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/es/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/es/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/es/readme.md +2 -1
- package/docs/fr/how_works_intlayer.md +86 -14
- package/docs/fr/intlayer_visual_editor.md +7 -0
- package/docs/fr/intlayer_with_astro.md +60 -36
- package/docs/fr/intlayer_with_astro_preact.md +7 -0
- package/docs/fr/intlayer_with_astro_react.md +7 -0
- package/docs/fr/intlayer_with_astro_solid.md +7 -0
- package/docs/fr/intlayer_with_astro_svelte.md +7 -0
- package/docs/fr/intlayer_with_astro_vanilla.md +7 -0
- package/docs/fr/intlayer_with_astro_vue.md +7 -0
- package/docs/fr/intlayer_with_nextjs_14.md +7 -0
- package/docs/fr/intlayer_with_nextjs_15.md +7 -0
- package/docs/fr/intlayer_with_nextjs_16.md +7 -0
- package/docs/fr/intlayer_with_react_router_v7.md +7 -0
- package/docs/fr/intlayer_with_remix_3.md +74 -122
- package/docs/fr/intlayer_with_tanstack+solid.md +7 -0
- package/docs/fr/intlayer_with_tanstack.md +7 -0
- package/docs/fr/intlayer_with_vite+preact.md +7 -0
- package/docs/fr/intlayer_with_vite+react.md +7 -0
- package/docs/fr/intlayer_with_vite+solid.md +7 -0
- package/docs/fr/packages/astro-intlayer/exports.md +162 -10
- package/docs/fr/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/fr/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/fr/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/fr/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/fr/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/fr/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/fr/packages/remix-intlayer/exports.md +176 -0
- package/docs/fr/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/fr/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/fr/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/fr/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/fr/readme.md +2 -1
- package/docs/hi/how_works_intlayer.md +86 -14
- package/docs/hi/intlayer_visual_editor.md +7 -0
- package/docs/hi/intlayer_with_astro.md +61 -37
- package/docs/hi/intlayer_with_astro_preact.md +7 -0
- package/docs/hi/intlayer_with_astro_react.md +7 -0
- package/docs/hi/intlayer_with_astro_solid.md +7 -0
- package/docs/hi/intlayer_with_astro_svelte.md +7 -0
- package/docs/hi/intlayer_with_astro_vanilla.md +7 -0
- package/docs/hi/intlayer_with_astro_vue.md +7 -0
- package/docs/hi/intlayer_with_nextjs_14.md +7 -0
- package/docs/hi/intlayer_with_nextjs_15.md +7 -0
- package/docs/hi/intlayer_with_nextjs_16.md +7 -0
- package/docs/hi/intlayer_with_react_router_v7.md +7 -0
- package/docs/hi/intlayer_with_remix_3.md +73 -112
- package/docs/hi/intlayer_with_tanstack+solid.md +7 -0
- package/docs/hi/intlayer_with_tanstack.md +7 -0
- package/docs/hi/intlayer_with_vite+preact.md +7 -0
- package/docs/hi/intlayer_with_vite+react.md +7 -0
- package/docs/hi/intlayer_with_vite+solid.md +7 -0
- package/docs/hi/packages/astro-intlayer/exports.md +165 -13
- package/docs/hi/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/hi/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/hi/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/hi/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/hi/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/hi/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/hi/packages/remix-intlayer/exports.md +80 -0
- package/docs/hi/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/hi/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/hi/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/hi/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/hi/readme.md +2 -1
- package/docs/id/how_works_intlayer.md +86 -14
- package/docs/id/intlayer_visual_editor.md +7 -0
- package/docs/id/intlayer_with_astro.md +60 -36
- package/docs/id/intlayer_with_astro_preact.md +7 -0
- package/docs/id/intlayer_with_astro_react.md +7 -0
- package/docs/id/intlayer_with_astro_solid.md +7 -0
- package/docs/id/intlayer_with_astro_svelte.md +7 -0
- package/docs/id/intlayer_with_astro_vanilla.md +7 -0
- package/docs/id/intlayer_with_astro_vue.md +7 -0
- package/docs/id/intlayer_with_nextjs_14.md +7 -0
- package/docs/id/intlayer_with_nextjs_15.md +7 -0
- package/docs/id/intlayer_with_nextjs_16.md +7 -0
- package/docs/id/intlayer_with_react_router_v7.md +7 -0
- package/docs/id/intlayer_with_remix_3.md +101 -148
- package/docs/id/intlayer_with_tanstack+solid.md +7 -0
- package/docs/id/intlayer_with_tanstack.md +7 -0
- package/docs/id/intlayer_with_vite+preact.md +7 -0
- package/docs/id/intlayer_with_vite+react.md +7 -0
- package/docs/id/intlayer_with_vite+solid.md +7 -0
- package/docs/id/packages/astro-intlayer/exports.md +163 -11
- package/docs/id/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/id/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/id/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/id/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/id/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/id/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/id/packages/remix-intlayer/exports.md +80 -0
- package/docs/id/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/id/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/id/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/id/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/id/readme.md +2 -1
- package/docs/it/how_works_intlayer.md +86 -14
- package/docs/it/intlayer_visual_editor.md +7 -0
- package/docs/it/intlayer_with_astro.md +60 -36
- package/docs/it/intlayer_with_astro_preact.md +7 -0
- package/docs/it/intlayer_with_astro_react.md +7 -0
- package/docs/it/intlayer_with_astro_solid.md +7 -0
- package/docs/it/intlayer_with_astro_svelte.md +7 -0
- package/docs/it/intlayer_with_astro_vanilla.md +7 -0
- package/docs/it/intlayer_with_astro_vue.md +7 -0
- package/docs/it/intlayer_with_nextjs_14.md +7 -0
- package/docs/it/intlayer_with_nextjs_15.md +7 -0
- package/docs/it/intlayer_with_nextjs_16.md +7 -0
- package/docs/it/intlayer_with_react_router_v7.md +7 -0
- package/docs/it/intlayer_with_remix_3.md +70 -109
- package/docs/it/intlayer_with_tanstack+solid.md +7 -0
- package/docs/it/intlayer_with_tanstack.md +7 -0
- package/docs/it/intlayer_with_vite+preact.md +7 -0
- package/docs/it/intlayer_with_vite+react.md +7 -0
- package/docs/it/intlayer_with_vite+solid.md +7 -0
- package/docs/it/packages/astro-intlayer/exports.md +161 -9
- package/docs/it/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/it/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/it/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/it/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/it/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/it/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/it/packages/remix-intlayer/exports.md +176 -0
- package/docs/it/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/it/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/it/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/it/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/it/readme.md +2 -1
- package/docs/ja/how_works_intlayer.md +86 -14
- package/docs/ja/intlayer_visual_editor.md +7 -0
- package/docs/ja/intlayer_with_astro.md +61 -37
- package/docs/ja/intlayer_with_astro_preact.md +7 -0
- package/docs/ja/intlayer_with_astro_react.md +7 -0
- package/docs/ja/intlayer_with_astro_solid.md +7 -0
- package/docs/ja/intlayer_with_astro_svelte.md +7 -0
- package/docs/ja/intlayer_with_astro_vanilla.md +7 -0
- package/docs/ja/intlayer_with_astro_vue.md +7 -0
- package/docs/ja/intlayer_with_nextjs_14.md +7 -0
- package/docs/ja/intlayer_with_nextjs_15.md +7 -0
- package/docs/ja/intlayer_with_nextjs_16.md +7 -0
- package/docs/ja/intlayer_with_react_router_v7.md +7 -0
- package/docs/ja/intlayer_with_remix_3.md +73 -112
- package/docs/ja/intlayer_with_tanstack+solid.md +7 -0
- package/docs/ja/intlayer_with_tanstack.md +7 -0
- package/docs/ja/intlayer_with_vite+preact.md +7 -0
- package/docs/ja/intlayer_with_vite+react.md +7 -0
- package/docs/ja/intlayer_with_vite+solid.md +7 -0
- package/docs/ja/packages/astro-intlayer/exports.md +163 -11
- package/docs/ja/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/ja/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/ja/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/ja/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/ja/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/ja/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/ja/packages/remix-intlayer/exports.md +80 -0
- package/docs/ja/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/ja/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/ja/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/ja/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/ja/readme.md +2 -1
- package/docs/ko/how_works_intlayer.md +86 -14
- package/docs/ko/intlayer_visual_editor.md +7 -0
- package/docs/ko/intlayer_with_astro.md +61 -37
- package/docs/ko/intlayer_with_astro_preact.md +7 -0
- package/docs/ko/intlayer_with_astro_react.md +7 -0
- package/docs/ko/intlayer_with_astro_solid.md +7 -0
- package/docs/ko/intlayer_with_astro_svelte.md +7 -0
- package/docs/ko/intlayer_with_astro_vanilla.md +7 -0
- package/docs/ko/intlayer_with_astro_vue.md +7 -0
- package/docs/ko/intlayer_with_nextjs_14.md +7 -0
- package/docs/ko/intlayer_with_nextjs_15.md +7 -0
- package/docs/ko/intlayer_with_nextjs_16.md +7 -0
- package/docs/ko/intlayer_with_react_router_v7.md +7 -0
- package/docs/ko/intlayer_with_remix_3.md +73 -112
- package/docs/ko/intlayer_with_tanstack+solid.md +7 -0
- package/docs/ko/intlayer_with_tanstack.md +7 -0
- package/docs/ko/intlayer_with_vite+preact.md +7 -0
- package/docs/ko/intlayer_with_vite+react.md +7 -0
- package/docs/ko/intlayer_with_vite+solid.md +7 -0
- package/docs/ko/packages/astro-intlayer/exports.md +163 -11
- package/docs/ko/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/ko/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/ko/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/ko/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/ko/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/ko/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/ko/packages/remix-intlayer/exports.md +80 -0
- package/docs/ko/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/ko/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/ko/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/ko/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/ko/readme.md +2 -1
- package/docs/pl/how_works_intlayer.md +86 -14
- package/docs/pl/intlayer_visual_editor.md +7 -0
- package/docs/pl/intlayer_with_astro.md +61 -37
- package/docs/pl/intlayer_with_astro_preact.md +7 -0
- package/docs/pl/intlayer_with_astro_react.md +7 -0
- package/docs/pl/intlayer_with_astro_solid.md +7 -0
- package/docs/pl/intlayer_with_astro_svelte.md +7 -0
- package/docs/pl/intlayer_with_astro_vanilla.md +7 -0
- package/docs/pl/intlayer_with_astro_vue.md +7 -0
- package/docs/pl/intlayer_with_nextjs_14.md +7 -0
- package/docs/pl/intlayer_with_nextjs_15.md +7 -0
- package/docs/pl/intlayer_with_nextjs_16.md +7 -0
- package/docs/pl/intlayer_with_react_router_v7.md +7 -0
- package/docs/pl/intlayer_with_remix_3.md +101 -148
- package/docs/pl/intlayer_with_tanstack+solid.md +7 -0
- package/docs/pl/intlayer_with_tanstack.md +7 -0
- package/docs/pl/intlayer_with_vite+preact.md +7 -0
- package/docs/pl/intlayer_with_vite+react.md +7 -0
- package/docs/pl/intlayer_with_vite+solid.md +7 -0
- package/docs/pl/packages/astro-intlayer/exports.md +162 -10
- package/docs/pl/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/pl/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/pl/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/pl/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/pl/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/pl/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/pl/packages/remix-intlayer/exports.md +80 -0
- package/docs/pl/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/pl/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/pl/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/pl/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/pl/readme.md +2 -1
- package/docs/pt/how_works_intlayer.md +86 -14
- package/docs/pt/intlayer_visual_editor.md +7 -0
- package/docs/pt/intlayer_with_astro.md +61 -37
- package/docs/pt/intlayer_with_astro_preact.md +7 -0
- package/docs/pt/intlayer_with_astro_react.md +7 -0
- package/docs/pt/intlayer_with_astro_solid.md +7 -0
- package/docs/pt/intlayer_with_astro_svelte.md +7 -0
- package/docs/pt/intlayer_with_astro_vanilla.md +7 -0
- package/docs/pt/intlayer_with_astro_vue.md +7 -0
- package/docs/pt/intlayer_with_nextjs_14.md +7 -0
- package/docs/pt/intlayer_with_nextjs_15.md +7 -0
- package/docs/pt/intlayer_with_nextjs_16.md +7 -0
- package/docs/pt/intlayer_with_react_router_v7.md +7 -0
- package/docs/pt/intlayer_with_remix_3.md +73 -112
- package/docs/pt/intlayer_with_tanstack+solid.md +7 -0
- package/docs/pt/intlayer_with_tanstack.md +7 -0
- package/docs/pt/intlayer_with_vite+preact.md +7 -0
- package/docs/pt/intlayer_with_vite+react.md +7 -0
- package/docs/pt/intlayer_with_vite+solid.md +7 -0
- package/docs/pt/packages/astro-intlayer/exports.md +162 -10
- package/docs/pt/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/pt/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/pt/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/pt/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/pt/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/pt/packages/remix-intlayer/Intlayer.md +77 -0
- package/docs/pt/packages/remix-intlayer/exports.md +176 -0
- package/docs/pt/packages/remix-intlayer/intlayerMiddleware.md +101 -0
- package/docs/pt/packages/remix-intlayer/useDictionary.md +94 -0
- package/docs/pt/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/pt/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/pt/readme.md +2 -1
- package/docs/ru/how_works_intlayer.md +86 -14
- package/docs/ru/intlayer_visual_editor.md +7 -0
- package/docs/ru/intlayer_with_astro.md +61 -37
- package/docs/ru/intlayer_with_astro_preact.md +7 -0
- package/docs/ru/intlayer_with_astro_react.md +7 -0
- package/docs/ru/intlayer_with_astro_solid.md +7 -0
- package/docs/ru/intlayer_with_astro_svelte.md +7 -0
- package/docs/ru/intlayer_with_astro_vanilla.md +7 -0
- package/docs/ru/intlayer_with_astro_vue.md +7 -0
- package/docs/ru/intlayer_with_nextjs_14.md +7 -0
- package/docs/ru/intlayer_with_nextjs_15.md +7 -0
- package/docs/ru/intlayer_with_nextjs_16.md +7 -0
- package/docs/ru/intlayer_with_react_router_v7.md +7 -0
- package/docs/ru/intlayer_with_remix_3.md +73 -112
- package/docs/ru/intlayer_with_tanstack+solid.md +7 -0
- package/docs/ru/intlayer_with_tanstack.md +7 -0
- package/docs/ru/intlayer_with_vite+preact.md +7 -0
- package/docs/ru/intlayer_with_vite+react.md +7 -0
- package/docs/ru/intlayer_with_vite+solid.md +7 -0
- package/docs/ru/packages/astro-intlayer/exports.md +164 -12
- package/docs/ru/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/ru/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/ru/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/ru/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/ru/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/ru/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/ru/packages/remix-intlayer/exports.md +80 -0
- package/docs/ru/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/ru/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/ru/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/ru/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/ru/readme.md +2 -1
- package/docs/tr/how_works_intlayer.md +86 -14
- package/docs/tr/intlayer_visual_editor.md +7 -0
- package/docs/tr/intlayer_with_astro.md +60 -36
- package/docs/tr/intlayer_with_astro_preact.md +7 -0
- package/docs/tr/intlayer_with_astro_react.md +7 -0
- package/docs/tr/intlayer_with_astro_solid.md +7 -0
- package/docs/tr/intlayer_with_astro_svelte.md +7 -0
- package/docs/tr/intlayer_with_astro_vanilla.md +7 -0
- package/docs/tr/intlayer_with_astro_vue.md +7 -0
- package/docs/tr/intlayer_with_nextjs_14.md +7 -0
- package/docs/tr/intlayer_with_nextjs_15.md +7 -0
- package/docs/tr/intlayer_with_nextjs_16.md +7 -0
- package/docs/tr/intlayer_with_react_router_v7.md +7 -0
- package/docs/tr/intlayer_with_remix_3.md +101 -148
- package/docs/tr/intlayer_with_tanstack+solid.md +7 -0
- package/docs/tr/intlayer_with_tanstack.md +7 -0
- package/docs/tr/intlayer_with_vite+preact.md +7 -0
- package/docs/tr/intlayer_with_vite+react.md +7 -0
- package/docs/tr/intlayer_with_vite+solid.md +7 -0
- package/docs/tr/packages/astro-intlayer/exports.md +165 -13
- package/docs/tr/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/tr/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/tr/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/tr/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/tr/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/tr/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/tr/packages/remix-intlayer/exports.md +80 -0
- package/docs/tr/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/tr/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/tr/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/tr/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/tr/readme.md +2 -1
- package/docs/uk/how_works_intlayer.md +86 -14
- package/docs/uk/intlayer_visual_editor.md +7 -0
- package/docs/uk/intlayer_with_astro.md +61 -37
- package/docs/uk/intlayer_with_astro_preact.md +7 -0
- package/docs/uk/intlayer_with_astro_react.md +7 -0
- package/docs/uk/intlayer_with_astro_solid.md +7 -0
- package/docs/uk/intlayer_with_astro_svelte.md +7 -0
- package/docs/uk/intlayer_with_astro_vanilla.md +7 -0
- package/docs/uk/intlayer_with_astro_vue.md +7 -0
- package/docs/uk/intlayer_with_nextjs_14.md +7 -0
- package/docs/uk/intlayer_with_nextjs_15.md +7 -0
- package/docs/uk/intlayer_with_nextjs_16.md +7 -0
- package/docs/uk/intlayer_with_react_router_v7.md +7 -0
- package/docs/uk/intlayer_with_remix_3.md +101 -148
- package/docs/uk/intlayer_with_tanstack+solid.md +7 -0
- package/docs/uk/intlayer_with_tanstack.md +7 -0
- package/docs/uk/intlayer_with_vite+preact.md +7 -0
- package/docs/uk/intlayer_with_vite+react.md +7 -0
- package/docs/uk/intlayer_with_vite+solid.md +7 -0
- package/docs/uk/packages/astro-intlayer/exports.md +162 -10
- package/docs/uk/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/uk/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/uk/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/uk/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/uk/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/uk/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/uk/packages/remix-intlayer/exports.md +80 -0
- package/docs/uk/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/uk/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/uk/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/uk/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/uk/readme.md +2 -1
- package/docs/vi/how_works_intlayer.md +86 -14
- package/docs/vi/intlayer_visual_editor.md +7 -0
- package/docs/vi/intlayer_with_astro.md +60 -36
- package/docs/vi/intlayer_with_astro_preact.md +7 -0
- package/docs/vi/intlayer_with_astro_react.md +7 -0
- package/docs/vi/intlayer_with_astro_solid.md +7 -0
- package/docs/vi/intlayer_with_astro_svelte.md +7 -0
- package/docs/vi/intlayer_with_astro_vanilla.md +7 -0
- package/docs/vi/intlayer_with_astro_vue.md +7 -0
- package/docs/vi/intlayer_with_nextjs_14.md +7 -0
- package/docs/vi/intlayer_with_nextjs_15.md +7 -0
- package/docs/vi/intlayer_with_nextjs_16.md +7 -0
- package/docs/vi/intlayer_with_react_router_v7.md +7 -0
- package/docs/vi/intlayer_with_remix_3.md +101 -148
- package/docs/vi/intlayer_with_tanstack+solid.md +7 -0
- package/docs/vi/intlayer_with_tanstack.md +7 -0
- package/docs/vi/intlayer_with_vite+preact.md +7 -0
- package/docs/vi/intlayer_with_vite+react.md +7 -0
- package/docs/vi/intlayer_with_vite+solid.md +7 -0
- package/docs/vi/packages/astro-intlayer/exports.md +167 -15
- package/docs/vi/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/vi/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/vi/packages/astro-intlayer/useDictionary.md +94 -0
- package/docs/vi/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/vi/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/vi/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/vi/packages/remix-intlayer/exports.md +80 -0
- package/docs/vi/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/vi/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/vi/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/vi/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/vi/readme.md +2 -1
- package/docs/zh/how_works_intlayer.md +86 -14
- package/docs/zh/intlayer_visual_editor.md +7 -0
- package/docs/zh/intlayer_with_astro.md +61 -37
- package/docs/zh/intlayer_with_astro_preact.md +7 -0
- package/docs/zh/intlayer_with_astro_react.md +7 -0
- package/docs/zh/intlayer_with_astro_solid.md +7 -0
- package/docs/zh/intlayer_with_astro_svelte.md +7 -0
- package/docs/zh/intlayer_with_astro_vanilla.md +7 -0
- package/docs/zh/intlayer_with_astro_vue.md +7 -0
- package/docs/zh/intlayer_with_nextjs_14.md +7 -0
- package/docs/zh/intlayer_with_nextjs_15.md +7 -0
- package/docs/zh/intlayer_with_nextjs_16.md +7 -0
- package/docs/zh/intlayer_with_react_router_v7.md +7 -0
- package/docs/zh/intlayer_with_remix_3.md +74 -112
- package/docs/zh/intlayer_with_tanstack+solid.md +7 -0
- package/docs/zh/intlayer_with_tanstack.md +7 -0
- package/docs/zh/intlayer_with_vite+preact.md +7 -0
- package/docs/zh/intlayer_with_vite+react.md +7 -0
- package/docs/zh/intlayer_with_vite+solid.md +7 -0
- package/docs/zh/packages/astro-intlayer/exports.md +166 -14
- package/docs/zh/packages/astro-intlayer/intlayer.md +76 -0
- package/docs/zh/packages/astro-intlayer/onRequest.md +76 -0
- package/docs/zh/packages/astro-intlayer/useDictionary.md +95 -0
- package/docs/zh/packages/astro-intlayer/useIntlayer.md +98 -0
- package/docs/zh/packages/astro-intlayer/useLocale.md +126 -0
- package/docs/zh/packages/remix-intlayer/Intlayer.md +55 -0
- package/docs/zh/packages/remix-intlayer/exports.md +80 -0
- package/docs/zh/packages/remix-intlayer/intlayerMiddleware.md +55 -0
- package/docs/zh/packages/remix-intlayer/useDictionary.md +95 -0
- package/docs/zh/packages/remix-intlayer/useIntlayer.md +94 -0
- package/docs/zh/packages/remix-intlayer/useLocale.md +104 -0
- package/docs/zh/readme.md +2 -1
- package/package.json +6 -6
- package/src/generated/docs.entry.ts +223 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-09-09
|
|
3
|
-
updatedAt: 2026-09-
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
4
|
title: "Remix 3 i18n - Complete guide to translate your app"
|
|
5
5
|
description: "No more i18next. The 2026 guide to building a multilingual (i18n) Remix 3 app. Translate with AI agents and optimise bundle size, SEO and performance."
|
|
6
6
|
keywords:
|
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-remix-3-template
|
|
20
20
|
applicationShowcase: https://intlayer-remix-3-template.vercel.app
|
|
21
21
|
history:
|
|
22
|
+
- version: 9.5.5
|
|
23
|
+
date: 2026-09-19
|
|
24
|
+
changes: "Use the remix-intlayer middleware and hooks"
|
|
22
25
|
- version: 9.5.0
|
|
23
26
|
date: 2026-09-09
|
|
24
27
|
changes: "Initial documentation for Remix 3"
|
|
@@ -39,7 +42,7 @@ This guide demonstrates how to integrate **Intlayer** for seamless international
|
|
|
39
42
|
- **`remix/node-fetch-server`**: Server adapters for Node.js, while natively supporting Bun, Deno, and edge runtimes.
|
|
40
43
|
- **`remix/cookie`**: Cryptographically secure cookie parsing and serialisation.
|
|
41
44
|
|
|
42
|
-
Combined with **Intlayer
|
|
45
|
+
Combined with **Intlayer** and the **`remix-intlayer`** package, a locale middleware plus the same `useIntlayer` / `useDictionary` / `useLocale` hooks as `react-intlayer`, bound to the Remix request context, you get a complete internationalisation system that delivers compile-time safety, automated AI translations, zero-overhead server rendering, and seamless locale routing.
|
|
43
46
|
|
|
44
47
|
## Table of Contents
|
|
45
48
|
|
|
@@ -52,7 +55,7 @@ Compared to traditional solutions like `i18next` or bespoke translation loaders,
|
|
|
52
55
|
<AccordionGroup>
|
|
53
56
|
<Accordion header="Full Remix 3 & Web Standards Coverage">
|
|
54
57
|
|
|
55
|
-
Intlayer is built to work seamlessly with web standards (`Request`, `Response`, `Headers`, and `URL`).
|
|
58
|
+
Intlayer is built to work seamlessly with web standards (`Request`, `Response`, `Headers`, and `URL`). `remix-intlayer` plugs into Remix 3's Fetch router as a lightweight middleware, extracting the locale from URL paths, cookies, or `Accept-Language` headers and exposing it to the rest of the request, handlers, views and `remix/ui` components, without passing it around or locking you into a specific runtime.
|
|
56
59
|
|
|
57
60
|
</Accordion>
|
|
58
61
|
<Accordion header="Type-Safe Content Declarations">
|
|
@@ -109,25 +112,26 @@ See the [Application Template](https://github.com/aymericzip/intlayer-remix-3-te
|
|
|
109
112
|
<Steps>
|
|
110
113
|
<Step number={1} title="Install Dependencies">
|
|
111
114
|
|
|
112
|
-
Install `intlayer` and `remix` (version 3) using your preferred package manager:
|
|
115
|
+
Install `intlayer`, `remix-intlayer` and `remix` (version 3) using your preferred package manager:
|
|
113
116
|
|
|
114
117
|
```bash packageManager="npm"
|
|
115
|
-
npm install intlayer remix@next
|
|
118
|
+
npm install intlayer remix-intlayer remix@next
|
|
116
119
|
```
|
|
117
120
|
|
|
118
121
|
```bash packageManager="pnpm"
|
|
119
|
-
pnpm add intlayer remix@next
|
|
122
|
+
pnpm add intlayer remix-intlayer remix@next
|
|
120
123
|
```
|
|
121
124
|
|
|
122
125
|
```bash packageManager="yarn"
|
|
123
|
-
yarn add intlayer remix@next
|
|
126
|
+
yarn add intlayer remix-intlayer remix@next
|
|
124
127
|
```
|
|
125
128
|
|
|
126
129
|
```bash packageManager="bun"
|
|
127
|
-
bun add intlayer remix@next
|
|
130
|
+
bun add intlayer remix-intlayer remix@next
|
|
128
131
|
```
|
|
129
132
|
|
|
130
133
|
- **`intlayer`**: Core internationalisation engine providing configuration management, dictionary declaration (`t()`, `Dictionary`), CLI tools, and runtime interpreter.
|
|
134
|
+
- **`remix-intlayer`**: The Remix 3 integration: the `intlayer()` router middleware that resolves the locale of each request, and the `useIntlayer`, `useDictionary` and `useLocale` hooks that read it anywhere downstream.
|
|
131
135
|
- **`remix`**: The unified Remix 3 framework package exporting `remix/router`, `remix/routes`, `remix/ui`, `remix/middleware/render`, and `remix/node-fetch-server`.
|
|
132
136
|
|
|
133
137
|
</Step>
|
|
@@ -254,65 +258,30 @@ bun x intlayer build
|
|
|
254
258
|
This compiles your content into the `.intlayer` artifact directory, enabling full TypeScript autocompletion and rapid dictionary lookup.
|
|
255
259
|
|
|
256
260
|
</Step>
|
|
257
|
-
<Step number={5} title="
|
|
261
|
+
<Step number={5} title="Add the Intlayer Middleware">
|
|
258
262
|
|
|
259
263
|
Remix 3 provides a composable middleware pipeline via `createRouter({ middleware: [...] })`.
|
|
260
264
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
1. The URL
|
|
264
|
-
2.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Type-safe context key to retrieve the resolved locale from Remix 3 RequestContext.
|
|
278
|
-
*/
|
|
279
|
-
export const localeKey = createContextKey<Locale>(defaultLocale);
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Intlayer middleware for Remix 3.
|
|
283
|
-
*
|
|
284
|
-
* Resolves the request locale following priority:
|
|
285
|
-
* 1. URL path prefix (e.g. `/en-GB/...`) via `getLocaleFromPath`
|
|
286
|
-
* 2. Storage & headers negotiation via Intlayer `getLocale` (cookie, custom header, Accept-Language negotiation, fallback defaultLocale)
|
|
287
|
-
*
|
|
288
|
-
* Attaches the resolved locale to the Remix 3 RequestContext.
|
|
289
|
-
*/
|
|
290
|
-
export const intlayer = (): Middleware => {
|
|
291
|
-
return async (context, next) => {
|
|
292
|
-
// Path detection (/en-GB/about -> "en-GB", /about -> undefined)
|
|
293
|
-
const pathLocale = getLocaleFromPath(context.url.pathname);
|
|
294
|
-
|
|
295
|
-
if (pathLocale) {
|
|
296
|
-
// Attach resolved locale to Remix 3 request context
|
|
297
|
-
context.set(localeKey, pathLocale);
|
|
298
|
-
|
|
299
|
-
return next();
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
const storedLocale = await getLocale({
|
|
303
|
-
getHeader: (name) => context.headers.get(name),
|
|
304
|
-
getCookie: (name) =>
|
|
305
|
-
getCookie(name, context.headers.get("cookie") ?? undefined),
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
// Attach resolved locale to Remix 3 request context
|
|
309
|
-
context.set(localeKey, storedLocale ?? defaultLocale);
|
|
310
|
-
|
|
311
|
-
return next();
|
|
312
|
-
};
|
|
313
|
-
};
|
|
265
|
+
`remix-intlayer` ships the `intlayer()` middleware. For each incoming request it resolves the locale using:
|
|
266
|
+
|
|
267
|
+
1. The URL, in every routing mode but `no-prefix`: the path prefix (e.g. `/en-GB` or `/fr`) or the `?locale=` search param.
|
|
268
|
+
2. The locale persisted by the client: the storage cookie (`INTLAYER_LOCALE`) or custom header (`x-intlayer-locale`).
|
|
269
|
+
3. Standard `Accept-Language` negotiation, falling back to your configured `defaultLocale`.
|
|
270
|
+
|
|
271
|
+
The result is stored in the Remix request context as `context.intlayer` (or `context.get(Intlayer)`), with `locale`, `defaultLocale` and `availableLocales`. The middleware then runs the rest of the request inside an `AsyncLocalStorage` scope bound to that context, which is what lets the hooks of the package read the locale with no argument, in route handlers, views and `remix/ui` components alike:
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
274
|
+
import { useIntlayer, useLocale } from "remix-intlayer";
|
|
275
|
+
|
|
276
|
+
// Anywhere downstream of the middleware
|
|
277
|
+
const { locale, availableLocales } = useLocale();
|
|
278
|
+
const { title } = useIntlayer("home");
|
|
314
279
|
```
|
|
315
280
|
|
|
281
|
+
`useIntlayer("home", "fr")` or `useIntlayer("faq", { item: 2 })` override the request locale for one call, and `useDictionary(homeContent)` reads an imported dictionary instead of a key. Outside of a request the hooks fall back to the default locale.
|
|
282
|
+
|
|
283
|
+
> The middleware also prepares the Intlayer dictionaries when the server starts, so a missing `intlayer build` does not leave the registry empty.
|
|
284
|
+
|
|
316
285
|
</Step>
|
|
317
286
|
<Step number={6} title="Define Type-Safe Routes">
|
|
318
287
|
|
|
@@ -342,20 +311,21 @@ routes.localizedHome.href({ locale: "en-GB" }); // "/en-GB"
|
|
|
342
311
|
|
|
343
312
|
Remix 3 renders UI with JSX components from `remix/ui`. A component is a **setup function** that receives a `Handle` and returns a **render function**. Setup runs once per instance, render runs on every update, and props are read through `handle.props`.
|
|
344
313
|
|
|
345
|
-
Start with a shared `Document` shell that sets the `<html lang="..." dir="...">` attributes from the resolved
|
|
314
|
+
Start with a shared `Document` shell that sets the `<html lang="..." dir="...">` attributes from the locale resolved by the middleware:
|
|
346
315
|
|
|
347
316
|
```tsx fileName="src/views/document.tsx" codeFormat={["typescript", "esm"]}
|
|
348
|
-
import { getHTMLTextDir
|
|
317
|
+
import { getHTMLTextDir } from "intlayer";
|
|
318
|
+
import { useLocale } from "remix-intlayer";
|
|
349
319
|
import type { Handle, RemixNode } from "remix/ui";
|
|
350
320
|
|
|
351
321
|
type DocumentProps = {
|
|
352
|
-
locale: Locale;
|
|
353
322
|
title: string;
|
|
354
323
|
children?: RemixNode;
|
|
355
324
|
};
|
|
356
325
|
|
|
357
326
|
export const Document = (handle: Handle<DocumentProps>) => () => {
|
|
358
|
-
const {
|
|
327
|
+
const { title, children } = handle.props;
|
|
328
|
+
const { locale } = useLocale();
|
|
359
329
|
|
|
360
330
|
return (
|
|
361
331
|
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
@@ -370,47 +340,40 @@ export const Document = (handle: Handle<DocumentProps>) => () => {
|
|
|
370
340
|
};
|
|
371
341
|
```
|
|
372
342
|
|
|
373
|
-
Then create the home page. It
|
|
343
|
+
Then create the home page. It reads the localised dictionary with `useIntlayer` and renders a language switcher:
|
|
374
344
|
|
|
375
345
|
```tsx fileName="src/views/home.tsx" codeFormat={["typescript", "esm"]}
|
|
376
|
-
import {
|
|
377
|
-
|
|
378
|
-
getLocaleName,
|
|
379
|
-
getLocalizedPath,
|
|
380
|
-
type Locale,
|
|
381
|
-
locales,
|
|
382
|
-
} from "intlayer";
|
|
383
|
-
import type { Handle } from "remix/ui";
|
|
384
|
-
import { routes } from "../routes";
|
|
346
|
+
import { getLocaleName, getLocalizedUrl, getPathWithoutLocale } from "intlayer";
|
|
347
|
+
import { useIntlayer, useLocale } from "remix-intlayer";
|
|
385
348
|
import { Document } from "./document";
|
|
386
349
|
|
|
387
|
-
|
|
388
|
-
locale
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
export const HomePage = (handle: Handle<HomePageProps>) => () => {
|
|
392
|
-
const { locale } = handle.props;
|
|
393
|
-
const home = getIntlayer("home", locale);
|
|
350
|
+
export const HomePage = () => () => {
|
|
351
|
+
const { locale, availableLocales } = useLocale();
|
|
352
|
+
const home = useIntlayer("home");
|
|
353
|
+
const pathWithoutLocale = getPathWithoutLocale();
|
|
394
354
|
|
|
395
355
|
return (
|
|
396
|
-
<Document
|
|
356
|
+
<Document title={home.title}>
|
|
397
357
|
<header>
|
|
398
358
|
<nav aria-label="Languages">
|
|
399
359
|
<span>{home.switchLanguage}</span>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
key={
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
360
|
+
<ul>
|
|
361
|
+
{availableLocales.map((localeItem) => {
|
|
362
|
+
const isActive = localeItem === locale;
|
|
363
|
+
|
|
364
|
+
return (
|
|
365
|
+
<li key={localeItem} class="p-1">
|
|
366
|
+
<a
|
|
367
|
+
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
368
|
+
class={isActive ? "active" : undefined}
|
|
369
|
+
aria-current={isActive ? "page" : undefined}
|
|
370
|
+
>
|
|
371
|
+
{getLocaleName(localeItem, locale)}
|
|
372
|
+
</a>
|
|
373
|
+
</li>
|
|
374
|
+
);
|
|
375
|
+
})}
|
|
376
|
+
</ul>
|
|
414
377
|
</nav>
|
|
415
378
|
</header>
|
|
416
379
|
<main>
|
|
@@ -422,7 +385,7 @@ export const HomePage = (handle: Handle<HomePageProps>) => () => {
|
|
|
422
385
|
};
|
|
423
386
|
```
|
|
424
387
|
|
|
425
|
-
> Remix JSX is not React:
|
|
388
|
+
> Remix JSX is not React: `class` is written as-is (`className` is also accepted), and re-renders are triggered explicitly with `handle.update()`. Interpolated values are escaped automatically. The Intlayer hooks are plain functions reading the request scope, so they can be called from the setup function or the render function alike.
|
|
426
389
|
|
|
427
390
|
</Step>
|
|
428
391
|
<Step number={8} title="Wire Up the Router and Server">
|
|
@@ -431,9 +394,9 @@ Add the `render()` middleware from `remix/middleware/render` next to the Intlaye
|
|
|
431
394
|
|
|
432
395
|
```tsx fileName="src/router.tsx" codeFormat={["typescript", "esm"]}
|
|
433
396
|
import { isDeclaredLocale } from "intlayer";
|
|
397
|
+
import { intlayer } from "remix-intlayer";
|
|
434
398
|
import { render } from "remix/middleware/render";
|
|
435
399
|
import { createRouter } from "remix/router";
|
|
436
|
-
import { intlayer, localeKey } from "./middleware/intlayer";
|
|
437
400
|
import { routes } from "./routes";
|
|
438
401
|
import { HomePage } from "./views/home";
|
|
439
402
|
|
|
@@ -447,8 +410,7 @@ router.map(routes, {
|
|
|
447
410
|
actions: {
|
|
448
411
|
// Default locale route
|
|
449
412
|
home(context) {
|
|
450
|
-
|
|
451
|
-
return context.render(<HomePage locale={locale} />);
|
|
413
|
+
return context.render(<HomePage />);
|
|
452
414
|
},
|
|
453
415
|
|
|
454
416
|
// Localized route
|
|
@@ -456,14 +418,13 @@ router.map(routes, {
|
|
|
456
418
|
if (!isDeclaredLocale(context.params.locale)) {
|
|
457
419
|
return new Response("Not Found", { status: 404 });
|
|
458
420
|
}
|
|
459
|
-
|
|
460
|
-
return context.render(<HomePage locale={locale} />);
|
|
421
|
+
return context.render(<HomePage />);
|
|
461
422
|
},
|
|
462
423
|
},
|
|
463
424
|
});
|
|
464
425
|
```
|
|
465
426
|
|
|
466
|
-
> `context.render` accepts an optional `ResponseInit` as second argument, e.g. `context.render(<NotFoundPage
|
|
427
|
+
> `context.render` accepts an optional `ResponseInit` as second argument, e.g. `context.render(<NotFoundPage />, { status: 404 })`. The resolved locale stays reachable from the handler as `context.intlayer.locale`, for instance to build a `Response.json` payload.
|
|
467
428
|
|
|
468
429
|
Finally, expose the router through a standard `fetch` handler. The same router runs on Node.js, Bun, Deno, and Cloudflare Workers:
|
|
469
430
|
|
|
@@ -1260,6 +1260,13 @@ Yes: [plural forms](https://github.com/aymericzip/intlayer/blob/main/docs/docs/e
|
|
|
1260
1260
|
|
|
1261
1261
|
Through the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md), which runs on your own infrastructure and lets anyone edit text in place on the running app, or the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md), which externalizes content so it can change without a deployment.
|
|
1262
1262
|
|
|
1263
|
+
</Question>
|
|
1264
|
+
<Question title="What is the cost of the visual editor? Is it overkill if I don't need it?">
|
|
1265
|
+
|
|
1266
|
+
The [Intlayer visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) has **zero cost** on your application if it is not set up. The extra logic is only loaded if explicitly enabled and needed.
|
|
1267
|
+
|
|
1268
|
+
If enabled, the cost is extremely light (+5 KB, dynamically loaded only when activated) because the main logic is handled by the server editor on [app.intlayer.org](https://app.intlayer.org) or via the `intlayer-editor` package. If you only need a simple translation setup without visual editing, Intlayer adds no overhead to your app.
|
|
1269
|
+
|
|
1263
1270
|
</Question>
|
|
1264
1271
|
<Question title="Is Intlayer free and open source?">
|
|
1265
1272
|
|
|
@@ -1331,6 +1331,13 @@ Yes. Content declarations support [plural forms](https://github.com/aymericzip/i
|
|
|
1331
1331
|
|
|
1332
1332
|
Through the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md), which runs on your own infrastructure and lets anyone edit text in place on the running site, or the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md), which externalizes content so it can change without a deployment.
|
|
1333
1333
|
|
|
1334
|
+
</Question>
|
|
1335
|
+
<Question title="What is the cost of the visual editor? Is it overkill if I don't need it?">
|
|
1336
|
+
|
|
1337
|
+
The [Intlayer visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) has **zero cost** on your application if it is not set up. The extra logic is only loaded if explicitly enabled and needed.
|
|
1338
|
+
|
|
1339
|
+
If enabled, the cost is extremely light (+5 KB, dynamically loaded only when activated) because the main logic is handled by the server editor on [app.intlayer.org](https://app.intlayer.org) or via the `intlayer-editor` package. If you only need a simple translation setup without visual editing, Intlayer adds no overhead to your app.
|
|
1340
|
+
|
|
1334
1341
|
</Question>
|
|
1335
1342
|
<Question title="Is Intlayer free and open source?">
|
|
1336
1343
|
|
|
@@ -1125,6 +1125,13 @@ Yes: [plural forms](https://github.com/aymericzip/intlayer/blob/main/docs/docs/e
|
|
|
1125
1125
|
|
|
1126
1126
|
Through the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md), which runs on your own infrastructure and lets anyone edit text in place on the running app, or the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md), which externalizes content so it can change without a deployment.
|
|
1127
1127
|
|
|
1128
|
+
</Question>
|
|
1129
|
+
<Question title="What is the cost of the visual editor? Is it overkill if I don't need it?">
|
|
1130
|
+
|
|
1131
|
+
The [Intlayer visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) has **zero cost** on your application if it is not set up. The extra logic is only loaded if explicitly enabled and needed.
|
|
1132
|
+
|
|
1133
|
+
If enabled, the cost is extremely light (+5 KB, dynamically loaded only when activated) because the main logic is handled by the server editor on [app.intlayer.org](https://app.intlayer.org) or via the `intlayer-editor` package. If you only need a simple translation setup without visual editing, Intlayer adds no overhead to your app.
|
|
1134
|
+
|
|
1128
1135
|
</Question>
|
|
1129
1136
|
<Question title="Is Intlayer free and open source?">
|
|
1130
1137
|
|
|
@@ -1170,6 +1170,13 @@ Yes: [plural forms](https://github.com/aymericzip/intlayer/blob/main/docs/docs/e
|
|
|
1170
1170
|
|
|
1171
1171
|
Through the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md), self hosted, which lets anyone edit text in place on the running app, or the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md) for content that must change without a deployment.
|
|
1172
1172
|
|
|
1173
|
+
</Question>
|
|
1174
|
+
<Question title="What is the cost of the visual editor? Is it overkill if I don't need it?">
|
|
1175
|
+
|
|
1176
|
+
The [Intlayer visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) has **zero cost** on your application if it is not set up. The extra logic is only loaded if explicitly enabled and needed.
|
|
1177
|
+
|
|
1178
|
+
If enabled, the cost is extremely light (+5 KB, dynamically loaded only when activated) because the main logic is handled by the server editor on [app.intlayer.org](https://app.intlayer.org) or via the `intlayer-editor` package. If you only need a simple translation setup without visual editing, Intlayer adds no overhead to your app.
|
|
1179
|
+
|
|
1173
1180
|
</Question>
|
|
1174
1181
|
<Question title="Is Intlayer free and open source?">
|
|
1175
1182
|
|
|
@@ -811,6 +811,13 @@ Yes: [plural forms](https://github.com/aymericzip/intlayer/blob/main/docs/docs/e
|
|
|
811
811
|
|
|
812
812
|
Through the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md), which runs on your own infrastructure and lets anyone edit text in place on the running app, or the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md), which externalizes content so it can change without a deployment.
|
|
813
813
|
|
|
814
|
+
</Question>
|
|
815
|
+
<Question title="What is the cost of the visual editor? Is it overkill if I don't need it?">
|
|
816
|
+
|
|
817
|
+
The [Intlayer visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) has **zero cost** on your application if it is not set up. The extra logic is only loaded if explicitly enabled and needed.
|
|
818
|
+
|
|
819
|
+
If enabled, the cost is extremely light (+5 KB, dynamically loaded only when activated) because the main logic is handled by the server editor on [app.intlayer.org](https://app.intlayer.org) or via the `intlayer-editor` package. If you only need a simple translation setup without visual editing, Intlayer adds no overhead to your app.
|
|
820
|
+
|
|
814
821
|
</Question>
|
|
815
822
|
<Question title="Is Intlayer free and open source?">
|
|
816
823
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-21
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
4
|
title: astro-intlayer Package Documentation
|
|
5
|
-
description: Astro integration for Intlayer, providing setup for locale-based routing and dictionary management.
|
|
5
|
+
description: Astro integration for Intlayer, providing setup for locale-based routing, middleware, hooks, client store, and dictionary management.
|
|
6
6
|
keywords:
|
|
7
7
|
- astro-intlayer
|
|
8
8
|
- astro
|
|
9
|
-
-
|
|
9
|
+
- internationalisation
|
|
10
10
|
- i18n
|
|
11
11
|
slugs:
|
|
12
12
|
- doc
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- astro-intlayer
|
|
15
15
|
- exports
|
|
16
16
|
history:
|
|
17
|
+
- version: 9.5.5
|
|
18
|
+
date: 2026-09-19
|
|
19
|
+
changes: "Add useIntlayer, useDictionary, useLocale hooks, middleware, and formatters documentation"
|
|
17
20
|
- version: 8.0.0
|
|
18
21
|
date: 2026-01-21
|
|
19
22
|
changes: "Unified documentation for all exports"
|
|
@@ -22,7 +25,7 @@ author: aymericzip
|
|
|
22
25
|
|
|
23
26
|
# astro-intlayer Package
|
|
24
27
|
|
|
25
|
-
The `astro-intlayer` package provides the necessary tools to integrate Intlayer into Astro applications. It configures locale-based routing and
|
|
28
|
+
The `astro-intlayer` package provides the necessary tools to integrate Intlayer into Astro applications. It configures locale-based routing, dictionary management, build-time page rewriting, request middleware, and hooks for accessing multilingual content across both server-rendered `.astro` components and client-side scripts.
|
|
26
29
|
|
|
27
30
|
## Installation
|
|
28
31
|
|
|
@@ -34,22 +37,171 @@ npm install astro-intlayer
|
|
|
34
37
|
|
|
35
38
|
### Integration
|
|
36
39
|
|
|
37
|
-
The `astro-intlayer` package provides an Astro integration
|
|
40
|
+
The `astro-intlayer` package provides an Astro integration that sets up Intlayer in your project.
|
|
38
41
|
|
|
39
42
|
Import:
|
|
40
43
|
|
|
41
44
|
```tsx
|
|
42
|
-
import "astro-intlayer";
|
|
45
|
+
import { intlayer } from "astro-intlayer";
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
or
|
|
48
|
+
or default import in `astro.config.mjs`:
|
|
46
49
|
|
|
47
50
|
```ts
|
|
51
|
+
import { defineConfig } from "astro/config";
|
|
52
|
+
import intlayer from "astro-intlayer";
|
|
53
|
+
|
|
48
54
|
export default defineConfig({
|
|
49
55
|
integrations: [intlayer()],
|
|
50
56
|
});
|
|
51
57
|
```
|
|
52
58
|
|
|
53
|
-
| Function | Description
|
|
54
|
-
| ---------- |
|
|
55
|
-
| `intlayer` | Astro integration that
|
|
59
|
+
| Function | Description | Related Doc |
|
|
60
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| `intlayer` | Astro integration that prepares dictionaries, configures Vite plugins (aliases, routing proxy, prune), automatically registers request middleware, and emits prerendered pages at localised rewritten URLs. | [intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/intlayer.md) |
|
|
62
|
+
|
|
63
|
+
### Hooks (Server & Client)
|
|
64
|
+
|
|
65
|
+
Import:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { useIntlayer, useDictionary, useLocale } from "astro-intlayer";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
| Hook | Description | Related Doc |
|
|
72
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `useIntlayer` | Picks one dictionary by its key and returns its localised content. In `.astro` frontmatter, it reads the request locale from `Astro.locals`. In client `<script>`, it reads from the client store. | [useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useIntlayer.md) |
|
|
74
|
+
| `useDictionary` | Transforms a dictionary object and returns content for the resolved locale. Works in frontmatter and client scripts. | [useDictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useDictionary.md) |
|
|
75
|
+
| `useLocale` | Returns the current locale, default locale, available locales, and a function to update the locale. | [useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useLocale.md) |
|
|
76
|
+
|
|
77
|
+
### Middleware (astro-intlayer/middleware)
|
|
78
|
+
|
|
79
|
+
Import:
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { onRequest } from "astro-intlayer/middleware";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
| Export | Type | Description | Related Doc |
|
|
86
|
+
| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
87
|
+
| `onRequest` | `MiddlewareHandler` | Astro middleware that detects the request locale and attaches `Astro.locals.intlayer`. Registered automatically by `intlayer()`, or imported manually to compose. | [onRequest](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/onRequest.md) |
|
|
88
|
+
|
|
89
|
+
### Utilities
|
|
90
|
+
|
|
91
|
+
Import:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { getIntlayerLocals } from "astro-intlayer";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Function | Description | Related Doc |
|
|
98
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
99
|
+
| `getIntlayerLocals` | Helper function to retrieve the current `IntlayerLocals` object from the request storage scope outside of Astro.locals. | - |
|
|
100
|
+
|
|
101
|
+
### Client Utilities (astro-intlayer/client)
|
|
102
|
+
|
|
103
|
+
Import:
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import {
|
|
107
|
+
useIntlayer,
|
|
108
|
+
useDictionary,
|
|
109
|
+
useDictionaryDynamic,
|
|
110
|
+
useLocale,
|
|
111
|
+
useLocaleStorage,
|
|
112
|
+
useLocaleCookie,
|
|
113
|
+
getIntlayer,
|
|
114
|
+
getDictionary,
|
|
115
|
+
installIntlayer,
|
|
116
|
+
setLocaleInStorage,
|
|
117
|
+
setLocaleCookie,
|
|
118
|
+
localeInStorage,
|
|
119
|
+
localeCookie,
|
|
120
|
+
} from "astro-intlayer/client";
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
When imported in the browser or inside client `<script>` tags, `astro-intlayer` automatically maps to `astro-intlayer/client` (powered by `vanilla-intlayer`), providing client-side dictionary getters, store subscribers, and locale persistence tools.
|
|
124
|
+
|
|
125
|
+
### Formatters (astro-intlayer/format)
|
|
126
|
+
|
|
127
|
+
Import:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import {
|
|
131
|
+
useIntl,
|
|
132
|
+
useDate,
|
|
133
|
+
useNumber,
|
|
134
|
+
useCurrency,
|
|
135
|
+
usePercentage,
|
|
136
|
+
useRelativeTime,
|
|
137
|
+
useList,
|
|
138
|
+
useUnit,
|
|
139
|
+
useCompact,
|
|
140
|
+
} from "astro-intlayer/format";
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| Hook | Description |
|
|
144
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
145
|
+
| `useIntl` | Returns an Intl instance bound to the request or client locale with caching and subscription capabilities. |
|
|
146
|
+
| `useDate` | Returns a date formatting function pre-bound to the current locale (`Intl.DateTimeFormat`). |
|
|
147
|
+
| `useNumber` | Returns a number formatting function pre-bound to the current locale (`Intl.NumberFormat`). |
|
|
148
|
+
| `useCurrency` | Returns a currency formatting function pre-bound to the current locale. |
|
|
149
|
+
| `usePercentage` | Returns a percentage formatting function pre-bound to the current locale. |
|
|
150
|
+
| `useRelativeTime` | Returns a relative time formatting function pre-bound to the current locale (`Intl.RelativeTimeFormat`). |
|
|
151
|
+
| `useList` | Returns a list formatting function pre-bound to the current locale (`Intl.ListFormat`). |
|
|
152
|
+
| `useUnit` | Returns a unit formatting function pre-bound to the current locale. |
|
|
153
|
+
| `useCompact` | Returns a compact number formatting function pre-bound to the current locale (e.g. `1.5K`). |
|
|
154
|
+
|
|
155
|
+
### HTML Utilities (astro-intlayer/html)
|
|
156
|
+
|
|
157
|
+
Import:
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { renderHTML, useHTML, useHTMLRenderer } from "astro-intlayer/html";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
| Export | Type | Description |
|
|
164
|
+
| ----------------- | ---------- | -------------------------------------------------------- |
|
|
165
|
+
| `renderHTML` | `Function` | Standalone utility function to render HTML nodes. |
|
|
166
|
+
| `useHTML` | `Hook` | Hook to get the HTML provider context and configuration. |
|
|
167
|
+
| `useHTMLRenderer` | `Hook` | Hook to obtain a pre-configured HTML renderer function. |
|
|
168
|
+
|
|
169
|
+
### Markdown Utilities (astro-intlayer/markdown)
|
|
170
|
+
|
|
171
|
+
Import:
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import {
|
|
175
|
+
compileMarkdown,
|
|
176
|
+
renderMarkdown,
|
|
177
|
+
parseMarkdown,
|
|
178
|
+
useMarkdown,
|
|
179
|
+
useMarkdownRenderer,
|
|
180
|
+
} from "astro-intlayer/markdown";
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
| Export | Type | Description |
|
|
184
|
+
| --------------------- | ---------- | ----------------------------------------------------------- |
|
|
185
|
+
| `compileMarkdown` | `Function` | Compiles markdown strings into structured representation. |
|
|
186
|
+
| `renderMarkdown` | `Function` | Renders markdown content into output nodes. |
|
|
187
|
+
| `parseMarkdown` | `Function` | Parses raw markdown content into an AST. |
|
|
188
|
+
| `useMarkdown` | `Hook` | Hook to get the markdown provider context. |
|
|
189
|
+
| `useMarkdownRenderer` | `Hook` | Hook to obtain a pre-configured Markdown renderer function. |
|
|
190
|
+
|
|
191
|
+
### Types
|
|
192
|
+
|
|
193
|
+
Import:
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import type {
|
|
197
|
+
IntlayerLocals,
|
|
198
|
+
UseLocaleProps,
|
|
199
|
+
UseLocaleResult,
|
|
200
|
+
} from "astro-intlayer";
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Type | Description |
|
|
204
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
205
|
+
| `IntlayerLocals` | The object attached to `Astro.locals.intlayer` containing `locale`, `defaultLocale`, and `availableLocales`. |
|
|
206
|
+
| `UseLocaleProps` | Optional configuration properties accepted by `useLocale()`. |
|
|
207
|
+
| `UseLocaleResult` | The return type of `useLocale()`, providing locale properties and update methods. |
|