@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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-04-18
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-09-20
|
|
4
4
|
title: "Vite + Vue i18n - Hướng dẫn đầy đủ để dịch ứng dụng của bạn"
|
|
5
5
|
description: "Không còn i18next nữa. Hướng dẫn 2026 để xây dựng ứng dụng Vite + Vue đa ngôn ngữ (i18n). Dịch với các AI agent và tối ưu hóa kích thước bundle, SEO và hiệu suất."
|
|
6
6
|
keywords:
|
|
@@ -982,8 +982,14 @@ bun x intlayer extract
|
|
|
982
982
|
</Tab>
|
|
983
983
|
<Tab value='Trình biên dịch Babel'>
|
|
984
984
|
|
|
985
|
+
<Tabs>
|
|
986
|
+
<Tab value='intlayer >= 9'>
|
|
987
|
+
|
|
985
988
|
> Since v9, the `intlayerCompiler` is included in the `intlayer` plugin. So you don't need to add it manually.
|
|
986
989
|
|
|
990
|
+
</Tab>
|
|
991
|
+
<Tab value='intlayer < 9'>
|
|
992
|
+
|
|
987
993
|
Cập nhật `vite.config.ts` của bạn để bao gồm plugin `intlayerCompiler`:
|
|
988
994
|
|
|
989
995
|
```ts fileName="vite.config.ts"
|
|
@@ -998,6 +1004,11 @@ export default defineConfig({
|
|
|
998
1004
|
});
|
|
999
1005
|
```
|
|
1000
1006
|
|
|
1007
|
+
</Tab>
|
|
1008
|
+
</Tabs>
|
|
1009
|
+
|
|
1010
|
+
Build ứng dụng của bạn để chuyển đổi các thành phần và trích xuất nội dung
|
|
1011
|
+
|
|
1001
1012
|
```bash packageManager="npm"
|
|
1002
1013
|
npm run build # Hoặc npm run dev
|
|
1003
1014
|
```
|
|
@@ -1054,7 +1065,9 @@ const pathList = [
|
|
|
1054
1065
|
{ path: "/about", changefreq: "monthly", priority: 0.7 },
|
|
1055
1066
|
];
|
|
1056
1067
|
|
|
1057
|
-
const sitemapXml = generateSitemap(pathList, {
|
|
1068
|
+
const sitemapXml = generateSitemap(pathList, {
|
|
1069
|
+
siteUrl: "https://example.com",
|
|
1070
|
+
});
|
|
1058
1071
|
fs.writeFileSync(path.join(__dirname, "public", "sitemap.xml"), sitemapXml);
|
|
1059
1072
|
|
|
1060
1073
|
const getAllMultilingualUrls = (urls) =>
|
|
@@ -1067,7 +1080,7 @@ const robotsTxt = [
|
|
|
1067
1080
|
"Allow: /",
|
|
1068
1081
|
...disallowedPaths.map((path) => `Disallow: ${path}`),
|
|
1069
1082
|
"",
|
|
1070
|
-
`Sitemap:
|
|
1083
|
+
`Sitemap: https://example.com/sitemap.xml`,
|
|
1071
1084
|
].join("\n");
|
|
1072
1085
|
|
|
1073
1086
|
fs.writeFileSync(path.join(__dirname, "public", "robots.txt"), robotsTxt);
|
package/docs/vi/introduction.md
CHANGED
|
@@ -189,7 +189,6 @@ Chúng tôi đã xây dựng Intlayer với tính linh hoạt cao, cung cấp kh
|
|
|
189
189
|
- **[Intlayer với Astro + Solid](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_astro_solid.md)**
|
|
190
190
|
- **[Intlayer với Astro + Preact](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_astro_preact.md)**
|
|
191
191
|
- **[Intlayer với Astro + Lit](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_astro_lit.md)**
|
|
192
|
-
- **[Intlayer với Astro + Vanilla JS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_astro_vanilla.md)**
|
|
193
192
|
- **[Intlayer với Vite + Vue](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_vite+vue.md)**
|
|
194
193
|
- **[Intlayer với Nuxt](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_nuxt.md)**
|
|
195
194
|
- **[Intlayer với Vite + Svelte](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_with_vite+svelte.md)**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-21
|
|
3
|
-
updatedAt: 2026-
|
|
4
|
-
title: Tài liệu
|
|
5
|
-
description: Tích hợp Astro cho Intlayer, cung cấp cấu hình
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Tài liệu Gói astro-intlayer
|
|
5
|
+
description: Tích hợp Astro cho Intlayer, cung cấp cấu hình định tuyến theo ngôn ngữ, middleware, hooks, client store và quản lý từ điển.
|
|
6
6
|
keywords:
|
|
7
7
|
- astro-intlayer
|
|
8
8
|
- astro
|
|
9
|
-
-
|
|
9
|
+
- quốc tế hóa
|
|
10
10
|
- i18n
|
|
11
11
|
slugs:
|
|
12
12
|
- doc
|
|
@@ -14,15 +14,18 @@ slugs:
|
|
|
14
14
|
- astro-intlayer
|
|
15
15
|
- exports
|
|
16
16
|
history:
|
|
17
|
+
- version: 9.5.5
|
|
18
|
+
date: 2026-09-19
|
|
19
|
+
changes: "Thêm tài liệu cho useIntlayer, useDictionary, useLocale hooks, middleware và formatters"
|
|
17
20
|
- version: 8.0.0
|
|
18
21
|
date: 2026-01-21
|
|
19
|
-
changes: "Hợp nhất tài liệu cho tất cả các
|
|
22
|
+
changes: "Hợp nhất tài liệu cho tất cả các bản xuất"
|
|
20
23
|
author: aymericzip
|
|
21
24
|
---
|
|
22
25
|
|
|
23
26
|
# Gói astro-intlayer
|
|
24
27
|
|
|
25
|
-
Gói `astro-intlayer` cung cấp các công cụ cần thiết để tích hợp Intlayer vào các ứng dụng Astro. Nó cấu hình định tuyến
|
|
28
|
+
Gói `astro-intlayer` cung cấp các công cụ cần thiết để tích hợp Intlayer vào các ứng dụng Astro. Nó cấu hình định tuyến dựa trên ngôn ngữ, quản lý từ điển, viết lại trang trong quá trình build, middleware xử lý yêu cầu và các hook để truy cập nội dung đa ngôn ngữ trên cả các thành phần `.astro` được render trên máy chủ và các script phía client.
|
|
26
29
|
|
|
27
30
|
## Cài đặt
|
|
28
31
|
|
|
@@ -30,26 +33,175 @@ Gói `astro-intlayer` cung cấp các công cụ cần thiết để tích hợp
|
|
|
30
33
|
npm install astro-intlayer
|
|
31
34
|
```
|
|
32
35
|
|
|
33
|
-
## Các
|
|
36
|
+
## Các bản xuất (Exports)
|
|
34
37
|
|
|
35
|
-
### Tích hợp
|
|
38
|
+
### Tích hợp (Integration)
|
|
36
39
|
|
|
37
|
-
Gói `astro-intlayer` cung cấp
|
|
40
|
+
Gói `astro-intlayer` cung cấp tích hợp Astro để thiết lập Intlayer trong dự án của bạn.
|
|
38
41
|
|
|
39
|
-
Nhập:
|
|
42
|
+
Nhập (Import):
|
|
40
43
|
|
|
41
44
|
```tsx
|
|
42
|
-
import "astro-intlayer";
|
|
45
|
+
import { intlayer } from "astro-intlayer";
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
hoặc
|
|
48
|
+
hoặc nhập mặc định trong `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
|
-
| Hàm | Mô tả
|
|
54
|
-
| ---------- |
|
|
55
|
-
| `intlayer` |
|
|
59
|
+
| Hàm | Mô tả | Tài liệu liên quan |
|
|
60
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| `intlayer` | Tích hợp Astro chuẩn bị từ điển, cấu hình plugin Vite (alias, proxy định tuyến, cắt tỉa mã build), tự động đăng ký middleware yêu cầu và xuất các trang prerender tại các URL được bản địa hóa. | [intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/intlayer.md) |
|
|
62
|
+
|
|
63
|
+
### Hooks (Máy chủ & Client)
|
|
64
|
+
|
|
65
|
+
Nhập (Import):
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { useIntlayer, useDictionary, useLocale } from "astro-intlayer";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
| Hook | Mô tả | Tài liệu liên quan |
|
|
72
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `useIntlayer` | Chọn một từ điển theo khóa và trả về nội dung được bản địa hóa. Trong frontmatter `.astro`, nó đọc ngôn ngữ từ `Astro.locals`. Trong `<script>` client, nó đọc từ store của client. | [useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useIntlayer.md) |
|
|
74
|
+
| `useDictionary` | Chuyển đổi một đối tượng từ điển và trả về nội dung cho ngôn ngữ đã giải quyết. Hoạt động trong frontmatter và script phía client. | [useDictionary](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useDictionary.md) |
|
|
75
|
+
| `useLocale` | Trả về ngôn ngữ hiện tại, ngôn ngữ mặc định, danh sách các ngôn ngữ khả dụng và hàm để cập nhật ngôn ngữ. | [useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useLocale.md) |
|
|
76
|
+
|
|
77
|
+
### Middleware (astro-intlayer/middleware)
|
|
78
|
+
|
|
79
|
+
Nhập (Import):
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { onRequest } from "astro-intlayer/middleware";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
| Bản xuất | Kiểu | Mô tả | Tài liệu liên quan |
|
|
86
|
+
| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
87
|
+
| `onRequest` | `MiddlewareHandler` | Middleware của Astro phát hiện ngôn ngữ của yêu cầu và gán vào `Astro.locals.intlayer`. Được đăng ký tự động bởi `intlayer()` hoặc được nhập thủ công. | [onRequest](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/onRequest.md) |
|
|
88
|
+
|
|
89
|
+
### Tiện ích (Utilities)
|
|
90
|
+
|
|
91
|
+
Nhập (Import):
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { getIntlayerLocals } from "astro-intlayer";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Hàm | Mô tả | Tài liệu liên quan |
|
|
98
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------- | ------------------ |
|
|
99
|
+
| `getIntlayerLocals` | Hàm hỗ trợ lấy đối tượng `IntlayerLocals` hiện tại từ phạm vi lưu trữ yêu cầu bên ngoài Astro.locals. | - |
|
|
100
|
+
|
|
101
|
+
### Tiện ích Client (astro-intlayer/client)
|
|
102
|
+
|
|
103
|
+
Nhập (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
|
+
Khi được nhập trong trình duyệt hoặc bên trong thẻ `<script>` của client, `astro-intlayer` tự động ánh xạ tới `astro-intlayer/client` (được cung cấp bởi `vanilla-intlayer`), cung cấp các hàm lấy từ điển phía client, bộ lắng nghe store và các công cụ lưu trữ ngôn ngữ.
|
|
124
|
+
|
|
125
|
+
### Trình định dạng (astro-intlayer/format)
|
|
126
|
+
|
|
127
|
+
Nhập (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 | Mô tả |
|
|
144
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
145
|
+
| `useIntl` | Trả về một phiên bản Intl gắn liền với ngôn ngữ yêu cầu hoặc client với khả năng lưu vào bộ nhớ cache. |
|
|
146
|
+
| `useDate` | Trả về hàm định dạng ngày tháng được liên kết sẵn với ngôn ngữ hiện tại (`Intl.DateTimeFormat`). |
|
|
147
|
+
| `useNumber` | Trả về hàm định dạng số được liên kết sẵn với ngôn ngữ hiện tại (`Intl.NumberFormat`). |
|
|
148
|
+
| `useCurrency` | Trả về hàm định dạng tiền tệ được liên kết sẵn với ngôn ngữ hiện tại. |
|
|
149
|
+
| `usePercentage` | Trả về hàm định dạng phần trăm được liên kết sẵn với ngôn ngữ hiện tại. |
|
|
150
|
+
| `useRelativeTime` | Trả về hàm định dạng thời gian tương đối được liên kết sẵn với ngôn ngữ hiện tại (`Intl.RelativeTimeFormat`). |
|
|
151
|
+
| `useList` | Trả về hàm định dạng danh sách được liên kết sẵn với ngôn ngữ hiện tại (`Intl.ListFormat`). |
|
|
152
|
+
| `useUnit` | Trả về hàm định dạng đơn vị đo lường được liên kết sẵn với ngôn ngữ hiện tại. |
|
|
153
|
+
| `useCompact` | Trả về hàm định dạng số thu gọn được liên kết sẵn với ngôn ngữ hiện tại (ví dụ: `1.5K`). |
|
|
154
|
+
|
|
155
|
+
### Tiện ích HTML (astro-intlayer/html)
|
|
156
|
+
|
|
157
|
+
Nhập (Import):
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { renderHTML, useHTML, useHTMLRenderer } from "astro-intlayer/html";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
| Bản xuất | Kiểu | Mô tả |
|
|
164
|
+
| ----------------- | ---------- | --------------------------------------------------- |
|
|
165
|
+
| `renderHTML` | `Function` | Hàm tiện ích độc lập để render các nút HTML. |
|
|
166
|
+
| `useHTML` | `Hook` | Hook để lấy context nhà cung cấp HTML và cấu hình. |
|
|
167
|
+
| `useHTMLRenderer` | `Hook` | Hook để lấy hàm render HTML đã được cấu hình trước. |
|
|
168
|
+
|
|
169
|
+
### Tiện ích Markdown (astro-intlayer/markdown)
|
|
170
|
+
|
|
171
|
+
Nhập (Import):
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import {
|
|
175
|
+
compileMarkdown,
|
|
176
|
+
renderMarkdown,
|
|
177
|
+
parseMarkdown,
|
|
178
|
+
useMarkdown,
|
|
179
|
+
useMarkdownRenderer,
|
|
180
|
+
} from "astro-intlayer/markdown";
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
| Bản xuất | Kiểu | Mô tả |
|
|
184
|
+
| --------------------- | ---------- | ---------------------------------------------------------- |
|
|
185
|
+
| `compileMarkdown` | `Function` | Biên dịch chuỗi markdown thành cấu trúc phân tích cú pháp. |
|
|
186
|
+
| `renderMarkdown` | `Function` | Render nội dung markdown thành các nút đầu ra. |
|
|
187
|
+
| `parseMarkdown` | `Function` | Phân tích cú pháp nội dung markdown thô thành AST. |
|
|
188
|
+
| `useMarkdown` | `Hook` | Hook để lấy context nhà cung cấp markdown. |
|
|
189
|
+
| `useMarkdownRenderer` | `Hook` | Hook để lấy hàm render Markdown đã được cấu hình trước. |
|
|
190
|
+
|
|
191
|
+
### Kiểu dữ liệu (Types)
|
|
192
|
+
|
|
193
|
+
Nhập (Import):
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import type {
|
|
197
|
+
IntlayerLocals,
|
|
198
|
+
UseLocaleProps,
|
|
199
|
+
UseLocaleResult,
|
|
200
|
+
} from "astro-intlayer";
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Kiểu | Mô tả |
|
|
204
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------- |
|
|
205
|
+
| `IntlayerLocals` | Đối tượng được gắn vào `Astro.locals.intlayer` chứa `locale`, `defaultLocale` và `availableLocales`. |
|
|
206
|
+
| `UseLocaleProps` | Các thuộc tính cấu hình tùy chọn được chấp nhận bởi `useLocale()`. |
|
|
207
|
+
| `UseLocaleResult` | Kiểu trả về của `useLocale()`, cung cấp các thuộc tính ngôn ngữ và các phương thức cập nhật. |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-21
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Tài liệu Tích hợp intlayer | astro-intlayer
|
|
5
|
+
description: Xem cách cấu hình và sử dụng tích hợp Astro intlayer trong tệp astro.config.mjs.
|
|
6
|
+
keywords:
|
|
7
|
+
- intlayer
|
|
8
|
+
- astro
|
|
9
|
+
- astro-intlayer
|
|
10
|
+
- tích hợp
|
|
11
|
+
- i18n
|
|
12
|
+
- Quốc tế hóa
|
|
13
|
+
- Tài liệu
|
|
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: "Cập nhật tài liệu tích hợp với thông tin chi tiết về middleware và hooks"
|
|
23
|
+
- version: 8.0.0
|
|
24
|
+
date: 2026-01-21
|
|
25
|
+
changes: "Khởi tạo tài liệu"
|
|
26
|
+
author: aymericzip
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Tài liệu Tích hợp Astro intlayer
|
|
30
|
+
|
|
31
|
+
Tích hợp `intlayer` cho Astro cấu hình dự án của bạn cho việc quốc tế hóa đa ngôn ngữ (i18n). Nó xử lý việc chuẩn bị từ điển tại thời điểm build, đưa vào các plugin Vite, tự động đăng ký middleware yêu cầu và xuất các trang prerender được bản địa hóa.
|
|
32
|
+
|
|
33
|
+
## Cách sử dụng
|
|
34
|
+
|
|
35
|
+
Thêm `intlayer()` vào tệp `astro.config.mjs` của bạn:
|
|
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
|
+
Lệnh codemod của Astro CLI (`astro add astro-intlayer`) cũng tạo ra import mặc định được hỗ trợ:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import intlayer from "astro-intlayer";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Mô tả chi tiết
|
|
53
|
+
|
|
54
|
+
Tích hợp móc nối vào vòng đời build và runtime của Astro:
|
|
55
|
+
|
|
56
|
+
1. **Thiết lập cấu hình (`astro:config:setup`)**:
|
|
57
|
+
- **Chuẩn bị từ điển**: Chuẩn bị các từ điển Intlayer và các kiểu được tạo trước khi quá trình build chạy.
|
|
58
|
+
- **Các plugin Vite**: Đưa vào các plugin cho alias của Vite (cho phép import từ điển liền mạch), proxy định tuyến ngôn ngữ và cắt tỉa mã nguồn khi build.
|
|
59
|
+
- **Đăng ký Middleware**: Tự động đưa `astro-intlayer/middleware` vào chuỗi middleware của dự án, điền thông tin vào `Astro.locals.intlayer` trên mỗi yêu cầu đến.
|
|
60
|
+
2. **Hoàn tất Build (`astro:build:done`)**:
|
|
61
|
+
- **Viết lại trang**: Kiểm tra các quy tắc viết lại URL theo ngôn ngữ và tạo ra các trang HTML được prerender tại các đường dẫn ngôn ngữ tương ứng.
|
|
62
|
+
|
|
63
|
+
## Những gì được cung cấp sẵn
|
|
64
|
+
|
|
65
|
+
Sau khi cấu hình, ứng dụng Astro của bạn có thể sử dụng ngay:
|
|
66
|
+
|
|
67
|
+
- Các hook `useIntlayer`, `useDictionary` và `useLocale` bên trong frontmatter của thành phần `.astro`.
|
|
68
|
+
- Đối tượng `Astro.locals.intlayer` trong các endpoint và trang Astro.
|
|
69
|
+
- Các bản import phía client trong các khối `<script>` phản ánh cùng một API với các cập nhật phản ứng.
|
|
70
|
+
- Các bộ định dạng tích hợp sẵn trong `astro-intlayer/format` (`useDate`, `useNumber`, `useCurrency`, v.v.).
|
|
71
|
+
|
|
72
|
+
## Tài liệu liên quan
|
|
73
|
+
|
|
74
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useIntlayer.md)
|
|
75
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useLocale.md)
|
|
76
|
+
- [Middleware `onRequest`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/onRequest.md)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Tài liệu Middleware onRequest | astro-intlayer
|
|
5
|
+
description: Xem cách sử dụng middleware onRequest trong các ứng dụng Astro để giải quyết ngôn ngữ yêu cầu và điền vào Astro.locals.intlayer.
|
|
6
|
+
keywords:
|
|
7
|
+
- onRequest
|
|
8
|
+
- middleware
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Astro.locals
|
|
12
|
+
- Quốc tế hóa
|
|
13
|
+
- Tài liệu
|
|
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: "Khởi tạo tài liệu"
|
|
23
|
+
author: aymericzip
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Tài liệu Middleware Astro onRequest
|
|
27
|
+
|
|
28
|
+
Middleware `onRequest` từ `astro-intlayer/middleware` giải quyết ngôn ngữ của mỗi yêu cầu HTTP đến và điền vào `Astro.locals.intlayer`.
|
|
29
|
+
|
|
30
|
+
Khi bạn đăng ký tích hợp `intlayer()` trong `astro.config.mjs`, middleware này sẽ được tự động đưa vào. Bạn chỉ cần nhập trực tiếp nếu bạn đang kết hợp thủ công middleware của Astro bằng `sequence(...)`.
|
|
31
|
+
|
|
32
|
+
## Cách sử dụng
|
|
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
|
+
// Truy cập ngôn ngữ đã được giải quyết trong middleware tùy chỉnh của bạn
|
|
40
|
+
const { locale } = context.locals.intlayer;
|
|
41
|
+
console.log(`Xử lý yêu cầu cho ngôn ngữ: ${locale}`);
|
|
42
|
+
|
|
43
|
+
return next();
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Mô tả chi tiết
|
|
48
|
+
|
|
49
|
+
Middleware thực hiện các tác vụ sau:
|
|
50
|
+
|
|
51
|
+
1. **Phát hiện ngôn ngữ**:
|
|
52
|
+
- **URL**: Phân tích tiền tố đường dẫn URL hoặc tham số truy vấn `?locale=` (trừ khi `routing.mode` được đặt thành `no-prefix`).
|
|
53
|
+
- **Cookies / Headers**: Kiểm tra cookie ngôn ngữ đã lưu hoặc giá trị header tùy chỉnh.
|
|
54
|
+
- **Accept-Language**: Sử dụng tùy chọn ngôn ngữ của trình duyệt nếu không tìm thấy cài đặt trước đó.
|
|
55
|
+
- Đối với các trang được prerender (`context.isPrerendered`), ngôn ngữ được trích xuất nghiêm ngặt từ URL để tránh cảnh báo khi build trong Astro.
|
|
56
|
+
2. **Điền Context**: Điền vào `Astro.locals.intlayer` với:
|
|
57
|
+
- `locale`: Ngôn ngữ đã được giải quyết.
|
|
58
|
+
- `defaultLocale`: Ngôn ngữ dự phòng mặc định.
|
|
59
|
+
- `availableLocales`: Mảng các ngôn ngữ đã được cấu hình.
|
|
60
|
+
3. **Phạm vi AsyncLocalStorage**: Bao bọc quá trình xử lý yêu cầu tiếp theo trong phạm vi `AsyncLocalStorage`, cho phép `useIntlayer()`, `useDictionary()` và `useLocale()` truy cập trạng thái yêu cầu mà không cần truyền tham số.
|
|
61
|
+
|
|
62
|
+
## Kiểu `IntlayerLocals`
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export type IntlayerLocals = {
|
|
66
|
+
locale: DeclaredLocales;
|
|
67
|
+
defaultLocale: DeclaredLocales;
|
|
68
|
+
availableLocales: DeclaredLocales[];
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Tài liệu liên quan
|
|
73
|
+
|
|
74
|
+
- [Tích hợp `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/intlayer.md)
|
|
75
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useIntlayer.md)
|
|
76
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Tài liệu Hook useDictionary | astro-intlayer
|
|
5
|
+
description: Xem cách sử dụng hook useDictionary trong các thành phần và script Astro để giải quyết các đối tượng từ điển.
|
|
6
|
+
keywords:
|
|
7
|
+
- useDictionary
|
|
8
|
+
- từ điển
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Quốc tế hóa
|
|
14
|
+
- Tài liệu
|
|
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: "Khởi tạo tài liệu"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Tài liệu Hook useDictionary
|
|
28
|
+
|
|
29
|
+
Hook `useDictionary` giải quyết một đối tượng từ điển được nhập hoặc định nghĩa inline và trả về nội dung của nó cho ngôn ngữ hiện tại trong các ứng dụng Astro.
|
|
30
|
+
|
|
31
|
+
Không giống như `useIntlayer`, lấy từ điển theo khóa từ sổ đăng ký từ điển toàn cục, `useDictionary` hoạt động trực tiếp với một đối tượng từ điển.
|
|
32
|
+
|
|
33
|
+
## Cách sử dụng
|
|
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
|
+
Bạn cũng có thể truyền các từ điển inline được định nghĩa bằng `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
|
+
vi: "Đã đăng ký bản quyền.",
|
|
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
|
+
## Tham số
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
useDictionary(dictionary, localeOrSelector?)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. **`dictionary`**: Một đối tượng từ điển hoặc nhóm từ điển đủ điều kiện.
|
|
80
|
+
2. **`localeOrSelector`** (tùy chọn): Một ngôn ngữ cụ thể hoặc đối tượng bộ chọn (`{ item }`, `{ variant }`, tùy chọn với `locale`).
|
|
81
|
+
|
|
82
|
+
## Mô tả chi tiết
|
|
83
|
+
|
|
84
|
+
Hook thực hiện các nhiệm vụ sau:
|
|
85
|
+
|
|
86
|
+
1. **Phát hiện ngôn ngữ**: Trên máy chủ, nó lấy ngôn ngữ từ `Astro.locals.intlayer`. Trong trình duyệt, nó sử dụng ngôn ngữ trong store của client.
|
|
87
|
+
2. **Xử lý nội dung**: Giải quyết các bản dịch (`t()`), phép liệt kê, điều kiện và các cấu trúc lồng nhau theo ngôn ngữ đã được giải quyết.
|
|
88
|
+
3. **Bộ chọn**: Áp dụng bất kỳ bộ chọn mục hoặc biến thể nào được cung cấp trong đối số.
|
|
89
|
+
|
|
90
|
+
## Tài liệu liên quan
|
|
91
|
+
|
|
92
|
+
- [Tích hợp `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/intlayer.md)
|
|
93
|
+
- [Hook `useIntlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useIntlayer.md)
|
|
94
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useLocale.md)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-09-19
|
|
3
|
+
updatedAt: 2026-09-19
|
|
4
|
+
title: Tài liệu Hook useIntlayer | astro-intlayer
|
|
5
|
+
description: Xem cách sử dụng hook useIntlayer trong các thành phần Astro và script client để truy cập nội dung được bản địa hóa.
|
|
6
|
+
keywords:
|
|
7
|
+
- useIntlayer
|
|
8
|
+
- từ điển
|
|
9
|
+
- astro
|
|
10
|
+
- astro-intlayer
|
|
11
|
+
- Intlayer
|
|
12
|
+
- intlayer
|
|
13
|
+
- Quốc tế hóa
|
|
14
|
+
- Tài liệu
|
|
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: "Khởi tạo tài liệu"
|
|
24
|
+
author: aymericzip
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Tài liệu Hook useIntlayer
|
|
28
|
+
|
|
29
|
+
Hook `useIntlayer` cho phép bạn truy xuất nội dung từ điển được bản địa hóa theo khóa trong các ứng dụng Astro.
|
|
30
|
+
|
|
31
|
+
Nó có thể được gọi trong hai ngữ cảnh riêng biệt bằng cùng một đường dẫn nhập:
|
|
32
|
+
|
|
33
|
+
1. **Máy chủ / Frontmatter**: Bên trong các tệp `.astro`, nó tự động phân giải nội dung bằng ngôn ngữ yêu cầu được lưu trữ trong `Astro.locals.intlayer`.
|
|
34
|
+
2. **Trình duyệt / Script Client `<script>`**: Bên trong các script client hoặc các thành phần framework UI, nó phân giải sang triển khai store phía client (`vanilla-intlayer`).
|
|
35
|
+
|
|
36
|
+
## Cách sử dụng
|
|
37
|
+
|
|
38
|
+
### Trong Frontmatter của Thành phần 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
|
+
### Trong các khối `<script>` của Client
|
|
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
|
+
## Tham số
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
useIntlayer(key, localeOrSelector?)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
1. **`key`**: Khóa duy nhất của từ điển (như được định nghĩa trong các tệp khai báo `.content.ts` của bạn).
|
|
82
|
+
2. **`localeOrSelector`** (tùy chọn): Một ngôn ngữ cụ thể hoặc đối tượng bộ chọn (`{ item }`, `{ variant }`, tùy chọn với `locale`). Khi được cung cấp, nó sẽ ghi đè ngôn ngữ được phát hiện từ ngữ cảnh yêu cầu hoặc store client.
|
|
83
|
+
|
|
84
|
+
## Mô tả chi tiết
|
|
85
|
+
|
|
86
|
+
Hook thực hiện các nhiệm vụ sau:
|
|
87
|
+
|
|
88
|
+
1. **Giải quyết ngôn ngữ**:
|
|
89
|
+
- Trên máy chủ, đọc ngôn ngữ hoạt động từ `Astro.locals.intlayer` thông qua phạm vi `AsyncLocalStorage` được khởi tạo bởi `astro-intlayer/middleware`.
|
|
90
|
+
- Trong trình duyệt, đọc ngôn ngữ hoạt động từ bộ nhớ hoặc store của client.
|
|
91
|
+
2. **Truy xuất từ điển**: Đưa vào nội dung từ điển khớp với khóa đã chỉ định.
|
|
92
|
+
3. **Xử lý bản dịch**: Giải quyết các bản dịch (`t()`), phép liệt kê, điều kiện và markdown thành nội dung sẵn sàng hiển thị.
|
|
93
|
+
|
|
94
|
+
## Tài liệu liên quan
|
|
95
|
+
|
|
96
|
+
- [Tích hợp `intlayer`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/intlayer.md)
|
|
97
|
+
- [Hook `useDictionary`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useDictionary.md)
|
|
98
|
+
- [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/astro-intlayer/useLocale.md)
|