@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
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-21
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: intlayer Integration Documentation | astro-intlayer
|
|
5
|
+
description: See how to configure and use the intlayer Astro integration in astro.config.mjs.
|
|
6
|
+
keywords:
|
|
7
|
+
- intlayer
|
|
8
|
+
- astro
|
|
9
|
+
- astro-intlayer
|
|
10
|
+
- integration
|
|
11
|
+
- i18n
|
|
12
|
+
- Internationalisation
|
|
13
|
+
- Documentation
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- packages
|
|
17
|
+
- astro-intlayer
|
|
18
|
+
- intlayer
|
|
19
|
+
history:
|
|
20
|
+
- version: 9.5.5
|
|
21
|
+
date: 2026-09-19
|
|
22
|
+
changes: "Update integration documentation with middleware and hooks details"
|
|
23
|
+
- version: 8.0.0
|
|
24
|
+
date: 2026-01-21
|
|
25
|
+
changes: "Init doc"
|
|
26
|
+
author: aymericzip
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# intlayer Astro Integration Documentation
|
|
30
|
+
|
|
31
|
+
The `intlayer` integration for Astro configures your project for multilingual internationalisation (i18n). It handles build-time dictionary preparation, Vite plugin injection, automatic request middleware registration, and emitting localised prerendered pages.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Add `intlayer()` to your `astro.config.mjs`:
|
|
36
|
+
|
|
37
|
+
```ts fileName="astro.config.mjs"
|
|
38
|
+
import { defineConfig } from "astro/config";
|
|
39
|
+
import { intlayer } from "astro-intlayer";
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
integrations: [intlayer()],
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Astro CLI's codemod (`astro add astro-intlayer`) also generates a default import which is supported:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import intlayer from "astro-intlayer";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Description
|
|
53
|
+
|
|
54
|
+
The integration hooks into Astro's build and runtime lifecycle:
|
|
55
|
+
|
|
56
|
+
1. **Config Setup (`astro:config:setup`)**:
|
|
57
|
+
- **Dictionary Preparation**: Prepares Intlayer dictionaries and generated types before the build runs.
|
|
58
|
+
- **Vite Plugins**: Injects plugins for Vite aliases (enabling seamless dictionary imports), locale routing proxies, and build pruning.
|
|
59
|
+
- **Middleware Registration**: Automatically injects `astro-intlayer/middleware` into your project's middleware chain, populating `Astro.locals.intlayer` on every incoming request.
|
|
60
|
+
2. **Build Done (`astro:build:done`)**:
|
|
61
|
+
- **Page Rewrites**: Inspects localised URL rewrite rules and emits prerendered HTML pages at their corresponding localised paths.
|
|
62
|
+
|
|
63
|
+
## What is Provided Out of the Box
|
|
64
|
+
|
|
65
|
+
Once configured, your Astro application can immediately use:
|
|
66
|
+
|
|
67
|
+
- The `useIntlayer`, `useDictionary`, and `useLocale` hooks inside `.astro` component frontmatter.
|
|
68
|
+
- The `Astro.locals.intlayer` object in Astro endpoints and pages.
|
|
69
|
+
- Client-side imports in `<script>` blocks that mirror the same API with reactive updates.
|
|
70
|
+
- Built-in formatters under `astro-intlayer/format` (`useDate`, `useNumber`, `useCurrency`, etc.).
|
|
71
|
+
|
|
72
|
+
## Related Documentation
|
|
73
|
+
|
|
74
|
+
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useIntlayer.md)
|
|
75
|
+
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useLocale.md)
|
|
76
|
+
- [`onRequest` Middleware](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/onRequest.md)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: onRequest Middleware Documentation | astro-intlayer
|
|
5
|
+
description: See how to use the onRequest middleware in Astro applications to resolve the request locale and populate Astro.locals.intlayer.
|
|
6
|
+
keywords:
|
|
7
|
+
- onRequest
|
|
8
|
+
- middleware
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Astro.locals
|
|
12
|
+
- Internationalisation
|
|
13
|
+
- Documentation
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- packages
|
|
17
|
+
- astro-intlayer
|
|
18
|
+
- onRequest
|
|
19
|
+
history:
|
|
20
|
+
- version: 9.5.5
|
|
21
|
+
date: 2026-09-19
|
|
22
|
+
changes: "Init doc"
|
|
23
|
+
author: aymericzip
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# onRequest Astro Middleware Documentation
|
|
27
|
+
|
|
28
|
+
The `onRequest` middleware from `astro-intlayer/middleware` resolves the locale of each incoming HTTP request and populates `Astro.locals.intlayer`.
|
|
29
|
+
|
|
30
|
+
When you register the `intlayer()` integration in `astro.config.mjs`, this middleware is injected automatically. You only need to import it directly if you are manually composing Astro middleware using `sequence(...)`.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```ts fileName="src/middleware.ts"
|
|
35
|
+
import { onRequest as intlayer } from "astro-intlayer/middleware";
|
|
36
|
+
import { sequence } from "astro:middleware";
|
|
37
|
+
|
|
38
|
+
export const onRequest = sequence(intlayer, async (context, next) => {
|
|
39
|
+
// Access the resolved locale in your custom middleware
|
|
40
|
+
const { locale } = context.locals.intlayer;
|
|
41
|
+
console.log(`Handling request for locale: ${locale}`);
|
|
42
|
+
|
|
43
|
+
return next();
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Description
|
|
48
|
+
|
|
49
|
+
The middleware performs the following:
|
|
50
|
+
|
|
51
|
+
1. **Locale Detection**:
|
|
52
|
+
- **URL**: Analyses the URL path prefix or `?locale=` search parameter (unless `routing.mode` is set to `no-prefix`).
|
|
53
|
+
- **Cookies / Headers**: Checks persisted locale cookies or custom header values.
|
|
54
|
+
- **Accept-Language**: Falls back to the browser's preferred language negotiation.
|
|
55
|
+
- For prerendered pages (`context.isPrerendered`), the locale is extracted strictly from the URL to prevent Astro build warnings.
|
|
56
|
+
2. **Context Population**: Populates `Astro.locals.intlayer` with:
|
|
57
|
+
- `locale`: The resolved locale.
|
|
58
|
+
- `defaultLocale`: The default fallback locale.
|
|
59
|
+
- `availableLocales`: The array of configured locales.
|
|
60
|
+
3. **AsyncLocalStorage Scope**: Wraps the downstream request processing inside an `AsyncLocalStorage` scope, allowing `useIntlayer()`, `useDictionary()`, and `useLocale()` to access request state without passing arguments.
|
|
61
|
+
|
|
62
|
+
## `IntlayerLocals` Type
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export type IntlayerLocals = {
|
|
66
|
+
locale: DeclaredLocales;
|
|
67
|
+
defaultLocale: DeclaredLocales;
|
|
68
|
+
availableLocales: DeclaredLocales[];
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Related Documentation
|
|
73
|
+
|
|
74
|
+
- [`intlayer` Integration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/intlayer.md)
|
|
75
|
+
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useIntlayer.md)
|
|
76
|
+
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: useDictionary Hook Documentation | astro-intlayer
|
|
5
|
+
description: See how to use the useDictionary hook in Astro components and scripts to resolve dictionary objects.
|
|
6
|
+
keywords:
|
|
7
|
+
- useDictionary
|
|
8
|
+
- dictionary
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internationalisation
|
|
14
|
+
- Documentation
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- astro-intlayer
|
|
19
|
+
- useDictionary
|
|
20
|
+
history:
|
|
21
|
+
- version: 9.5.5
|
|
22
|
+
date: 2026-09-19
|
|
23
|
+
changes: "Init doc"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# useDictionary Hook Documentation
|
|
28
|
+
|
|
29
|
+
The `useDictionary` hook resolves an imported or inline dictionary object and returns its content for the current locale in Astro applications.
|
|
30
|
+
|
|
31
|
+
Unlike `useIntlayer`, which retrieves dictionaries by key from the global dictionary registry, `useDictionary` works directly with a dictionary object.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```astro fileName="src/pages/index.astro"
|
|
36
|
+
---
|
|
37
|
+
import { useDictionary } from "astro-intlayer";
|
|
38
|
+
import homeContent from "../content/home.content";
|
|
39
|
+
|
|
40
|
+
const content = useDictionary(homeContent);
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<main>
|
|
44
|
+
<h1>{content.title}</h1>
|
|
45
|
+
<p>{content.description}</p>
|
|
46
|
+
</main>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can also pass inline dictionaries defined with `t()`:
|
|
50
|
+
|
|
51
|
+
```astro fileName="src/components/Footer.astro"
|
|
52
|
+
---
|
|
53
|
+
import { useDictionary } from "astro-intlayer";
|
|
54
|
+
import { t } from "intlayer";
|
|
55
|
+
|
|
56
|
+
const footer = useDictionary({
|
|
57
|
+
key: "footer",
|
|
58
|
+
content: {
|
|
59
|
+
copyright: t({
|
|
60
|
+
"en-GB": "All rights reserved.",
|
|
61
|
+
en: "All rights reserved.",
|
|
62
|
+
fr: "Tous droits réservés.",
|
|
63
|
+
es: "Todos los derechos reservados.",
|
|
64
|
+
}),
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
<footer>
|
|
70
|
+
<p>{footer.copyright}</p>
|
|
71
|
+
</footer>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Parameters
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
useDictionary(dictionary, localeOrSelector?)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
1. **`dictionary`**: A dictionary object or qualified dictionary group.
|
|
81
|
+
2. **`localeOrSelector`** (optional): A specific locale or selector object (`{ item }`, `{ variant }`, optionally with `locale`).
|
|
82
|
+
|
|
83
|
+
## Description
|
|
84
|
+
|
|
85
|
+
The hook performs the following tasks:
|
|
86
|
+
|
|
87
|
+
1. **Locale Detection**: On the server, it obtains the locale from `Astro.locals.intlayer`. In the browser, it uses the client-side store locale.
|
|
88
|
+
2. **Content Processing**: Resolves translations (`t()`), enumerations, conditions, and nested structures according to the resolved locale.
|
|
89
|
+
3. **Selectors**: Applies any item or variant selectors provided in the arguments.
|
|
90
|
+
|
|
91
|
+
## Related Documentation
|
|
92
|
+
|
|
93
|
+
- [`intlayer` Integration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/intlayer.md)
|
|
94
|
+
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useIntlayer.md)
|
|
95
|
+
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: useIntlayer Hook Documentation | astro-intlayer
|
|
5
|
+
description: See how to use the useIntlayer hook in Astro components and client scripts to access localised content.
|
|
6
|
+
keywords:
|
|
7
|
+
- useIntlayer
|
|
8
|
+
- dictionary
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internationalisation
|
|
14
|
+
- Documentation
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- astro-intlayer
|
|
19
|
+
- useIntlayer
|
|
20
|
+
history:
|
|
21
|
+
- version: 9.5.5
|
|
22
|
+
date: 2026-09-19
|
|
23
|
+
changes: "Init doc"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# useIntlayer Hook Documentation
|
|
28
|
+
|
|
29
|
+
The `useIntlayer` hook allows you to retrieve localised dictionary content by key in Astro applications.
|
|
30
|
+
|
|
31
|
+
It can be called in two distinct contexts using the same import path:
|
|
32
|
+
|
|
33
|
+
1. **Server / Frontmatter**: Inside `.astro` files, it automatically resolves content using the request locale stored in `Astro.locals.intlayer`.
|
|
34
|
+
2. **Browser / Client `<script>`**: Inside client scripts or UI framework components, it resolves to the client-side store implementation (`vanilla-intlayer`).
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
### In Astro Component Frontmatter
|
|
39
|
+
|
|
40
|
+
```astro fileName="src/pages/index.astro"
|
|
41
|
+
---
|
|
42
|
+
import { useIntlayer } from "astro-intlayer";
|
|
43
|
+
|
|
44
|
+
const content = useIntlayer("home");
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
<main>
|
|
48
|
+
<h1>{content.title}</h1>
|
|
49
|
+
<p>{content.description}</p>
|
|
50
|
+
</main>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### In Client `<script>` Blocks
|
|
54
|
+
|
|
55
|
+
```astro fileName="src/components/InteractiveWidget.astro"
|
|
56
|
+
---
|
|
57
|
+
import { useIntlayer } from "astro-intlayer";
|
|
58
|
+
|
|
59
|
+
const content = useIntlayer("home");
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
<button id="alert-btn">{content.buttonText}</button>
|
|
63
|
+
|
|
64
|
+
<script>
|
|
65
|
+
import { useIntlayer } from "astro-intlayer";
|
|
66
|
+
|
|
67
|
+
const content = useIntlayer("home");
|
|
68
|
+
|
|
69
|
+
document.getElementById("alert-btn")?.addEventListener("click", () => {
|
|
70
|
+
alert(content.buttonText);
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Parameters
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
useIntlayer(key, localeOrSelector?)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
1. **`key`**: The unique key of the dictionary (as defined in your `.content.ts` declaration files).
|
|
82
|
+
2. **`localeOrSelector`** (optional): A specific locale or selector object (`{ item }`, `{ variant }`, optionally with `locale`). When provided, it overrides the locale detected from the request context or client store.
|
|
83
|
+
|
|
84
|
+
## Description
|
|
85
|
+
|
|
86
|
+
The hook performs the following tasks:
|
|
87
|
+
|
|
88
|
+
1. **Locale Resolution**:
|
|
89
|
+
- On the server, reads the active locale from `Astro.locals.intlayer` via an `AsyncLocalStorage` scope initialised by the `astro-intlayer/middleware`.
|
|
90
|
+
- In the browser, reads the active locale from the client storage/store.
|
|
91
|
+
2. **Dictionary Retrieval**: Injects the dictionary content matching the specified key.
|
|
92
|
+
3. **Translation Processing**: Resolves translations (`t()`), enumerations, conditions, and markdown into ready-to-render content.
|
|
93
|
+
|
|
94
|
+
## Related Documentation
|
|
95
|
+
|
|
96
|
+
- [`intlayer` Integration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/intlayer.md)
|
|
97
|
+
- [`useDictionary` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useDictionary.md)
|
|
98
|
+
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: useLocale Hook Documentation | astro-intlayer
|
|
5
|
+
description: See how to use the useLocale hook in Astro applications to access and manage the current locale.
|
|
6
|
+
keywords:
|
|
7
|
+
- useLocale
|
|
8
|
+
- locale
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internationalisation
|
|
14
|
+
- Documentation
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- astro-intlayer
|
|
19
|
+
- useLocale
|
|
20
|
+
history:
|
|
21
|
+
- version: 9.5.5
|
|
22
|
+
date: 2026-09-19
|
|
23
|
+
changes: "Init doc"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# useLocale Hook Documentation
|
|
28
|
+
|
|
29
|
+
The `useLocale` hook from `astro-intlayer` provides access to the current request locale, the configured default locale, and all available locales in Astro applications.
|
|
30
|
+
|
|
31
|
+
It behaves consistently across server-rendered `.astro` frontmatter and client-side `<script>` blocks.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
### In Component Frontmatter (Server-Rendered)
|
|
36
|
+
|
|
37
|
+
```astro fileName="src/layouts/Layout.astro"
|
|
38
|
+
---
|
|
39
|
+
import { useLocale } from "astro-intlayer";
|
|
40
|
+
import { getLocalizedUrl, getPathWithoutLocale } from "intlayer";
|
|
41
|
+
|
|
42
|
+
const { locale, defaultLocale, availableLocales } = useLocale();
|
|
43
|
+
const pathWithoutLocale = getPathWithoutLocale(Astro.url.pathname);
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
<!DOCTYPE html>
|
|
47
|
+
<html lang={locale}>
|
|
48
|
+
<head>
|
|
49
|
+
<meta charset="utf-8" />
|
|
50
|
+
<title>Astro + Intlayer</title>
|
|
51
|
+
</head>
|
|
52
|
+
<body>
|
|
53
|
+
<header>
|
|
54
|
+
<span>Current: {locale}</span>
|
|
55
|
+
<span>Default: {defaultLocale}</span>
|
|
56
|
+
<nav>
|
|
57
|
+
<ul>
|
|
58
|
+
{availableLocales.map((localeItem) => (
|
|
59
|
+
<li key={localeItem} className="p-1">
|
|
60
|
+
<a
|
|
61
|
+
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
62
|
+
aria-current={localeItem === locale ? "page" : undefined}
|
|
63
|
+
>
|
|
64
|
+
{localeItem.toUpperCase()}
|
|
65
|
+
</a>
|
|
66
|
+
</li>
|
|
67
|
+
))}
|
|
68
|
+
</ul>
|
|
69
|
+
</nav>
|
|
70
|
+
</header>
|
|
71
|
+
<slot />
|
|
72
|
+
</body>
|
|
73
|
+
</html>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### In Client `<script>` (Interactive)
|
|
77
|
+
|
|
78
|
+
```astro fileName="src/components/LocaleSwitcher.astro"
|
|
79
|
+
---
|
|
80
|
+
import { useLocale } from "astro-intlayer";
|
|
81
|
+
|
|
82
|
+
const { locale, availableLocales } = useLocale();
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
<select id="locale-select">
|
|
86
|
+
{availableLocales.map((loc) => (
|
|
87
|
+
<option value={loc} selected={loc === locale}>
|
|
88
|
+
{loc.toUpperCase()}
|
|
89
|
+
</option>
|
|
90
|
+
))}
|
|
91
|
+
</select>
|
|
92
|
+
|
|
93
|
+
<script>
|
|
94
|
+
import { useLocale, setLocaleInStorage } from "astro-intlayer";
|
|
95
|
+
|
|
96
|
+
const { setLocale } = useLocale();
|
|
97
|
+
|
|
98
|
+
document.getElementById("locale-select")?.addEventListener("change", (e) => {
|
|
99
|
+
const target = e.target as HTMLSelectElement;
|
|
100
|
+
setLocale(target.value);
|
|
101
|
+
});
|
|
102
|
+
</script>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Return Values
|
|
106
|
+
|
|
107
|
+
The hook returns an object of type `UseLocaleResult`:
|
|
108
|
+
|
|
109
|
+
| Property | Type | Description |
|
|
110
|
+
| ------------------ | -------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
111
|
+
| `locale` | `DeclaredLocales` | The active locale. |
|
|
112
|
+
| `defaultLocale` | `DeclaredLocales` | The default fallback locale configured in `intlayer.config.ts`. |
|
|
113
|
+
| `availableLocales` | `DeclaredLocales[]` | Array of all supported locales configured for the project. |
|
|
114
|
+
| `setLocale` | `(locale: LocalesValues) => void` | Function to update the locale. (Interactive in client `<script>`, warns during SSR). |
|
|
115
|
+
| `subscribe` | `(callback: () => void) => () => void` | Subscribes to client-side locale changes. |
|
|
116
|
+
|
|
117
|
+
## Server vs Client Behaviour
|
|
118
|
+
|
|
119
|
+
- **During SSR / Server Rendering**: A request is rendered once with fixed parameters. Calling `setLocale()` during a server render has no effect and emits a warning; locale switching should be performed on the client or by navigating to the target locale URL.
|
|
120
|
+
- **In Client Scripts**: `setLocale` updates the client store and updates persisted cookies or local storage according to your Intlayer configuration.
|
|
121
|
+
|
|
122
|
+
## Related Documentation
|
|
123
|
+
|
|
124
|
+
- [`intlayer` Integration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/intlayer.md)
|
|
125
|
+
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useIntlayer.md)
|
|
126
|
+
- [`useDictionary` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/astro-intlayer/useDictionary.md)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Intlayer Context Documentation | remix-intlayer
|
|
5
|
+
description: See how to use the Intlayer request context key and property in Remix 3 applications.
|
|
6
|
+
keywords:
|
|
7
|
+
- Intlayer
|
|
8
|
+
- remix
|
|
9
|
+
- remix-3
|
|
10
|
+
- context
|
|
11
|
+
- RequestContext
|
|
12
|
+
- Internationalisation
|
|
13
|
+
- Documentation
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- packages
|
|
17
|
+
- remix-intlayer
|
|
18
|
+
- Intlayer
|
|
19
|
+
history:
|
|
20
|
+
- version: 9.5.5
|
|
21
|
+
date: 2026-09-19
|
|
22
|
+
changes: "Init doc"
|
|
23
|
+
author: aymericzip
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Intlayer Context Documentation
|
|
27
|
+
|
|
28
|
+
In `remix-intlayer`, `Intlayer` is the `RequestContext` key used to access internationalisation state within Remix 3 request handlers.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
When the `intlayer()` middleware runs, it stores an `IntlayerState` object in the request context under the `Intlayer` key. You can retrieve it inside any route handler:
|
|
33
|
+
|
|
34
|
+
```ts fileName="src/server.ts"
|
|
35
|
+
import { createRouter } from "remix/router";
|
|
36
|
+
import { intlayer, Intlayer } from "remix-intlayer";
|
|
37
|
+
|
|
38
|
+
const router = createRouter({
|
|
39
|
+
middleware: [intlayer()],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
router.get("/api/profile", (context) => {
|
|
43
|
+
// Access via context.get(Intlayer)
|
|
44
|
+
const { locale, defaultLocale, availableLocales } = context.get(Intlayer);
|
|
45
|
+
|
|
46
|
+
return Response.json({
|
|
47
|
+
locale,
|
|
48
|
+
defaultLocale,
|
|
49
|
+
availableLocales,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You can also access it using the direct property shorthand `context.intlayer`:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
router.get("/api/status", (context) => {
|
|
58
|
+
const currentLocale = context.intlayer.locale;
|
|
59
|
+
return Response.json({ status: "ok", locale: currentLocale });
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## `IntlayerState` Structure
|
|
64
|
+
|
|
65
|
+
The `IntlayerState` object contains:
|
|
66
|
+
|
|
67
|
+
| Property | Type | Description |
|
|
68
|
+
| ------------------ | ------------------- | ------------------------------------------------------------- |
|
|
69
|
+
| `locale` | `DeclaredLocales` | The locale resolved for the current request. |
|
|
70
|
+
| `defaultLocale` | `DeclaredLocales` | The fallback locale defined in `intlayer.config.ts`. |
|
|
71
|
+
| `availableLocales` | `DeclaredLocales[]` | The list of all supported locales configured for the project. |
|
|
72
|
+
|
|
73
|
+
## Related Documentation
|
|
74
|
+
|
|
75
|
+
- [`intlayer` Middleware](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/remix-intlayer/intlayerMiddleware.md)
|
|
76
|
+
- [`useLocale` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/remix-intlayer/useLocale.md)
|
|
77
|
+
- [`useIntlayer` Hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/packages/remix-intlayer/useIntlayer.md)
|