@intlayer/docs 9.5.4 → 9.5.6
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 -2
- 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/ar/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/de/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/en-GB/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/es/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/fr/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/hi/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/id/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/it/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/ja/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/ko/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/pl/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/pt/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/ru/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/tr/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/uk/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/vi/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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/blog/zh/transform_existing_vite_react_app_using_compiler.md +4 -2
- 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 +77 -66
- package/docs/ar/intlayer_with_astro_lit.md +32 -36
- package/docs/ar/intlayer_with_astro_preact.md +39 -36
- package/docs/ar/intlayer_with_astro_react.md +39 -36
- package/docs/ar/intlayer_with_astro_solid.md +39 -36
- package/docs/ar/intlayer_with_astro_svelte.md +39 -36
- package/docs/ar/intlayer_with_astro_vue.md +39 -36
- 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 +19 -1
- package/docs/ar/intlayer_with_remix_3.md +73 -112
- package/docs/ar/intlayer_with_solid_start.md +14 -7
- package/docs/ar/intlayer_with_svelte_kit.md +12 -1
- package/docs/ar/intlayer_with_tanstack+solid.md +20 -2
- package/docs/ar/intlayer_with_tanstack.md +20 -6
- package/docs/ar/intlayer_with_vite+lit.md +75 -3
- package/docs/ar/intlayer_with_vite+preact.md +34 -19
- package/docs/ar/intlayer_with_vite+react.md +34 -19
- package/docs/ar/intlayer_with_vite+solid.md +34 -19
- package/docs/ar/intlayer_with_vite+svelte.md +27 -19
- package/docs/ar/intlayer_with_vite+vanilla.md +16 -3
- package/docs/ar/intlayer_with_vite+vue.md +27 -19
- package/docs/ar/introduction.md +0 -1
- 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 -2
- package/docs/ar/releases/v8.md +1 -5
- package/docs/bn/intlayer_with_vite+lit.md +75 -3
- package/docs/bn/intlayer_with_vite+vanilla.md +16 -3
- package/docs/bn/introduction.md +0 -1
- package/docs/cs/intlayer_with_vite+lit.md +75 -3
- package/docs/cs/intlayer_with_vite+vanilla.md +16 -3
- package/docs/cs/introduction.md +0 -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 +70 -59
- package/docs/de/intlayer_with_astro_lit.md +23 -27
- package/docs/de/intlayer_with_astro_preact.md +30 -27
- package/docs/de/intlayer_with_astro_react.md +30 -27
- package/docs/de/intlayer_with_astro_solid.md +30 -27
- package/docs/de/intlayer_with_astro_svelte.md +30 -27
- package/docs/de/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/de/intlayer_with_remix_3.md +70 -109
- package/docs/de/intlayer_with_solid_start.md +14 -7
- package/docs/de/intlayer_with_svelte_kit.md +12 -1
- package/docs/de/intlayer_with_tanstack+solid.md +20 -2
- package/docs/de/intlayer_with_tanstack.md +20 -6
- package/docs/de/intlayer_with_vite+lit.md +75 -3
- package/docs/de/intlayer_with_vite+preact.md +23 -3
- package/docs/de/intlayer_with_vite+react.md +23 -3
- package/docs/de/intlayer_with_vite+solid.md +23 -3
- package/docs/de/intlayer_with_vite+svelte.md +16 -3
- package/docs/de/intlayer_with_vite+vanilla.md +16 -3
- package/docs/de/intlayer_with_vite+vue.md +16 -3
- package/docs/de/introduction.md +0 -1
- 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 -2
- package/docs/de/releases/v8.md +1 -5
- 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 +67 -60
- package/docs/en/intlayer_with_astro_lit.md +22 -26
- package/docs/en/intlayer_with_astro_preact.md +29 -26
- package/docs/en/intlayer_with_astro_react.md +29 -26
- package/docs/en/intlayer_with_astro_solid.md +29 -26
- package/docs/en/intlayer_with_astro_svelte.md +29 -26
- package/docs/en/intlayer_with_astro_vanilla.md +27 -13
- package/docs/en/intlayer_with_astro_vue.md +29 -26
- 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 +19 -1
- package/docs/en/intlayer_with_remix_3.md +74 -122
- package/docs/en/intlayer_with_solid_start.md +14 -7
- package/docs/en/intlayer_with_svelte_kit.md +12 -1
- package/docs/en/intlayer_with_tanstack+solid.md +20 -2
- package/docs/en/intlayer_with_tanstack.md +19 -5
- package/docs/en/intlayer_with_vite+lit.md +75 -3
- package/docs/en/intlayer_with_vite+preact.md +23 -3
- package/docs/en/intlayer_with_vite+react.md +23 -3
- package/docs/en/intlayer_with_vite+solid.md +23 -3
- package/docs/en/intlayer_with_vite+svelte.md +16 -3
- package/docs/en/intlayer_with_vite+vanilla.md +16 -3
- package/docs/en/intlayer_with_vite+vue.md +16 -3
- package/docs/en/introduction.md +2 -2
- 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 -2
- package/docs/en/releases/v8.md +1 -5
- 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 +70 -59
- package/docs/en-GB/intlayer_with_astro_lit.md +23 -27
- package/docs/en-GB/intlayer_with_astro_preact.md +30 -27
- package/docs/en-GB/intlayer_with_astro_react.md +30 -27
- package/docs/en-GB/intlayer_with_astro_solid.md +30 -27
- package/docs/en-GB/intlayer_with_astro_svelte.md +30 -27
- package/docs/en-GB/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/en-GB/intlayer_with_remix_3.md +66 -105
- package/docs/en-GB/intlayer_with_solid_start.md +14 -7
- package/docs/en-GB/intlayer_with_svelte_kit.md +12 -1
- package/docs/en-GB/intlayer_with_tanstack+solid.md +20 -2
- package/docs/en-GB/intlayer_with_tanstack.md +20 -6
- package/docs/en-GB/intlayer_with_vite+lit.md +75 -3
- package/docs/en-GB/intlayer_with_vite+preact.md +23 -3
- package/docs/en-GB/intlayer_with_vite+react.md +23 -3
- package/docs/en-GB/intlayer_with_vite+solid.md +32 -15
- package/docs/en-GB/intlayer_with_vite+svelte.md +16 -3
- package/docs/en-GB/intlayer_with_vite+vanilla.md +16 -3
- package/docs/en-GB/intlayer_with_vite+vue.md +16 -3
- package/docs/en-GB/introduction.md +0 -1
- 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 -2
- package/docs/en-GB/releases/v8.md +1 -5
- 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 +70 -59
- package/docs/es/intlayer_with_astro_lit.md +23 -27
- package/docs/es/intlayer_with_astro_preact.md +30 -27
- package/docs/es/intlayer_with_astro_react.md +30 -27
- package/docs/es/intlayer_with_astro_solid.md +30 -27
- package/docs/es/intlayer_with_astro_svelte.md +30 -27
- package/docs/es/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/es/intlayer_with_remix_3.md +73 -112
- package/docs/es/intlayer_with_solid_start.md +14 -7
- package/docs/es/intlayer_with_svelte_kit.md +12 -1
- package/docs/es/intlayer_with_tanstack+solid.md +20 -2
- package/docs/es/intlayer_with_tanstack.md +20 -6
- package/docs/es/intlayer_with_vite+lit.md +75 -3
- package/docs/es/intlayer_with_vite+preact.md +23 -3
- package/docs/es/intlayer_with_vite+react.md +23 -3
- package/docs/es/intlayer_with_vite+solid.md +23 -3
- package/docs/es/intlayer_with_vite+svelte.md +16 -3
- package/docs/es/intlayer_with_vite+vanilla.md +16 -3
- package/docs/es/intlayer_with_vite+vue.md +16 -3
- package/docs/es/introduction.md +0 -1
- 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 -2
- package/docs/es/releases/v8.md +1 -5
- 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 +71 -60
- package/docs/fr/intlayer_with_astro_lit.md +24 -28
- package/docs/fr/intlayer_with_astro_preact.md +31 -28
- package/docs/fr/intlayer_with_astro_react.md +31 -28
- package/docs/fr/intlayer_with_astro_solid.md +31 -28
- package/docs/fr/intlayer_with_astro_svelte.md +31 -28
- package/docs/fr/intlayer_with_astro_vue.md +31 -28
- 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 +22 -4
- package/docs/fr/intlayer_with_remix_3.md +74 -122
- package/docs/fr/intlayer_with_solid_start.md +14 -7
- package/docs/fr/intlayer_with_svelte_kit.md +15 -4
- package/docs/fr/intlayer_with_tanstack+solid.md +22 -4
- package/docs/fr/intlayer_with_tanstack.md +20 -6
- package/docs/fr/intlayer_with_vite+lit.md +75 -3
- package/docs/fr/intlayer_with_vite+preact.md +26 -6
- package/docs/fr/intlayer_with_vite+react.md +26 -6
- package/docs/fr/intlayer_with_vite+solid.md +26 -6
- package/docs/fr/intlayer_with_vite+svelte.md +19 -6
- package/docs/fr/intlayer_with_vite+vanilla.md +19 -6
- package/docs/fr/intlayer_with_vite+vue.md +19 -6
- package/docs/fr/introduction.md +0 -1
- 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 -2
- package/docs/fr/releases/v8.md +1 -5
- 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 +74 -66
- package/docs/hi/intlayer_with_astro_lit.md +26 -33
- package/docs/hi/intlayer_with_astro_preact.md +33 -33
- package/docs/hi/intlayer_with_astro_react.md +33 -33
- package/docs/hi/intlayer_with_astro_solid.md +33 -33
- package/docs/hi/intlayer_with_astro_svelte.md +33 -33
- package/docs/hi/intlayer_with_astro_vue.md +33 -33
- 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 +27 -12
- package/docs/hi/intlayer_with_remix_3.md +73 -112
- package/docs/hi/intlayer_with_solid_start.md +14 -7
- package/docs/hi/intlayer_with_svelte_kit.md +20 -12
- package/docs/hi/intlayer_with_tanstack+solid.md +20 -2
- package/docs/hi/intlayer_with_tanstack.md +28 -17
- package/docs/hi/intlayer_with_vite+lit.md +75 -3
- package/docs/hi/intlayer_with_vite+preact.md +31 -14
- package/docs/hi/intlayer_with_vite+react.md +31 -14
- package/docs/hi/intlayer_with_vite+solid.md +31 -14
- package/docs/hi/intlayer_with_vite+svelte.md +24 -14
- package/docs/hi/intlayer_with_vite+vanilla.md +16 -3
- package/docs/hi/intlayer_with_vite+vue.md +24 -14
- package/docs/hi/introduction.md +0 -1
- 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 -2
- package/docs/hi/releases/v8.md +1 -5
- 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 +70 -59
- package/docs/id/intlayer_with_astro_lit.md +23 -27
- package/docs/id/intlayer_with_astro_preact.md +30 -27
- package/docs/id/intlayer_with_astro_react.md +30 -27
- package/docs/id/intlayer_with_astro_solid.md +30 -27
- package/docs/id/intlayer_with_astro_svelte.md +30 -27
- package/docs/id/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/id/intlayer_with_remix_3.md +101 -148
- package/docs/id/intlayer_with_solid_start.md +14 -7
- package/docs/id/intlayer_with_svelte_kit.md +12 -1
- package/docs/id/intlayer_with_tanstack+solid.md +20 -2
- package/docs/id/intlayer_with_tanstack.md +20 -6
- package/docs/id/intlayer_with_vite+lit.md +75 -3
- package/docs/id/intlayer_with_vite+preact.md +23 -3
- package/docs/id/intlayer_with_vite+react.md +23 -3
- package/docs/id/intlayer_with_vite+solid.md +23 -3
- package/docs/id/intlayer_with_vite+svelte.md +16 -3
- package/docs/id/intlayer_with_vite+vanilla.md +16 -3
- package/docs/id/intlayer_with_vite+vue.md +16 -3
- package/docs/id/introduction.md +0 -1
- 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 -2
- package/docs/id/releases/v8.md +1 -5
- 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 +70 -59
- package/docs/it/intlayer_with_astro_lit.md +23 -27
- package/docs/it/intlayer_with_astro_preact.md +30 -27
- package/docs/it/intlayer_with_astro_react.md +30 -27
- package/docs/it/intlayer_with_astro_solid.md +30 -27
- package/docs/it/intlayer_with_astro_svelte.md +30 -27
- package/docs/it/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/it/intlayer_with_remix_3.md +70 -109
- package/docs/it/intlayer_with_solid_start.md +14 -7
- package/docs/it/intlayer_with_svelte_kit.md +12 -1
- package/docs/it/intlayer_with_tanstack+solid.md +20 -2
- package/docs/it/intlayer_with_tanstack.md +20 -6
- package/docs/it/intlayer_with_vite+lit.md +75 -3
- package/docs/it/intlayer_with_vite+preact.md +23 -3
- package/docs/it/intlayer_with_vite+react.md +23 -3
- package/docs/it/intlayer_with_vite+solid.md +23 -3
- package/docs/it/intlayer_with_vite+svelte.md +16 -3
- package/docs/it/intlayer_with_vite+vanilla.md +16 -3
- package/docs/it/intlayer_with_vite+vue.md +16 -3
- package/docs/it/introduction.md +0 -1
- 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 -2
- package/docs/it/releases/v8.md +1 -5
- 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 +71 -60
- package/docs/ja/intlayer_with_astro_lit.md +23 -27
- package/docs/ja/intlayer_with_astro_preact.md +30 -27
- package/docs/ja/intlayer_with_astro_react.md +30 -27
- package/docs/ja/intlayer_with_astro_solid.md +30 -27
- package/docs/ja/intlayer_with_astro_svelte.md +30 -27
- package/docs/ja/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/ja/intlayer_with_remix_3.md +73 -112
- package/docs/ja/intlayer_with_solid_start.md +14 -7
- package/docs/ja/intlayer_with_svelte_kit.md +21 -15
- package/docs/ja/intlayer_with_tanstack+solid.md +20 -2
- package/docs/ja/intlayer_with_tanstack.md +20 -6
- package/docs/ja/intlayer_with_vite+lit.md +75 -3
- package/docs/ja/intlayer_with_vite+preact.md +23 -3
- package/docs/ja/intlayer_with_vite+react.md +23 -3
- package/docs/ja/intlayer_with_vite+solid.md +23 -3
- package/docs/ja/intlayer_with_vite+svelte.md +16 -3
- package/docs/ja/intlayer_with_vite+vanilla.md +16 -3
- package/docs/ja/intlayer_with_vite+vue.md +16 -3
- package/docs/ja/introduction.md +0 -1
- 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 -2
- package/docs/ja/releases/v8.md +1 -5
- 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 +65 -56
- package/docs/ko/intlayer_with_astro_lit.md +23 -27
- package/docs/ko/intlayer_with_astro_preact.md +30 -27
- package/docs/ko/intlayer_with_astro_react.md +30 -27
- package/docs/ko/intlayer_with_astro_solid.md +30 -27
- package/docs/ko/intlayer_with_astro_svelte.md +30 -27
- package/docs/ko/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/ko/intlayer_with_remix_3.md +73 -112
- package/docs/ko/intlayer_with_solid_start.md +14 -7
- package/docs/ko/intlayer_with_svelte_kit.md +12 -1
- package/docs/ko/intlayer_with_tanstack+solid.md +20 -2
- package/docs/ko/intlayer_with_tanstack.md +20 -6
- package/docs/ko/intlayer_with_vite+lit.md +75 -3
- package/docs/ko/intlayer_with_vite+preact.md +23 -3
- package/docs/ko/intlayer_with_vite+react.md +23 -3
- package/docs/ko/intlayer_with_vite+solid.md +33 -16
- package/docs/ko/intlayer_with_vite+svelte.md +16 -3
- package/docs/ko/intlayer_with_vite+vanilla.md +16 -3
- package/docs/ko/intlayer_with_vite+vue.md +16 -3
- package/docs/ko/introduction.md +0 -1
- 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 -2
- package/docs/ko/releases/v8.md +1 -5
- package/docs/nl/intlayer_with_vite+lit.md +75 -3
- package/docs/nl/intlayer_with_vite+vanilla.md +16 -3
- package/docs/nl/introduction.md +0 -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 +65 -56
- package/docs/pl/intlayer_with_astro_lit.md +23 -27
- package/docs/pl/intlayer_with_astro_preact.md +30 -27
- package/docs/pl/intlayer_with_astro_react.md +30 -27
- package/docs/pl/intlayer_with_astro_solid.md +30 -27
- package/docs/pl/intlayer_with_astro_svelte.md +30 -27
- package/docs/pl/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/pl/intlayer_with_remix_3.md +101 -148
- package/docs/pl/intlayer_with_solid_start.md +14 -7
- package/docs/pl/intlayer_with_svelte_kit.md +12 -1
- package/docs/pl/intlayer_with_tanstack+solid.md +20 -2
- package/docs/pl/intlayer_with_tanstack.md +20 -6
- package/docs/pl/intlayer_with_vite+lit.md +75 -3
- package/docs/pl/intlayer_with_vite+preact.md +23 -3
- package/docs/pl/intlayer_with_vite+react.md +23 -3
- package/docs/pl/intlayer_with_vite+solid.md +23 -3
- package/docs/pl/intlayer_with_vite+svelte.md +16 -3
- package/docs/pl/intlayer_with_vite+vanilla.md +16 -3
- package/docs/pl/intlayer_with_vite+vue.md +16 -3
- package/docs/pl/introduction.md +0 -1
- 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 -2
- package/docs/pl/releases/v8.md +1 -5
- 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 +65 -56
- package/docs/pt/intlayer_with_astro_lit.md +23 -27
- package/docs/pt/intlayer_with_astro_preact.md +30 -27
- package/docs/pt/intlayer_with_astro_react.md +30 -27
- package/docs/pt/intlayer_with_astro_solid.md +30 -27
- package/docs/pt/intlayer_with_astro_svelte.md +30 -27
- package/docs/pt/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/pt/intlayer_with_remix_3.md +73 -112
- package/docs/pt/intlayer_with_solid_start.md +14 -7
- package/docs/pt/intlayer_with_svelte_kit.md +12 -1
- package/docs/pt/intlayer_with_tanstack+solid.md +20 -2
- package/docs/pt/intlayer_with_tanstack.md +20 -6
- package/docs/pt/intlayer_with_vite+lit.md +75 -3
- package/docs/pt/intlayer_with_vite+preact.md +23 -3
- package/docs/pt/intlayer_with_vite+react.md +23 -3
- package/docs/pt/intlayer_with_vite+solid.md +23 -3
- package/docs/pt/intlayer_with_vite+svelte.md +16 -3
- package/docs/pt/intlayer_with_vite+vanilla.md +16 -3
- package/docs/pt/intlayer_with_vite+vue.md +16 -3
- package/docs/pt/introduction.md +0 -1
- 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 -2
- package/docs/pt/releases/v8.md +1 -5
- 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 +71 -60
- package/docs/ru/intlayer_with_astro_lit.md +23 -27
- package/docs/ru/intlayer_with_astro_preact.md +30 -27
- package/docs/ru/intlayer_with_astro_react.md +30 -27
- package/docs/ru/intlayer_with_astro_solid.md +30 -27
- package/docs/ru/intlayer_with_astro_svelte.md +30 -27
- package/docs/ru/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/ru/intlayer_with_remix_3.md +73 -112
- package/docs/ru/intlayer_with_solid_start.md +14 -7
- package/docs/ru/intlayer_with_svelte_kit.md +12 -1
- package/docs/ru/intlayer_with_tanstack+solid.md +20 -2
- package/docs/ru/intlayer_with_tanstack.md +20 -6
- package/docs/ru/intlayer_with_vite+lit.md +75 -3
- package/docs/ru/intlayer_with_vite+preact.md +23 -3
- package/docs/ru/intlayer_with_vite+react.md +23 -3
- package/docs/ru/intlayer_with_vite+solid.md +23 -3
- package/docs/ru/intlayer_with_vite+svelte.md +16 -3
- package/docs/ru/intlayer_with_vite+vanilla.md +16 -3
- package/docs/ru/intlayer_with_vite+vue.md +16 -3
- package/docs/ru/introduction.md +0 -1
- 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 -2
- package/docs/ru/releases/v8.md +1 -5
- 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 +70 -59
- package/docs/tr/intlayer_with_astro_lit.md +24 -28
- package/docs/tr/intlayer_with_astro_preact.md +31 -28
- package/docs/tr/intlayer_with_astro_react.md +31 -28
- package/docs/tr/intlayer_with_astro_solid.md +31 -28
- package/docs/tr/intlayer_with_astro_svelte.md +31 -28
- package/docs/tr/intlayer_with_astro_vue.md +31 -28
- 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 +19 -1
- package/docs/tr/intlayer_with_remix_3.md +101 -148
- package/docs/tr/intlayer_with_solid_start.md +14 -7
- package/docs/tr/intlayer_with_svelte_kit.md +12 -1
- package/docs/tr/intlayer_with_tanstack+solid.md +20 -2
- package/docs/tr/intlayer_with_tanstack.md +20 -6
- package/docs/tr/intlayer_with_vite+lit.md +75 -3
- package/docs/tr/intlayer_with_vite+preact.md +23 -3
- package/docs/tr/intlayer_with_vite+react.md +23 -3
- package/docs/tr/intlayer_with_vite+solid.md +23 -3
- package/docs/tr/intlayer_with_vite+svelte.md +16 -3
- package/docs/tr/intlayer_with_vite+vanilla.md +16 -3
- package/docs/tr/intlayer_with_vite+vue.md +16 -3
- package/docs/tr/introduction.md +0 -1
- 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 -2
- package/docs/tr/releases/v8.md +1 -5
- 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 +71 -60
- package/docs/uk/intlayer_with_astro_lit.md +23 -27
- package/docs/uk/intlayer_with_astro_preact.md +30 -27
- package/docs/uk/intlayer_with_astro_react.md +30 -27
- package/docs/uk/intlayer_with_astro_solid.md +30 -27
- package/docs/uk/intlayer_with_astro_svelte.md +30 -27
- package/docs/uk/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/uk/intlayer_with_remix_3.md +101 -148
- package/docs/uk/intlayer_with_solid_start.md +14 -7
- package/docs/uk/intlayer_with_svelte_kit.md +12 -1
- package/docs/uk/intlayer_with_tanstack+solid.md +20 -2
- package/docs/uk/intlayer_with_tanstack.md +20 -6
- package/docs/uk/intlayer_with_vite+lit.md +75 -3
- package/docs/uk/intlayer_with_vite+preact.md +23 -3
- package/docs/uk/intlayer_with_vite+react.md +23 -3
- package/docs/uk/intlayer_with_vite+solid.md +23 -3
- package/docs/uk/intlayer_with_vite+svelte.md +16 -3
- package/docs/uk/intlayer_with_vite+vanilla.md +16 -3
- package/docs/uk/intlayer_with_vite+vue.md +16 -3
- package/docs/uk/introduction.md +0 -1
- 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 -2
- package/docs/uk/releases/v8.md +1 -5
- package/docs/ur/intlayer_with_vite+lit.md +75 -3
- package/docs/ur/intlayer_with_vite+vanilla.md +16 -3
- package/docs/ur/introduction.md +0 -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 +70 -59
- package/docs/vi/intlayer_with_astro_lit.md +23 -27
- package/docs/vi/intlayer_with_astro_preact.md +30 -27
- package/docs/vi/intlayer_with_astro_react.md +30 -27
- package/docs/vi/intlayer_with_astro_solid.md +30 -27
- package/docs/vi/intlayer_with_astro_svelte.md +30 -27
- package/docs/vi/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/vi/intlayer_with_remix_3.md +101 -148
- package/docs/vi/intlayer_with_solid_start.md +14 -7
- package/docs/vi/intlayer_with_svelte_kit.md +12 -1
- package/docs/vi/intlayer_with_tanstack+solid.md +20 -2
- package/docs/vi/intlayer_with_tanstack.md +20 -6
- package/docs/vi/intlayer_with_vite+lit.md +75 -3
- package/docs/vi/intlayer_with_vite+preact.md +23 -3
- package/docs/vi/intlayer_with_vite+react.md +23 -3
- package/docs/vi/intlayer_with_vite+solid.md +23 -3
- package/docs/vi/intlayer_with_vite+svelte.md +16 -3
- package/docs/vi/intlayer_with_vite+vanilla.md +16 -3
- package/docs/vi/intlayer_with_vite+vue.md +16 -3
- package/docs/vi/introduction.md +0 -1
- 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 -2
- package/docs/vi/releases/v8.md +1 -5
- 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 +65 -56
- package/docs/zh/intlayer_with_astro_lit.md +23 -27
- package/docs/zh/intlayer_with_astro_preact.md +30 -27
- package/docs/zh/intlayer_with_astro_react.md +30 -27
- package/docs/zh/intlayer_with_astro_solid.md +30 -27
- package/docs/zh/intlayer_with_astro_svelte.md +30 -27
- package/docs/zh/intlayer_with_astro_vue.md +30 -27
- 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 +19 -1
- package/docs/zh/intlayer_with_remix_3.md +74 -112
- package/docs/zh/intlayer_with_solid_start.md +14 -7
- package/docs/zh/intlayer_with_svelte_kit.md +12 -1
- package/docs/zh/intlayer_with_tanstack+solid.md +20 -2
- package/docs/zh/intlayer_with_tanstack.md +20 -6
- package/docs/zh/intlayer_with_vite+lit.md +75 -3
- package/docs/zh/intlayer_with_vite+preact.md +23 -3
- package/docs/zh/intlayer_with_vite+react.md +23 -3
- package/docs/zh/intlayer_with_vite+solid.md +23 -3
- package/docs/zh/intlayer_with_vite+svelte.md +16 -3
- package/docs/zh/intlayer_with_vite+vanilla.md +16 -3
- package/docs/zh/intlayer_with_vite+vue.md +16 -3
- package/docs/zh/introduction.md +0 -1
- 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 -2
- package/docs/zh/releases/v8.md +1 -5
- package/docs/zh-TW/introduction.md +0 -1
- package/package.json +6 -6
- package/src/generated/docs.entry.ts +223 -0
- package/docs/ar/intlayer_with_astro_vanilla.md +0 -702
- package/docs/de/intlayer_with_astro_vanilla.md +0 -698
- package/docs/en-GB/intlayer_with_astro_vanilla.md +0 -702
- package/docs/es/intlayer_with_astro_vanilla.md +0 -694
- package/docs/fr/intlayer_with_astro_vanilla.md +0 -694
- package/docs/hi/intlayer_with_astro_vanilla.md +0 -713
- package/docs/id/intlayer_with_astro_vanilla.md +0 -698
- package/docs/it/intlayer_with_astro_vanilla.md +0 -698
- package/docs/ja/intlayer_with_astro_vanilla.md +0 -701
- package/docs/ko/intlayer_with_astro_vanilla.md +0 -713
- package/docs/pl/intlayer_with_astro_vanilla.md +0 -698
- package/docs/pt/intlayer_with_astro_vanilla.md +0 -698
- package/docs/ru/intlayer_with_astro_vanilla.md +0 -709
- package/docs/tr/intlayer_with_astro_vanilla.md +0 -698
- package/docs/uk/intlayer_with_astro_vanilla.md +0 -698
- package/docs/vi/intlayer_with_astro_vanilla.md +0 -698
- package/docs/zh/intlayer_with_astro_vanilla.md +0 -697
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-21
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
4
|
title: Dokumentacja pakietu astro-intlayer
|
|
5
|
-
description: Integracja Astro dla Intlayer, zapewniająca
|
|
5
|
+
description: Integracja Astro dla Intlayer, zapewniająca routing oparty na lokalizacji, middleware, hooki, magazyn klienta i zarządzanie słownikami.
|
|
6
6
|
keywords:
|
|
7
7
|
- astro-intlayer
|
|
8
8
|
- astro
|
|
9
|
-
-
|
|
9
|
+
- internacjonalizacja
|
|
10
10
|
- i18n
|
|
11
11
|
slugs:
|
|
12
12
|
- doc
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- astro-intlayer
|
|
15
15
|
- exports
|
|
16
16
|
history:
|
|
17
|
+
- version: 9.5.5
|
|
18
|
+
date: 2026-09-19
|
|
19
|
+
changes: "Dodano dokumentację hooków useIntlayer, useDictionary, useLocale, middleware i formaterów"
|
|
17
20
|
- version: 8.0.0
|
|
18
21
|
date: 2026-01-21
|
|
19
22
|
changes: "Ujednolicona dokumentacja dla wszystkich eksportów"
|
|
@@ -22,7 +25,7 @@ author: aymericzip
|
|
|
22
25
|
|
|
23
26
|
# Pakiet astro-intlayer
|
|
24
27
|
|
|
25
|
-
Pakiet `astro-intlayer` dostarcza
|
|
28
|
+
Pakiet `astro-intlayer` dostarcza narzędzi do integracji Intlayer z aplikacjami Astro. Konfiguruje routing oparty na lokalizacji, zarządzanie słownikami, przepisywanie stron w czasie budowy, middleware zapytań oraz hooki do pobierania wielojęzycznych treści zarówno w komponentach `.astro` renderowanych po stronie serwera, jak i w skryptach klienta.
|
|
26
29
|
|
|
27
30
|
## Instalacja
|
|
28
31
|
|
|
@@ -34,22 +37,171 @@ npm install astro-intlayer
|
|
|
34
37
|
|
|
35
38
|
### Integracja
|
|
36
39
|
|
|
37
|
-
Pakiet `astro-intlayer`
|
|
40
|
+
Pakiet `astro-intlayer` dostarcza integrację Astro, która konfiguruje Intlayer w projekcie.
|
|
38
41
|
|
|
39
42
|
Import:
|
|
40
43
|
|
|
41
44
|
```tsx
|
|
42
|
-
import "astro-intlayer";
|
|
45
|
+
import { intlayer } from "astro-intlayer";
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
lub
|
|
48
|
+
lub import domyślny w `astro.config.mjs`:
|
|
46
49
|
|
|
47
50
|
```ts
|
|
51
|
+
import { defineConfig } from "astro/config";
|
|
52
|
+
import intlayer from "astro-intlayer";
|
|
53
|
+
|
|
48
54
|
export default defineConfig({
|
|
49
55
|
integrations: [intlayer()],
|
|
50
56
|
});
|
|
51
57
|
```
|
|
52
58
|
|
|
53
|
-
| Funkcja | Opis
|
|
54
|
-
| ---------- |
|
|
55
|
-
| `intlayer` | Integracja
|
|
59
|
+
| Funkcja | Opis | Powiązana dokumentacja |
|
|
60
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| `intlayer` | Integracja Astro, która przygotowuje słowniki, konfiguruje wtyczki Vite (aliasy, proxy routingu, usuwanie zbędnego kodu), automatycznie rejestruje middleware oraz generuje wstępnie renderowane strony. | [intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/intlayer.md) |
|
|
62
|
+
|
|
63
|
+
### Hooki (Serwer i Klient)
|
|
64
|
+
|
|
65
|
+
Import:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { useIntlayer, useDictionary, useLocale } from "astro-intlayer";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
| Hook | Opis | Powiązana dokumentacja |
|
|
72
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `useIntlayer` | Pobiera słownik na podstawie klucza i zwraca zlokalizowaną treść. W sekcji frontmatter `.astro` odczytuje lokalizację z `Astro.locals`. W `<script>` klienta korzysta z magazynu klienta. | [useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useIntlayer.md) |
|
|
74
|
+
| `useDictionary` | Przetwarza obiekt słownika i zwraca treść dla ustalonej lokalizacji. Działa w frontmatter oraz skryptach klienta. | [useDictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useDictionary.md) |
|
|
75
|
+
| `useLocale` | Zwraca aktualną lokalizację, domyślną lokalizację, dostępne lokalizacje oraz funkcję do aktualizacji lokalizacji. | [useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useLocale.md) |
|
|
76
|
+
|
|
77
|
+
### Middleware (astro-intlayer/middleware)
|
|
78
|
+
|
|
79
|
+
Import:
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { onRequest } from "astro-intlayer/middleware";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
| Eksport | Typ | Opis | Powiązana dokumentacja |
|
|
86
|
+
| ----------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
87
|
+
| `onRequest` | `MiddlewareHandler` | Middleware Astro, które wykrywa lokalizację zapytania i dołącza `Astro.locals.intlayer`. Rejestrowane automatycznie przez `intlayer()` lub importowane do kompozycji. | [onRequest](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/onRequest.md) |
|
|
88
|
+
|
|
89
|
+
### Narzędzia pomocnicze
|
|
90
|
+
|
|
91
|
+
Import:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { getIntlayerLocals } from "astro-intlayer";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Funkcja | Opis | Powiązana dokumentacja |
|
|
98
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------- |
|
|
99
|
+
| `getIntlayerLocals` | Funkcja pomocnicza do pobierania obiektu `IntlayerLocals` z kontekstu zapytania poza zakresem Astro.locals. | - |
|
|
100
|
+
|
|
101
|
+
### Narzędzia klienta (astro-intlayer/client)
|
|
102
|
+
|
|
103
|
+
Import:
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import {
|
|
107
|
+
useIntlayer,
|
|
108
|
+
useDictionary,
|
|
109
|
+
useDictionaryDynamic,
|
|
110
|
+
useLocale,
|
|
111
|
+
useLocaleStorage,
|
|
112
|
+
useLocaleCookie,
|
|
113
|
+
getIntlayer,
|
|
114
|
+
getDictionary,
|
|
115
|
+
installIntlayer,
|
|
116
|
+
setLocaleInStorage,
|
|
117
|
+
setLocaleCookie,
|
|
118
|
+
localeInStorage,
|
|
119
|
+
localeCookie,
|
|
120
|
+
} from "astro-intlayer/client";
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Po zaimportowaniu w przeglądarce lub wewnątrz tagów `<script>` klienta, `astro-intlayer` automatycznie mapuje do `astro-intlayer/client` (opartego na `vanilla-intlayer`), zapewniając gettery słowników po stronie klienta, subskrypcje magazynu oraz narzędzia do utrwalania lokalizacji.
|
|
124
|
+
|
|
125
|
+
### Formatery (astro-intlayer/format)
|
|
126
|
+
|
|
127
|
+
Import:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import {
|
|
131
|
+
useIntl,
|
|
132
|
+
useDate,
|
|
133
|
+
useNumber,
|
|
134
|
+
useCurrency,
|
|
135
|
+
usePercentage,
|
|
136
|
+
useRelativeTime,
|
|
137
|
+
useList,
|
|
138
|
+
useUnit,
|
|
139
|
+
useCompact,
|
|
140
|
+
} from "astro-intlayer/format";
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| Hook | Opis |
|
|
144
|
+
| ----------------- | --------------------------------------------------------------------------------------------------------- |
|
|
145
|
+
| `useIntl` | Zwraca instancję Intl powiązaną z lokalizacją zapytania lub klienta, z obsługą pamięci podręcznej. |
|
|
146
|
+
| `useDate` | Zwraca funkcję formatowania daty powiązaną z bieżącą lokalizacją (`Intl.DateTimeFormat`). |
|
|
147
|
+
| `useNumber` | Zwraca funkcję formatowania liczb powiązaną z bieżącą lokalizacją (`Intl.NumberFormat`). |
|
|
148
|
+
| `useCurrency` | Zwraca funkcję formatowania waluty powiązaną z bieżącą lokalizacją. |
|
|
149
|
+
| `usePercentage` | Zwraca funkcję formatowania wartości procentowych powiązaną z bieżącą lokalizacją. |
|
|
150
|
+
| `useRelativeTime` | Zwraca funkcję formatowania czasu względnego powiązaną z bieżącą lokalizacją (`Intl.RelativeTimeFormat`). |
|
|
151
|
+
| `useList` | Zwraca funkcję formatowania list powiązaną z bieżącą lokalizacją (`Intl.ListFormat`). |
|
|
152
|
+
| `useUnit` | Zwraca funkcję formatowania jednostek powiązaną z bieżącą lokalizacją. |
|
|
153
|
+
| `useCompact` | Zwraca funkcję kompaktowego formatowania liczb powiązaną z bieżącą lokalizacją (np. `1.5K`). |
|
|
154
|
+
|
|
155
|
+
### Narzędzia HTML (astro-intlayer/html)
|
|
156
|
+
|
|
157
|
+
Import:
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { renderHTML, useHTML, useHTMLRenderer } from "astro-intlayer/html";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
| Eksport | Typ | Opis |
|
|
164
|
+
| ----------------- | ---------- | ------------------------------------------------------------------ |
|
|
165
|
+
| `renderHTML` | `Function` | Samodzielna funkcja narzędziowa do renderowania węzłów HTML. |
|
|
166
|
+
| `useHTML` | `Hook` | Hook do pobierania kontekstu dostawcy HTML oraz konfiguracji. |
|
|
167
|
+
| `useHTMLRenderer` | `Hook` | Hook do uzyskania wstępnie skonfigurowanej funkcji renderera HTML. |
|
|
168
|
+
|
|
169
|
+
### Narzędzia Markdown (astro-intlayer/markdown)
|
|
170
|
+
|
|
171
|
+
Import:
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import {
|
|
175
|
+
compileMarkdown,
|
|
176
|
+
renderMarkdown,
|
|
177
|
+
parseMarkdown,
|
|
178
|
+
useMarkdown,
|
|
179
|
+
useMarkdownRenderer,
|
|
180
|
+
} from "astro-intlayer/markdown";
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
| Eksport | Typ | Opis |
|
|
184
|
+
| --------------------- | ---------- | ---------------------------------------------------------------------- |
|
|
185
|
+
| `compileMarkdown` | `Function` | Kompiluje ciągi znaków markdown do postaci ustrukturyzowanej. |
|
|
186
|
+
| `renderMarkdown` | `Function` | Renderuje zawartość markdown do węzłów wyjściowych. |
|
|
187
|
+
| `parseMarkdown` | `Function` | Analizuje surową zawartość markdown do drzewa AST. |
|
|
188
|
+
| `useMarkdown` | `Hook` | Hook do pobierania kontekstu dostawcy markdown. |
|
|
189
|
+
| `useMarkdownRenderer` | `Hook` | Hook do uzyskania wstępnie skonfigurowanej funkcji renderera Markdown. |
|
|
190
|
+
|
|
191
|
+
### Typy
|
|
192
|
+
|
|
193
|
+
Import:
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import type {
|
|
197
|
+
IntlayerLocals,
|
|
198
|
+
UseLocaleProps,
|
|
199
|
+
UseLocaleResult,
|
|
200
|
+
} from "astro-intlayer";
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Typ | Opis |
|
|
204
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
205
|
+
| `IntlayerLocals` | Obiekt dołączony do `Astro.locals.intlayer` zawierający `locale`, `defaultLocale` oraz `availableLocales`. |
|
|
206
|
+
| `UseLocaleProps` | Opcjonalne właściwości konfiguracyjne akceptowane przez `useLocale()`. |
|
|
207
|
+
| `UseLocaleResult` | Typ zwracany przez `useLocale()`, zapewniający właściwości lokalizacji i metody aktualizacji. |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-21
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Dokumentacja integracji intlayer | astro-intlayer
|
|
5
|
+
description: Zobacz, jak skonfigurować i używać integracji Astro intlayer w pliku astro.config.mjs.
|
|
6
|
+
keywords:
|
|
7
|
+
- intlayer
|
|
8
|
+
- astro
|
|
9
|
+
- astro-intlayer
|
|
10
|
+
- integracja
|
|
11
|
+
- i18n
|
|
12
|
+
- Internacjonalizacja
|
|
13
|
+
- Dokumentacja
|
|
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: "Zaktualizowano dokumentację integracji o szczegóły middleware i hooków"
|
|
23
|
+
- version: 8.0.0
|
|
24
|
+
date: 2026-01-21
|
|
25
|
+
changes: "Inicjalizacja dokumentacji"
|
|
26
|
+
author: aymericzip
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Dokumentacja integracji Astro intlayer
|
|
30
|
+
|
|
31
|
+
Integracja `intlayer` dla Astro konfiguruje projekt pod kątem wielojęzyczności (i18n). Odpowiada za przygotowanie słowników w czasie kompilacji, wstrzykiwanie wtyczek Vite, automatyczną rejestrację middleware zapytań oraz generowanie wstępnie renderowanych zlokalizowanych stron.
|
|
32
|
+
|
|
33
|
+
## Użycie
|
|
34
|
+
|
|
35
|
+
Dodaj `intlayer()` do pliku `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
|
+
Polecenie codemod Astro CLI (`astro add astro-intlayer`) generuje również domyślny import, który jest obsługiwany:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import intlayer from "astro-intlayer";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Opis
|
|
53
|
+
|
|
54
|
+
Integracja podłącza się do cyklu życia kompilacji i działania Astro:
|
|
55
|
+
|
|
56
|
+
1. **Konfiguracja (`astro:config:setup`)**:
|
|
57
|
+
- **Przygotowanie słowników**: Przygotowuje słowniki Intlayer i wygenerowane typy przed rozpoczęciem kompilacji.
|
|
58
|
+
- **Wtyczki Vite**: Wstrzykuje wtyczki dla aliasów Vite (umożliwiając bezproblemowy import słowników), proxy routingu lokalizacji oraz czyszczenia kodu.
|
|
59
|
+
- **Rejestracja middleware**: Automatycznie wstrzykuje `astro-intlayer/middleware` do łańcucha middleware projektu, wypełniając `Astro.locals.intlayer` dla każdego przychodzącego zapytania.
|
|
60
|
+
2. **Zakończenie kompilacji (`astro:build:done`)**:
|
|
61
|
+
- **Przepisywanie stron**: Analizuje reguły przepisywania zlokalizowanych adresów URL i generuje wstępnie renderowane strony HTML pod odpowiednimi ścieżkami językowymi.
|
|
62
|
+
|
|
63
|
+
## Co otrzymujesz po instalacji
|
|
64
|
+
|
|
65
|
+
Po skonfigurowaniu aplikacja Astro może natychmiast korzystać z:
|
|
66
|
+
|
|
67
|
+
- Hooków `useIntlayer`, `useDictionary` oraz `useLocale` wewnątrz sekcji frontmatter komponentów `.astro`.
|
|
68
|
+
- Obiektu `Astro.locals.intlayer` w endpointach i stronach Astro.
|
|
69
|
+
- Importów po stronie klienta w blokach `<script>`, odzwierciedlających to samo API z reaktywnymi aktualizacjami.
|
|
70
|
+
- Wbudowanych formaterów w module `astro-intlayer/format` (`useDate`, `useNumber`, `useCurrency` itp.).
|
|
71
|
+
|
|
72
|
+
## Powiązana dokumentacja
|
|
73
|
+
|
|
74
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useIntlayer.md)
|
|
75
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useLocale.md)
|
|
76
|
+
- [Middleware `onRequest`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/onRequest.md)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Dokumentacja middleware onRequest | astro-intlayer
|
|
5
|
+
description: Zobacz, jak używać middleware onRequest w aplikacjach Astro do ustalania lokalizacji zapytania i uzupełniania Astro.locals.intlayer.
|
|
6
|
+
keywords:
|
|
7
|
+
- onRequest
|
|
8
|
+
- middleware
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Astro.locals
|
|
12
|
+
- Internacjonalizacja
|
|
13
|
+
- Dokumentacja
|
|
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: "Inicjalizacja dokumentacji"
|
|
23
|
+
author: aymericzip
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Dokumentacja middleware Astro onRequest
|
|
27
|
+
|
|
28
|
+
Middleware `onRequest` z modułu `astro-intlayer/middleware` określa lokalizację każdego przychodzącego zapytania HTTP i uzupełnia obiekt `Astro.locals.intlayer`.
|
|
29
|
+
|
|
30
|
+
Po zarejestrowaniu integracji `intlayer()` w pliku `astro.config.mjs`, to middleware jest wstrzykiwane automatycznie. Bezpośredni import jest wymagany tylko wtedy, gdy ręcznie komponujesz łańcuch middleware Astro za pomocą `sequence(...)`.
|
|
31
|
+
|
|
32
|
+
## Użycie
|
|
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
|
+
// Dostęp do ustalonej lokalizacji w niestandardowym middleware
|
|
40
|
+
const { locale } = context.locals.intlayer;
|
|
41
|
+
console.log(`Obsługa zapytania dla lokalizacji: ${locale}`);
|
|
42
|
+
|
|
43
|
+
return next();
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Opis
|
|
48
|
+
|
|
49
|
+
Middleware wykonuje następujące operacje:
|
|
50
|
+
|
|
51
|
+
1. **Wykrywanie lokalizacji**:
|
|
52
|
+
- **URL**: Analizuje prefiks ścieżki URL lub parametr zapytania `?locale=` (chyba że `routing.mode` ustawiono na `no-prefix`).
|
|
53
|
+
- **Ciasteczka / Nagłówki**: Sprawdza utrwalone ciasteczka lokalizacji lub wartości niestandardowych nagłówków.
|
|
54
|
+
- **Accept-Language**: Wykorzystuje preferencje językowe przeglądarki w przypadku braku wcześniejszych danych.
|
|
55
|
+
- Dla stron wstępnie renderowanych (`context.isPrerendered`) lokalizacja jest pobierana ściśle z adresu URL, co zapobiega ostrzeżeniom podczas budowania Astro.
|
|
56
|
+
2. **Wypełnianie kontekstu**: Uzupełnia `Astro.locals.intlayer` o:
|
|
57
|
+
- `locale`: Ustaloną lokalizację.
|
|
58
|
+
- `defaultLocale`: Domyślną lokalizację rezerwową.
|
|
59
|
+
- `availableLocales`: Tablicę skonfigurowanych lokalizacji.
|
|
60
|
+
3. **Zakres AsyncLocalStorage**: Obejmuje dalsze przetwarzanie zapytania zakresem `AsyncLocalStorage`, co pozwala funkcjom `useIntlayer()`, `useDictionary()` oraz `useLocale()` na dostęp do stanu zapytania bez przekazywania argumentów.
|
|
61
|
+
|
|
62
|
+
## Typ `IntlayerLocals`
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export type IntlayerLocals = {
|
|
66
|
+
locale: DeclaredLocales;
|
|
67
|
+
defaultLocale: DeclaredLocales;
|
|
68
|
+
availableLocales: DeclaredLocales[];
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Powiązana dokumentacja
|
|
73
|
+
|
|
74
|
+
- [Integracja `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/intlayer.md)
|
|
75
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useIntlayer.md)
|
|
76
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Dokumentacja hooka useDictionary | astro-intlayer
|
|
5
|
+
description: Zobacz, jak używać hooka useDictionary w komponentach i skryptach Astro do przetwarzania obiektów słowników.
|
|
6
|
+
keywords:
|
|
7
|
+
- useDictionary
|
|
8
|
+
- słownik
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacjonalizacja
|
|
14
|
+
- Dokumentacja
|
|
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: "Inicjalizacja dokumentacji"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Dokumentacja hooka useDictionary
|
|
28
|
+
|
|
29
|
+
Hook `useDictionary` przetwarza zaimportowany lub zdefiniowany w miejscu obiekt słownika i zwraca jego zawartość dla bieżącej lokalizacji w aplikacjach Astro.
|
|
30
|
+
|
|
31
|
+
W przeciwieństwie do `useIntlayer`, który pobiera słowniki według klucza z globalnego rejestru słowników, `useDictionary` operuje bezpośrednio na obiekcie słownika.
|
|
32
|
+
|
|
33
|
+
## Użycie
|
|
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
|
+
Możesz także przekazywać słowniki zdefiniowane bezpośrednio za pomocą funkcji `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
|
+
pl: "Wszelkie prawa zastrzeżone.",
|
|
61
|
+
en: "All rights reserved.",
|
|
62
|
+
fr: "Tous droits réservés.",
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
<footer>
|
|
69
|
+
<p>{footer.copyright}</p>
|
|
70
|
+
</footer>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Parametry
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
useDictionary(dictionary, localeOrSelector?)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. **`dictionary`**: Obiekt słownika lub zakwalifikowana grupa słowników.
|
|
80
|
+
2. **`localeOrSelector`** (opcjonalny): Konkretna lokalizacja lub obiekt selektora (`{ item }`, `{ variant }`, opcjonalnie z `locale`).
|
|
81
|
+
|
|
82
|
+
## Opis
|
|
83
|
+
|
|
84
|
+
Hook wykonuje następujące zadania:
|
|
85
|
+
|
|
86
|
+
1. **Wykrywanie lokalizacji**: Na serwerze pobiera lokalizację z `Astro.locals.intlayer`. W przeglądarce korzysta z lokalizacji magazynu po stronie klienta.
|
|
87
|
+
2. **Przetwarzanie treści**: Rozwiązuje tłumaczenia (`t()`), wyliczenia, warunki oraz zagnieżdżone struktury zgodnie z ustaloną lokalizacją.
|
|
88
|
+
3. **Selektory**: Stosuje selektory elementów lub wariantów dostarczone w argumentach.
|
|
89
|
+
|
|
90
|
+
## Powiązana dokumentacja
|
|
91
|
+
|
|
92
|
+
- [Integracja `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/intlayer.md)
|
|
93
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useIntlayer.md)
|
|
94
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Dokumentacja hooka useIntlayer | astro-intlayer
|
|
5
|
+
description: Zobacz, jak używać hooka useIntlayer w komponentach Astro i skryptach klienta, aby uzyskać dostęp do zlokalizowanej treści.
|
|
6
|
+
keywords:
|
|
7
|
+
- useIntlayer
|
|
8
|
+
- słownik
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacjonalizacja
|
|
14
|
+
- Dokumentacja
|
|
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: "Inicjalizacja dokumentacji"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Dokumentacja hooka useIntlayer
|
|
28
|
+
|
|
29
|
+
Hook `useIntlayer` pozwala pobierać zlokalizowaną treść słownika na podstawie klucza w aplikacjach Astro.
|
|
30
|
+
|
|
31
|
+
Może być wywoływany w dwóch różnych kontekstach za pomocą tej samej ścieżki importu:
|
|
32
|
+
|
|
33
|
+
1. **Serwer / Frontmatter**: Wewnątrz plików `.astro` automatycznie ustala treść na podstawie lokalizacji zapytania zapisanej w `Astro.locals.intlayer`.
|
|
34
|
+
2. **Przeglądarka / Skrypt klienta `<script>`**: Wewnątrz skryptów klienta lub komponentów frameworków UI korzysta z implementacji magazynu po stronie klienta (`vanilla-intlayer`).
|
|
35
|
+
|
|
36
|
+
## Użycie
|
|
37
|
+
|
|
38
|
+
### W sekcji frontmatter komponentu Astro
|
|
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
|
+
### W blokach `<script>` klienta
|
|
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
|
+
## Parametry
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
useIntlayer(key, localeOrSelector?)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
1. **`key`**: Unikalny klucz słownika (zgodnie z definicją w plikach deklaracji `.content.ts`).
|
|
82
|
+
2. **`localeOrSelector`** (opcjonalny): Konkretna lokalizacja lub obiekt selektora (`{ item }`, `{ variant }`, opcjonalnie z `locale`). Gdy zostanie podany, nadpisuje lokalizację wykrytą z kontekstu zapytania lub magazynu klienta.
|
|
83
|
+
|
|
84
|
+
## Opis
|
|
85
|
+
|
|
86
|
+
Hook wykonuje następujące zadania:
|
|
87
|
+
|
|
88
|
+
1. **Ustalanie lokalizacji**:
|
|
89
|
+
- Na serwerze odczytuje aktywną lokalizację z `Astro.locals.intlayer` za pośrednictwem zakresu `AsyncLocalStorage` zainicjowanego przez `astro-intlayer/middleware`.
|
|
90
|
+
- W przeglądarce odczytuje aktywną lokalizację z magazynu klienta.
|
|
91
|
+
2. **Pobieranie słownika**: Wstrzykuje zawartość słownika pasującą do określonego klucza.
|
|
92
|
+
3. **Przetwarzanie tłumaczeń**: Rozwiązuje tłumaczenia (`t()`), wyliczenia, warunki i markdown na gotową do wyświetlenia treść.
|
|
93
|
+
|
|
94
|
+
## Powiązana dokumentacja
|
|
95
|
+
|
|
96
|
+
- [Integracja `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/intlayer.md)
|
|
97
|
+
- [Hook `useDictionary`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useDictionary.md)
|
|
98
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Dokumentacja hooka useLocale | astro-intlayer
|
|
5
|
+
description: Zobacz, jak używać hooka useLocale w aplikacjach Astro, aby uzyskać dostęp do bieżącej lokalizacji i zarządzać nią.
|
|
6
|
+
keywords:
|
|
7
|
+
- useLocale
|
|
8
|
+
- locale
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Internacjonalizacja
|
|
14
|
+
- Dokumentacja
|
|
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: "Inicjalizacja dokumentacji"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Dokumentacja hooka useLocale
|
|
28
|
+
|
|
29
|
+
Hook `useLocale` z pakietu `astro-intlayer` zapewnia dostęp do aktualnej lokalizacji zapytania, skonfigurowanej domyślnej lokalizacji oraz wszystkich dostępnych lokalizacji w aplikacjach Astro.
|
|
30
|
+
|
|
31
|
+
Działa spójnie zarówno w sekcji frontmatter komponentów `.astro` renderowanych na serwerze, jak i w blokach skryptów klienta `<script>`.
|
|
32
|
+
|
|
33
|
+
## Użycie
|
|
34
|
+
|
|
35
|
+
### W sekcji frontmatter komponentu (renderowanie na serwerze)
|
|
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>Bieżący: {locale}</span>
|
|
55
|
+
<span>Domyślny: {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
|
+
### W skrypcie klienta `<script>` (interaktywność)
|
|
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
|
+
## Zwracane wartości
|
|
106
|
+
|
|
107
|
+
Hook zwraca obiekt typu `UseLocaleResult`:
|
|
108
|
+
|
|
109
|
+
| Właściwość | Typ | Opis |
|
|
110
|
+
| ------------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
111
|
+
| `locale` | `DeclaredLocales` | Aktywna lokalizacja. |
|
|
112
|
+
| `defaultLocale` | `DeclaredLocales` | Domyślna lokalizacja rezerwowa skonfigurowana w `intlayer.config.ts`. |
|
|
113
|
+
| `availableLocales` | `DeclaredLocales[]` | Tablica wszystkich obsługiwanych lokalizacji skonfigurowanych w projekcie. |
|
|
114
|
+
| `setLocale` | `(locale: LocalesValues) => void` | Funkcja do aktualizacji lokalizacji. (Interaktywna w `<script>` klienta, wyświetla ostrzeżenie podczas SSR). |
|
|
115
|
+
| `subscribe` | `(callback: () => void) => () => void` | Subskrybuje zmiany lokalizacji po stronie klienta. |
|
|
116
|
+
|
|
117
|
+
## Zachowanie na serwerze a na kliencie
|
|
118
|
+
|
|
119
|
+
- **Podczas SSR / renderowania na serwerze**: Zapytanie jest renderowane jednokrotnie ze stałymi parametrami. Wywołanie `setLocale()` podczas renderowania na serwerze nie przynosi efektu i generuje ostrzeżenie; przełączanie lokalizacji powinno odbywać się po stronie klienta lub poprzez przejście pod adres URL z odpowiednią lokalizacją.
|
|
120
|
+
- **W skryptach klienta**: `setLocale` aktualizuje magazyn klienta oraz zapisane ciasteczka lub pamięć lokalną zgodnie z konfiguracją Intlayer.
|
|
121
|
+
|
|
122
|
+
## Powiązana dokumentacja
|
|
123
|
+
|
|
124
|
+
- [Integracja `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/intlayer.md)
|
|
125
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useIntlayer.md)
|
|
126
|
+
- [Hook `useDictionary`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/astro-intlayer/useDictionary.md)
|