@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,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Documentación del paquete remix-intlayer
|
|
5
|
+
description: Integración de Remix 3 para Intlayer, proporcionando middleware, contexto, hooks y formateadores para el enrutamiento por locale y la gestión de contenido.
|
|
6
|
+
keywords:
|
|
7
|
+
- remix-intlayer
|
|
8
|
+
- remix
|
|
9
|
+
- remix-3
|
|
10
|
+
- internacionalización
|
|
11
|
+
- i18n
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- packages
|
|
15
|
+
- remix-intlayer
|
|
16
|
+
- exports
|
|
17
|
+
history:
|
|
18
|
+
- version: 9.5.5
|
|
19
|
+
date: 2026-09-19
|
|
20
|
+
changes: "Documentación unificada para todas las exportaciones"
|
|
21
|
+
author: aymericzip
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Paquete remix-intlayer
|
|
25
|
+
|
|
26
|
+
El paquete `remix-intlayer` proporciona las herramientas necesarias para integrar Intlayer en aplicaciones Remix 3. Basado completamente en estándares web (`Request`, `Response`, `Headers` y `URL`), ofrece un middleware de enrutador para el enrutamiento por locale y reescrituras internas, almacenamiento de contexto, hooks y utilidades de formato para la gestión de contenido multilingüe.
|
|
27
|
+
|
|
28
|
+
## Instalación
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install remix-intlayer
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Exportaciones
|
|
35
|
+
|
|
36
|
+
### Middleware
|
|
37
|
+
|
|
38
|
+
Importación:
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { intlayer } from "remix-intlayer";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
| Función | Descripción | Doc relacionada |
|
|
45
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
46
|
+
| `intlayer` | Middleware de enrutador Remix 3 que gestiona el enrutamiento basado en locale (redirecciones y reescrituras internas), resuelve la locale de la solicitud, la persiste en cookies/encabezados y establece el alcance del contexto de la solicitud. | [intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/intlayerMiddleware.md) |
|
|
47
|
+
|
|
48
|
+
### Contexto
|
|
49
|
+
|
|
50
|
+
Importación:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { Intlayer, INTLAYER_CONTEXT_PROPERTY } from "remix-intlayer";
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
| Exportación | Tipo | Descripción | Doc relacionada |
|
|
57
|
+
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `Intlayer` | `ContextKey` | Clave de RequestContext que contiene el `IntlayerState` (`locale`, `defaultLocale`, `availableLocales`) para la solicitud actual. | [Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/Intlayer.md) |
|
|
59
|
+
| `INTLAYER_CONTEXT_PROPERTY` | `string` | Nombre de propiedad (`'intlayer'`) instalado directamente en el contexto de la solicitud, accesible mediante `context.intlayer` y `context.get(Intlayer)`. | - |
|
|
60
|
+
|
|
61
|
+
### Hooks
|
|
62
|
+
|
|
63
|
+
Importación:
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { useIntlayer, useDictionary, useLocale } from "remix-intlayer";
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Hook | Descripción | Doc relacionada |
|
|
70
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| `useIntlayer` | Selecciona un diccionario por su clave y devuelve su contenido para la locale de la solicitud actual. Lee automáticamente del contexto de la solicitud. | [useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useIntlayer.md) |
|
|
72
|
+
| `useDictionary` | Transforma un objeto de diccionario importado y devuelve su contenido para la locale de la solicitud actual. Admite selectores. | [useDictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useDictionary.md) |
|
|
73
|
+
| `useLocale` | Devuelve la locale resuelta de la solicitud actual, junto con `defaultLocale` y `availableLocales` configuradas. | [useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useLocale.md) |
|
|
74
|
+
|
|
75
|
+
### Utilidades
|
|
76
|
+
|
|
77
|
+
Importación:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import { createLocaleRouting, getIntlayerState } from "remix-intlayer";
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Función | Descripción | Doc relacionada |
|
|
84
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
85
|
+
| `createLocaleRouting` | Función pura que determina las acciones de enrutamiento (`redirect`, `rewrite` o `pass`) según la solicitud, la configuración y las opciones. | - |
|
|
86
|
+
| `getIntlayerState` | Lee el `IntlayerState` actual (`locale`, `defaultLocale`, `availableLocales`) desde el almacenamiento de solicitudes `AsyncLocalStorage`. | - |
|
|
87
|
+
|
|
88
|
+
### Formateadores (remix-intlayer/format)
|
|
89
|
+
|
|
90
|
+
Importación:
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import {
|
|
94
|
+
useIntl,
|
|
95
|
+
useDate,
|
|
96
|
+
useNumber,
|
|
97
|
+
useCurrency,
|
|
98
|
+
usePercentage,
|
|
99
|
+
useRelativeTime,
|
|
100
|
+
useList,
|
|
101
|
+
useUnit,
|
|
102
|
+
useCompact,
|
|
103
|
+
} from "remix-intlayer/format";
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Hook | Descripción |
|
|
107
|
+
| ----------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| `useIntl` | Devuelve una instancia Intl vinculada a la locale de la solicitud con almacenamiento en caché y suscripciones. |
|
|
109
|
+
| `useDate` | Devuelve una función de formato de fecha vinculada a la locale de la solicitud (`Intl.DateTimeFormat`). |
|
|
110
|
+
| `useNumber` | Devuelve una función de formato de número vinculada a la locale de la solicitud (`Intl.NumberFormat`). |
|
|
111
|
+
| `useCurrency` | Devuelve una función de formato de moneda vinculada a la locale de la solicitud. |
|
|
112
|
+
| `usePercentage` | Devuelve una función de formato de porcentaje vinculada a la locale de la solicitud. |
|
|
113
|
+
| `useRelativeTime` | Devuelve una función de formato de tiempo relativo vinculada a la locale de la solicitud (`Intl.RelativeTimeFormat`). |
|
|
114
|
+
| `useList` | Devuelve una función de formato de lista vinculada a la locale de la solicitud (`Intl.ListFormat`). |
|
|
115
|
+
| `useUnit` | Devuelve una función de formato de unidad vinculada a la locale de la solicitud. |
|
|
116
|
+
| `useCompact` | Devuelve una función de formato compacto de número vinculada a la locale de la solicitud (ej. `1.5K`). |
|
|
117
|
+
|
|
118
|
+
### Utilidades HTML (remix-intlayer/html)
|
|
119
|
+
|
|
120
|
+
Importación:
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import { renderHTML, useHTML, useHTMLRenderer } from "remix-intlayer/html";
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
| Exportación | Tipo | Descripción |
|
|
127
|
+
| ----------------- | ---------- | ------------------------------------------------------------------------------- |
|
|
128
|
+
| `renderHTML` | `Function` | Función de utilidad para renderizar nodos HTML fuera de la interfaz de usuario. |
|
|
129
|
+
| `useHTML` | `Hook` | Hook para obtener el contexto y configuración del proveedor HTML. |
|
|
130
|
+
| `useHTMLRenderer` | `Hook` | Hook para obtener una función de renderizado HTML preconfigurada. |
|
|
131
|
+
|
|
132
|
+
### Utilidades Markdown (remix-intlayer/markdown)
|
|
133
|
+
|
|
134
|
+
Importación:
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import {
|
|
138
|
+
compileMarkdown,
|
|
139
|
+
renderMarkdown,
|
|
140
|
+
parseMarkdown,
|
|
141
|
+
useMarkdown,
|
|
142
|
+
useMarkdownRenderer,
|
|
143
|
+
} from "remix-intlayer/markdown";
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Exportación | Tipo | Descripción |
|
|
147
|
+
| --------------------- | ---------- | --------------------------------------------------------------------- |
|
|
148
|
+
| `compileMarkdown` | `Function` | Compila cadenas markdown en una representación estructurada. |
|
|
149
|
+
| `renderMarkdown` | `Function` | Renderiza contenido markdown en nodos de salida. |
|
|
150
|
+
| `parseMarkdown` | `Function` | Analiza contenido markdown sin procesar en un AST. |
|
|
151
|
+
| `useMarkdown` | `Hook` | Hook para acceder al contexto del proveedor markdown. |
|
|
152
|
+
| `useMarkdownRenderer` | `Hook` | Hook para obtener una función de renderizado Markdown preconfigurada. |
|
|
153
|
+
|
|
154
|
+
### Tipos
|
|
155
|
+
|
|
156
|
+
Importación:
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
import type {
|
|
160
|
+
IntlayerState,
|
|
161
|
+
IntlayerMiddlewareOptions,
|
|
162
|
+
LocaleRoutingOptions,
|
|
163
|
+
LocaleRoutingAction,
|
|
164
|
+
LocaleRoutingRequest,
|
|
165
|
+
UseLocaleResult,
|
|
166
|
+
} from "remix-intlayer";
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
| Tipo | Descripción |
|
|
170
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
171
|
+
| `IntlayerState` | Objeto de estado que contiene `locale`, `defaultLocale` y `availableLocales` almacenado en el contexto Remix. |
|
|
172
|
+
| `IntlayerMiddlewareOptions` | Opciones de configuración pasadas al middleware `intlayer()`. |
|
|
173
|
+
| `LocaleRoutingOptions` | Opciones que personalizan los prefijos de locale, la detección y las redirecciones. |
|
|
174
|
+
| `LocaleRoutingAction` | Unión discriminada que representa la decisión de enrutamiento: `redirect`, `rewrite` o `pass`. |
|
|
175
|
+
| `LocaleRoutingRequest` | Representación mínima de solicitud requerida por `createLocaleRouting`. |
|
|
176
|
+
| `UseLocaleResult` | Tipo de retorno de `useLocale()`, que contiene `locale`, `defaultLocale` y `availableLocales`. |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Documentación del middleware intlayer | remix-intlayer
|
|
5
|
+
description: Vea cómo utilizar el middleware intlayer en aplicaciones Remix 3 para el enrutamiento por locale y la gestión del contexto de solicitud.
|
|
6
|
+
keywords:
|
|
7
|
+
- intlayer
|
|
8
|
+
- intlayerMiddleware
|
|
9
|
+
- remix
|
|
10
|
+
- remix-3
|
|
11
|
+
- middleware
|
|
12
|
+
- enrutamiento
|
|
13
|
+
- Internacionalización
|
|
14
|
+
- Documentación
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- remix-intlayer
|
|
19
|
+
- intlayerMiddleware
|
|
20
|
+
history:
|
|
21
|
+
- version: 9.5.5
|
|
22
|
+
date: 2026-09-19
|
|
23
|
+
changes: "Init doc"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Documentación del middleware de Remix 3 intlayer
|
|
28
|
+
|
|
29
|
+
El middleware `intlayer` para Remix 3 administra la capa de internacionalización en toda tu aplicación. Construido sobre estándares web (`Request` y `Response`), maneja el enrutamiento por locale (redirecciones y reescrituras internas), detecta la locale de la solicitud, la persiste en cookies y encabezados, y establece un alcance `AsyncLocalStorage` para que los controladores y componentes puedan acceder a las traducciones sin transferir props manualmente.
|
|
30
|
+
|
|
31
|
+
## Uso
|
|
32
|
+
|
|
33
|
+
Registra el middleware `intlayer` al inicializar tu enrutador Remix 3:
|
|
34
|
+
|
|
35
|
+
```ts fileName="src/server.ts"
|
|
36
|
+
import { createRouter } from "remix/router";
|
|
37
|
+
import { intlayer, useIntlayer, useLocale } from "remix-intlayer";
|
|
38
|
+
|
|
39
|
+
const router = createRouter({
|
|
40
|
+
middleware: [intlayer()],
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Sirve `/`, `/fr`, `/es`, la locale se resuelve a partir de la solicitud
|
|
44
|
+
router.get("/", () => {
|
|
45
|
+
const { title } = useIntlayer("home");
|
|
46
|
+
return new Response(title);
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Descripción
|
|
51
|
+
|
|
52
|
+
El middleware `intlayer` realiza las siguientes tareas:
|
|
53
|
+
|
|
54
|
+
1. **Preparación de diccionarios**: Ejecuta `prepareIntlayer` al iniciar para garantizar que todos los diccionarios generados estén construidos y disponibles.
|
|
55
|
+
2. **Enrutamiento por locale**: Evalúa la solicitud frente a la estrategia de enrutamiento configurada (`prefix_always`, `prefix_as_needed`, `no_prefix`):
|
|
56
|
+
- **Redirecciones**: Si un usuario visita `/about` y debe ser redirigido a un prefijo de idioma (ej. `/es/about`), el middleware emite una respuesta de redirección con los encabezados `location` y `Set-Cookie` correspondientes.
|
|
57
|
+
- **Reescrituras internas**: Cuando un usuario accede a `/es/about`, la URL se reescribe internamente para que tu controlador de ruta coincida con `/about`, mientras que la locale resuelta se registra como `es`.
|
|
58
|
+
- **Alias de URL localizados**: Respeta las reglas de reescritura de URL definidas en `intlayer.config.ts` (ej. reescribir `/es/about` a `/es/acerca-de`).
|
|
59
|
+
3. **Resolución de locale**: Detecta la locale activa en función del prefijo de URL, cookies persistidas, encabezados personalizados o preferencias de idioma del navegador `Accept-Language`.
|
|
60
|
+
4. **Inyección de contexto**:
|
|
61
|
+
- Adjunta `IntlayerState` (`locale`, `defaultLocale`, `availableLocales`) al `RequestContext` de Remix bajo la clave `Intlayer` y `context.intlayer`.
|
|
62
|
+
- Ejecuta el resto de la solicitud dentro de un alcance `AsyncLocalStorage` (`requestStorage`), lo que permite que `useIntlayer`, `useDictionary` y `useLocale` se invoquen limpiamente en controladores, vistas y componentes.
|
|
63
|
+
5. **Persistencia**: Adjunta los encabezados y cookies de locale salientes a la respuesta HTTP final para conservar la preferencia del usuario.
|
|
64
|
+
|
|
65
|
+
## Parámetros
|
|
66
|
+
|
|
67
|
+
La función `intlayer` acepta `IntlayerMiddlewareOptions` opcionales:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { intlayer, type IntlayerMiddlewareOptions } from "remix-intlayer";
|
|
71
|
+
|
|
72
|
+
const options: IntlayerMiddlewareOptions = {
|
|
73
|
+
// Anulaciones de configuración de enrutamiento personalizadas
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const middleware = intlayer(options);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Acceso directo al contexto
|
|
80
|
+
|
|
81
|
+
Además de usar hooks, puedes acceder al `IntlayerState` resuelto directamente desde el contexto de solicitud de Remix:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { Intlayer } from "remix-intlayer";
|
|
85
|
+
|
|
86
|
+
router.get("/api/locale", (context) => {
|
|
87
|
+
// Mediante context.get()
|
|
88
|
+
const state = context.get(Intlayer);
|
|
89
|
+
|
|
90
|
+
// O mediante la propiedad directa context.intlayer
|
|
91
|
+
const { locale } = context.intlayer;
|
|
92
|
+
|
|
93
|
+
return Response.json({ locale });
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Documentación relacionada
|
|
98
|
+
|
|
99
|
+
- [Contexto `Intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/Intlayer.md)
|
|
100
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useIntlayer.md)
|
|
101
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useLocale.md)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Documentación del hook useDictionary | remix-intlayer
|
|
5
|
+
description: Vea cómo utilizar el hook useDictionary en aplicaciones Remix 3 para resolver objetos de diccionario para la locale de la solicitud actual.
|
|
6
|
+
keywords:
|
|
7
|
+
- useDictionary
|
|
8
|
+
- diccionario
|
|
9
|
+
- remix
|
|
10
|
+
- remix-3
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacionalización
|
|
14
|
+
- Documentación
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- remix-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
|
+
# Documentación del hook useDictionary
|
|
28
|
+
|
|
29
|
+
El hook `useDictionary` transforma un objeto de diccionario importado o inline y devuelve su contenido resuelto para la locale de la solicitud actual en aplicaciones Remix 3.
|
|
30
|
+
|
|
31
|
+
A diferencia de `useIntlayer`, que resuelve diccionarios por su clave de cadena desde el registro global de diccionarios, `useDictionary` acepta un objeto de diccionario directamente.
|
|
32
|
+
|
|
33
|
+
## Uso
|
|
34
|
+
|
|
35
|
+
```ts fileName="src/views/home.ts"
|
|
36
|
+
import { useDictionary } from "remix-intlayer";
|
|
37
|
+
import homeContent from "./home.content";
|
|
38
|
+
|
|
39
|
+
export const HomeView = () => {
|
|
40
|
+
const content = useDictionary(homeContent);
|
|
41
|
+
|
|
42
|
+
return `
|
|
43
|
+
<div>
|
|
44
|
+
<h1>${content.title}</h1>
|
|
45
|
+
<p>${content.subtitle}</p>
|
|
46
|
+
</div>
|
|
47
|
+
`;
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
También puedes pasar diccionarios inline definidos con `t()`:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { useDictionary } from "remix-intlayer";
|
|
55
|
+
import { t } from "intlayer";
|
|
56
|
+
|
|
57
|
+
export const FooterView = () => {
|
|
58
|
+
const content = useDictionary({
|
|
59
|
+
key: "footer",
|
|
60
|
+
content: {
|
|
61
|
+
copyright: t({
|
|
62
|
+
es: "Todos los derechos reservados.",
|
|
63
|
+
en: "All rights reserved.",
|
|
64
|
+
fr: "Tous droits réservés.",
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return `<footer>${content.copyright}</footer>`;
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Parámetros
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
useDictionary(dictionary, localeOrSelector?)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. **`dictionary`**: Un objeto de diccionario o grupo de diccionarios calificado.
|
|
80
|
+
2. **`localeOrSelector`** (opcional): Una locale específica o un objeto selector (`{ item }`, `{ variant }`, opcionalmente con `locale`).
|
|
81
|
+
|
|
82
|
+
## Descripción
|
|
83
|
+
|
|
84
|
+
El hook realiza las siguientes tareas:
|
|
85
|
+
|
|
86
|
+
1. **Detección de locale**: Lee la locale activa de la solicitud desde el almacenamiento `AsyncLocalStorage` creado por el middleware `intlayer()`.
|
|
87
|
+
2. **Resolución de contenido**: Evalúa traducciones (`t()`), enumeraciones, condiciones y estructuras anidadas según la locale resuelta.
|
|
88
|
+
3. **Procesamiento de selectores**: Aplica cualquier selector de elemento o variante proporcionado en los argumentos.
|
|
89
|
+
|
|
90
|
+
## Documentación relacionada
|
|
91
|
+
|
|
92
|
+
- [Middleware `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/intlayerMiddleware.md)
|
|
93
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useIntlayer.md)
|
|
94
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useLocale.md)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Documentación del hook useIntlayer | remix-intlayer
|
|
5
|
+
description: Vea cómo utilizar el hook useIntlayer en aplicaciones Remix 3 para acceder a contenido localizado por clave.
|
|
6
|
+
keywords:
|
|
7
|
+
- useIntlayer
|
|
8
|
+
- diccionario
|
|
9
|
+
- remix
|
|
10
|
+
- remix-3
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacionalización
|
|
14
|
+
- Documentación
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- remix-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
|
+
# Documentación del hook useIntlayer
|
|
28
|
+
|
|
29
|
+
El hook `useIntlayer` te permite recuperar contenido localizado de un diccionario de Intlayer por clave en aplicaciones Remix 3.
|
|
30
|
+
|
|
31
|
+
Lee automáticamente la locale activa del contexto de solicitud actual (a través de `AsyncLocalStorage`), por lo que no necesitas propagar la locale a través de controladores de ruta, plantillas de vista o componentes.
|
|
32
|
+
|
|
33
|
+
## Uso
|
|
34
|
+
|
|
35
|
+
### En controladores de ruta
|
|
36
|
+
|
|
37
|
+
```ts fileName="src/server.ts"
|
|
38
|
+
import { createRouter } from "remix/router";
|
|
39
|
+
import { intlayer, useIntlayer } from "remix-intlayer";
|
|
40
|
+
|
|
41
|
+
const router = createRouter({
|
|
42
|
+
middleware: [intlayer()],
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
router.get("/api/welcome", () => {
|
|
46
|
+
const content = useIntlayer("home");
|
|
47
|
+
|
|
48
|
+
return Response.json({
|
|
49
|
+
title: content.title,
|
|
50
|
+
subtitle: content.subtitle,
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### En plantillas de vista / componentes
|
|
56
|
+
|
|
57
|
+
```tsx fileName="src/views/home.ts"
|
|
58
|
+
import { useIntlayer } from "remix-intlayer";
|
|
59
|
+
|
|
60
|
+
export const HomeView = () => {
|
|
61
|
+
const content = useIntlayer("home");
|
|
62
|
+
|
|
63
|
+
return `
|
|
64
|
+
<main>
|
|
65
|
+
<h1>${content.title}</h1>
|
|
66
|
+
<p>${content.subtitle}</p>
|
|
67
|
+
</main>
|
|
68
|
+
`;
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Parámetros
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
useIntlayer(key, localeOrSelector?)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
1. **`key`**: La clave única del diccionario (tal como se define en tus archivos de declaración `.content.ts`).
|
|
79
|
+
2. **`localeOrSelector`** (opcional): Una locale específica o un objeto selector (`{ item }`, `{ variant }`, opcionalmente con `locale`). Si se proporciona, anula la locale detectada del contexto de la solicitud.
|
|
80
|
+
|
|
81
|
+
## Descripción
|
|
82
|
+
|
|
83
|
+
El hook realiza las siguientes tareas:
|
|
84
|
+
|
|
85
|
+
1. **Recuperación de la locale del contexto**: Detecta la locale actual del alcance `AsyncLocalStorage` vinculado a la solicitud establecido por el middleware `intlayer()`.
|
|
86
|
+
2. **Recuperación del diccionario**: Obtiene el diccionario precompilado correspondiente a la clave proporcionada.
|
|
87
|
+
3. **Procesamiento de traducción**: Resuelve traducciones, enumeraciones, markdown y contenido condicional para la locale resuelta.
|
|
88
|
+
4. **Manejo de respaldo**: Si se llama fuera de un contexto de solicitud HTTP activo, recurre limpiamente a la `defaultLocale` configurada.
|
|
89
|
+
|
|
90
|
+
## Documentación relacionada
|
|
91
|
+
|
|
92
|
+
- [Middleware `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/intlayerMiddleware.md)
|
|
93
|
+
- [Hook `useDictionary`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useDictionary.md)
|
|
94
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useLocale.md)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Documentación del hook useLocale | remix-intlayer
|
|
5
|
+
description: Vea cómo utilizar el hook useLocale en aplicaciones Remix 3 para obtener la locale de la solicitud actual, la locale predeterminada y las locales disponibles.
|
|
6
|
+
keywords:
|
|
7
|
+
- useLocale
|
|
8
|
+
- locale
|
|
9
|
+
- remix
|
|
10
|
+
- remix-3
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacionalización
|
|
14
|
+
- Documentación
|
|
15
|
+
slugs:
|
|
16
|
+
- doc
|
|
17
|
+
- packages
|
|
18
|
+
- remix-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
|
+
# Documentación del hook useLocale
|
|
28
|
+
|
|
29
|
+
El hook `useLocale` de `remix-intlayer` proporciona acceso a la locale de la solicitud HTTP que se está procesando actualmente, junto con la locale predeterminada y las locales disponibles configuradas en el proyecto.
|
|
30
|
+
|
|
31
|
+
## Uso
|
|
32
|
+
|
|
33
|
+
En un componente de Remix (por ejemplo, un selector de idioma):
|
|
34
|
+
|
|
35
|
+
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
36
|
+
import { type FC } from "react";
|
|
37
|
+
import { Link } from "@remix-run/react";
|
|
38
|
+
import { useLocale } from "remix-intlayer";
|
|
39
|
+
import { getLocalizedUrl, getPathWithoutLocale } from "intlayer";
|
|
40
|
+
|
|
41
|
+
export const LocaleSwitcher: FC = () => {
|
|
42
|
+
const { locale, availableLocales } = useLocale();
|
|
43
|
+
const pathWithoutLocale = getPathWithoutLocale();
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<nav>
|
|
47
|
+
<ul>
|
|
48
|
+
{availableLocales.map((localeItem) => (
|
|
49
|
+
<li key={localeItem} className="p-1">
|
|
50
|
+
<Link
|
|
51
|
+
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
52
|
+
aria-current={localeItem === locale ? "page" : undefined}
|
|
53
|
+
>
|
|
54
|
+
{localeItem.toUpperCase()}
|
|
55
|
+
</Link>
|
|
56
|
+
</li>
|
|
57
|
+
))}
|
|
58
|
+
</ul>
|
|
59
|
+
</nav>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
En un controlador de ruta:
|
|
65
|
+
|
|
66
|
+
```ts fileName="src/server.ts"
|
|
67
|
+
import { createRouter } from "remix/router";
|
|
68
|
+
import { intlayer, useLocale } from "remix-intlayer";
|
|
69
|
+
|
|
70
|
+
const router = createRouter({
|
|
71
|
+
middleware: [intlayer()],
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
router.get("/api/locale-info", () => {
|
|
75
|
+
const { locale, defaultLocale, availableLocales } = useLocale();
|
|
76
|
+
|
|
77
|
+
return Response.json({
|
|
78
|
+
locale,
|
|
79
|
+
defaultLocale,
|
|
80
|
+
availableLocales,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Valores de retorno
|
|
86
|
+
|
|
87
|
+
El hook devuelve un objeto de tipo `UseLocaleResult`:
|
|
88
|
+
|
|
89
|
+
| Propiedad | Tipo | Descripción |
|
|
90
|
+
| ------------------ | ------------------- | ----------------------------------------------------------------------------- |
|
|
91
|
+
| `locale` | `DeclaredLocales` | La locale resuelta para la solicitud actual. |
|
|
92
|
+
| `defaultLocale` | `DeclaredLocales` | La locale de respaldo predeterminada configurada en `intlayer.config.ts`. |
|
|
93
|
+
| `availableLocales` | `DeclaredLocales[]` | Matriz de todas las locales disponibles configuradas en `intlayer.config.ts`. |
|
|
94
|
+
|
|
95
|
+
## Descripción
|
|
96
|
+
|
|
97
|
+
1. **Resolución con alcance de solicitud**: En una solicitud activa procesada por el middleware `intlayer()`, `useLocale` lee la locale resuelta desde el almacenamiento de solicitudes.
|
|
98
|
+
2. **Respaldo limpio**: Si se llama fuera de un contexto de solicitud (como durante scripts de inicialización o pruebas unitarias), recurre por defecto a la `defaultLocale` configurada.
|
|
99
|
+
|
|
100
|
+
## Documentación relacionada
|
|
101
|
+
|
|
102
|
+
- [Middleware `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/intlayerMiddleware.md)
|
|
103
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useIntlayer.md)
|
|
104
|
+
- [Hook `useDictionary`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/packages/remix-intlayer/useDictionary.md)
|
package/docs/es/readme.md
CHANGED
|
@@ -199,7 +199,8 @@ Explore nuestra documentación completa para comenzar con Intlayer y aprender c
|
|
|
199
199
|
<li><a href="https://intlayer.org/doc/environment/create-react-app" rel=''>React CRA</a></li>
|
|
200
200
|
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React</a></li>
|
|
201
201
|
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React usando el Compilador</a></li>
|
|
202
|
-
<li><a href="https://intlayer.org/doc/environment/vite-and-react/
|
|
202
|
+
<li><a href="https://intlayer.org/doc/environment/vite-and-react/react-router-v7" rel=''>React-router-v7</a></li>
|
|
203
|
+
<li><a href="https://intlayer.org/doc/environment/remix-3" rel=''>Remix 3</a></li>
|
|
203
204
|
<li><a href="https://intlayer.org/doc/environment/tanstack-start" rel=''>Tanstack start</a>
|
|
204
205
|
<ul>
|
|
205
206
|
<li><a href="https://intlayer.org/doc/environment/tanstack-start/solid" rel=''>Solid</a></li>
|