@intlayer/docs 8.7.7 → 8.7.8
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/blog/ar/i18n_using_next-i18next.md +1 -1
- package/blog/ar/i18n_using_next-intl.md +1 -1
- package/blog/ar/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/de/i18n_using_next-i18next.md +1 -1
- package/blog/de/i18n_using_next-intl.md +1 -1
- package/blog/de/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/en/i18n_using_next-i18next.md +1 -1
- package/blog/en/i18n_using_next-intl.md +1 -1
- package/blog/en/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/en-GB/i18n_using_next-i18next.md +1 -1
- package/blog/en-GB/i18n_using_next-intl.md +1 -1
- package/blog/en-GB/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/es/i18n_using_next-i18next.md +1 -1
- package/blog/es/i18n_using_next-intl.md +1 -1
- package/blog/es/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/fr/i18n_using_next-i18next.md +1 -1
- package/blog/fr/i18n_using_next-intl.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/hi/i18n_using_next-i18next.md +1 -1
- package/blog/hi/i18n_using_next-intl.md +1 -1
- package/blog/hi/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/id/i18n_using_next-i18next.md +1 -1
- package/blog/id/i18n_using_next-intl.md +1 -1
- package/blog/it/i18n_using_next-i18next.md +1 -1
- package/blog/it/i18n_using_next-intl.md +1 -1
- package/blog/it/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/ja/i18n_using_next-i18next.md +1 -1
- package/blog/ja/i18n_using_next-intl.md +1 -1
- package/blog/ko/i18n_using_next-i18next.md +1 -1
- package/blog/ko/i18n_using_next-intl.md +1 -1
- package/blog/pl/i18n_using_next-i18next.md +1 -1
- package/blog/pl/i18n_using_next-intl.md +1 -1
- package/blog/pt/i18n_using_next-i18next.md +1 -1
- package/blog/pt/i18n_using_next-intl.md +1 -1
- package/blog/pt/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/ru/i18n_using_next-i18next.md +1 -1
- package/blog/ru/i18n_using_next-intl.md +1 -1
- package/blog/ru/list_i18n_technologies/frameworks/react-native.md +0 -4
- package/blog/tr/i18n_using_next-i18next.md +1 -1
- package/blog/tr/i18n_using_next-intl.md +1 -1
- package/blog/uk/i18n_using_next-i18next.md +1 -1
- package/blog/uk/i18n_using_next-intl.md +1 -1
- package/blog/vi/i18n_using_next-i18next.md +1 -1
- package/blog/vi/i18n_using_next-intl.md +1 -1
- package/blog/zh/i18n_using_next-i18next.md +1 -1
- package/blog/zh/i18n_using_next-intl.md +1 -1
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +140 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +140 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/common.d.ts +1 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +7 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/dictionary/condition.md +2 -116
- package/docs/ar/dictionary/content_file.md +2 -202
- package/docs/ar/dictionary/enumeration.md +2 -116
- package/docs/ar/dictionary/file.md +3 -103
- package/docs/ar/dictionary/function_fetching.md +3 -105
- package/docs/ar/dictionary/gender.md +2 -140
- package/docs/ar/dictionary/insertion.md +3 -57
- package/docs/ar/dictionary/nesting.md +3 -121
- package/docs/ar/dictionary/translation.md +4 -146
- package/docs/ar/interest_of_intlayer.md +2 -59
- package/docs/ar/intlayer_CMS.md +3 -228
- package/docs/ar/intlayer_visual_editor.md +1 -72
- package/docs/ar/intlayer_with_adonisjs.md +3 -109
- package/docs/ar/intlayer_with_analog.md +21 -41
- package/docs/ar/intlayer_with_angular.md +15 -41
- package/docs/ar/intlayer_with_astro.md +187 -58
- package/docs/ar/intlayer_with_astro_lit.md +619 -0
- package/docs/ar/intlayer_with_astro_preact.md +568 -0
- package/docs/ar/intlayer_with_astro_react.md +566 -0
- package/docs/ar/intlayer_with_astro_solid.md +566 -0
- package/docs/ar/intlayer_with_astro_svelte.md +570 -0
- package/docs/ar/intlayer_with_astro_vanilla.md +547 -0
- package/docs/ar/intlayer_with_astro_vue.md +588 -0
- package/docs/ar/intlayer_with_create_react_app.md +8 -388
- package/docs/ar/intlayer_with_express.md +5 -177
- package/docs/ar/intlayer_with_fastify.md +5 -193
- package/docs/ar/intlayer_with_hono.md +2 -2
- package/docs/ar/intlayer_with_lynx+react.md +2 -116
- package/docs/ar/intlayer_with_nestjs.md +3 -33
- package/docs/ar/intlayer_with_nextjs_14.md +58 -491
- package/docs/ar/intlayer_with_nextjs_15.md +56 -815
- package/docs/ar/intlayer_with_nextjs_16.md +40 -883
- package/docs/ar/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +12 -506
- package/docs/ar/intlayer_with_nextjs_page_router.md +37 -652
- package/docs/ar/intlayer_with_nuxt.md +16 -98
- package/docs/ar/intlayer_with_react_native+expo.md +31 -283
- package/docs/ar/intlayer_with_react_router_v7.md +15 -91
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/ar/intlayer_with_storybook.md +1 -37
- package/docs/ar/intlayer_with_svelte_kit.md +29 -71
- package/docs/ar/intlayer_with_tanstack+solid.md +14 -70
- package/docs/ar/intlayer_with_tanstack.md +14 -62
- package/docs/ar/intlayer_with_vanilla.md +28 -108
- package/docs/ar/intlayer_with_vite+lit.md +98 -156
- package/docs/ar/intlayer_with_vite+preact.md +101 -710
- package/docs/ar/intlayer_with_vite+react.md +113 -797
- package/docs/ar/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/ar/intlayer_with_vite+solid.md +79 -152
- package/docs/ar/intlayer_with_vite+svelte.md +104 -132
- package/docs/ar/intlayer_with_vite+vanilla.md +105 -155
- package/docs/ar/intlayer_with_vite+vue.md +92 -253
- package/docs/ar/introduction.md +2 -58
- package/docs/ar/packages/express-intlayer/t.md +6 -181
- package/docs/ar/packages/hono-intlayer/t.md +1 -45
- package/docs/ar/packages/intlayer/getConfiguration.md +2 -54
- package/docs/ar/packages/intlayer/getEnumeration.md +2 -60
- package/docs/ar/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/ar/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/ar/packages/intlayer/getLocaleName.md +1 -43
- package/docs/ar/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/ar/packages/intlayer/getMultilingualUrls.md +2 -60
- package/docs/ar/packages/intlayer/getPathWithoutLocale.md +1 -20
- package/docs/ar/packages/intlayer/getPrefix.md +1 -12
- package/docs/ar/packages/intlayer/getTranslation.md +3 -87
- package/docs/ar/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/ar/packages/next-intlayer/t.md +5 -137
- package/docs/ar/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/ar/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/ar/packages/next-intlayer/useLocale.md +1 -51
- package/docs/ar/packages/react-intlayer/t.md +4 -106
- package/docs/ar/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/ar/packages/react-intlayer/useI18n.md +4 -107
- package/docs/ar/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/ar/packages/react-intlayer/useLocale.md +3 -103
- package/docs/ar/per_locale_file.md +3 -35
- package/docs/bn/intlayer_with_fastify.md +5 -193
- package/docs/bn/intlayer_with_hono.md +5 -158
- package/docs/bn/intlayer_with_storybook.md +1 -37
- package/docs/bn/intlayer_with_vanilla.md +28 -108
- package/docs/bn/intlayer_with_vite+lit.md +98 -119
- package/docs/bn/intlayer_with_vite+vanilla.md +105 -155
- package/docs/bn/introduction.md +2 -58
- package/docs/cs/intlayer_with_fastify.md +5 -193
- package/docs/cs/intlayer_with_hono.md +5 -158
- package/docs/cs/intlayer_with_storybook.md +1 -37
- package/docs/cs/intlayer_with_vanilla.md +28 -108
- package/docs/cs/intlayer_with_vite+lit.md +98 -156
- package/docs/cs/intlayer_with_vite+vanilla.md +105 -155
- package/docs/cs/introduction.md +2 -58
- package/docs/de/dictionary/condition.md +2 -116
- package/docs/de/dictionary/content_file.md +2 -201
- package/docs/de/dictionary/enumeration.md +2 -116
- package/docs/de/dictionary/file.md +3 -100
- package/docs/de/dictionary/function_fetching.md +3 -103
- package/docs/de/dictionary/gender.md +2 -181
- package/docs/de/dictionary/insertion.md +3 -57
- package/docs/de/dictionary/nesting.md +3 -123
- package/docs/de/dictionary/translation.md +4 -146
- package/docs/de/interest_of_intlayer.md +2 -59
- package/docs/de/intlayer_CMS.md +3 -226
- package/docs/de/intlayer_visual_editor.md +1 -72
- package/docs/de/intlayer_with_adonisjs.md +3 -108
- package/docs/de/intlayer_with_analog.md +21 -41
- package/docs/de/intlayer_with_angular.md +15 -41
- package/docs/de/intlayer_with_astro.md +181 -56
- package/docs/de/intlayer_with_astro_lit.md +615 -0
- package/docs/de/intlayer_with_astro_preact.md +564 -0
- package/docs/de/intlayer_with_astro_react.md +562 -0
- package/docs/de/intlayer_with_astro_solid.md +562 -0
- package/docs/de/intlayer_with_astro_svelte.md +566 -0
- package/docs/de/intlayer_with_astro_vanilla.md +543 -0
- package/docs/de/intlayer_with_astro_vue.md +584 -0
- package/docs/de/intlayer_with_create_react_app.md +33 -686
- package/docs/de/intlayer_with_express.md +5 -182
- package/docs/de/intlayer_with_fastify.md +5 -193
- package/docs/de/intlayer_with_hono.md +5 -158
- package/docs/de/intlayer_with_lynx+react.md +2 -75
- package/docs/de/intlayer_with_nestjs.md +3 -33
- package/docs/de/intlayer_with_nextjs_14.md +51 -573
- package/docs/de/intlayer_with_nextjs_15.md +61 -823
- package/docs/de/intlayer_with_nextjs_16.md +45 -870
- package/docs/de/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/de/intlayer_with_nextjs_no_locale_path.md +11 -499
- package/docs/de/intlayer_with_nextjs_page_router.md +36 -632
- package/docs/de/intlayer_with_nuxt.md +16 -98
- package/docs/de/intlayer_with_react_native+expo.md +31 -286
- package/docs/de/intlayer_with_react_router_v7.md +15 -91
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +14 -62
- package/docs/de/intlayer_with_storybook.md +1 -37
- package/docs/de/intlayer_with_svelte_kit.md +29 -71
- package/docs/de/intlayer_with_tanstack+solid.md +14 -70
- package/docs/de/intlayer_with_tanstack.md +14 -62
- package/docs/de/intlayer_with_vanilla.md +28 -108
- package/docs/de/intlayer_with_vite+lit.md +98 -162
- package/docs/de/intlayer_with_vite+preact.md +104 -713
- package/docs/de/intlayer_with_vite+react.md +105 -789
- package/docs/de/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/de/intlayer_with_vite+solid.md +79 -153
- package/docs/de/intlayer_with_vite+svelte.md +104 -132
- package/docs/de/intlayer_with_vite+vanilla.md +105 -155
- package/docs/de/intlayer_with_vite+vue.md +92 -285
- package/docs/de/introduction.md +2 -61
- package/docs/de/packages/express-intlayer/t.md +6 -182
- package/docs/de/packages/hono-intlayer/t.md +3 -95
- package/docs/de/packages/intlayer/getConfiguration.md +2 -54
- package/docs/de/packages/intlayer/getEnumeration.md +2 -60
- package/docs/de/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/de/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/de/packages/intlayer/getLocaleName.md +1 -43
- package/docs/de/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/de/packages/intlayer/getMultilingualUrls.md +2 -60
- package/docs/de/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/de/packages/intlayer/getPrefix.md +1 -15
- package/docs/de/packages/intlayer/getTranslation.md +3 -86
- package/docs/de/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/de/packages/next-intlayer/t.md +5 -137
- package/docs/de/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/de/packages/next-intlayer/useIntlayer.md +3 -120
- package/docs/de/packages/next-intlayer/useLocale.md +1 -51
- package/docs/de/packages/react-intlayer/t.md +4 -109
- package/docs/de/packages/react-intlayer/useDictionary.md +3 -127
- package/docs/de/packages/react-intlayer/useI18n.md +4 -107
- package/docs/de/packages/react-intlayer/useIntlayer.md +3 -114
- package/docs/de/packages/react-intlayer/useLocale.md +3 -103
- package/docs/de/per_locale_file.md +3 -35
- package/docs/en/benchmark/___NOTE.md +16 -0
- package/docs/en/dictionary/condition.md +2 -116
- package/docs/en/dictionary/content_file.md +2 -200
- package/docs/en/dictionary/enumeration.md +4 -202
- package/docs/en/dictionary/file.md +3 -100
- package/docs/en/dictionary/function_fetching.md +3 -103
- package/docs/en/dictionary/gender.md +2 -140
- package/docs/en/dictionary/insertion.md +3 -57
- package/docs/en/dictionary/nesting.md +3 -121
- package/docs/en/dictionary/translation.md +4 -146
- package/docs/en/interest_of_intlayer.md +2 -58
- package/docs/en/intlayer_CMS.md +3 -227
- package/docs/en/intlayer_visual_editor.md +1 -72
- package/docs/en/intlayer_with_adonisjs.md +3 -107
- package/docs/en/intlayer_with_analog.md +21 -41
- package/docs/en/intlayer_with_angular.md +15 -41
- package/docs/en/intlayer_with_astro.md +397 -38
- package/docs/en/intlayer_with_astro_lit.md +616 -0
- package/docs/en/intlayer_with_astro_preact.md +571 -0
- package/docs/en/intlayer_with_astro_react.md +564 -0
- package/docs/en/intlayer_with_astro_solid.md +564 -0
- package/docs/en/intlayer_with_astro_svelte.md +568 -0
- package/docs/en/intlayer_with_astro_vanilla.md +543 -0
- package/docs/en/intlayer_with_astro_vue.md +586 -0
- package/docs/en/intlayer_with_create_react_app.md +34 -686
- package/docs/en/intlayer_with_express.md +5 -179
- package/docs/en/intlayer_with_fastify.md +5 -193
- package/docs/en/intlayer_with_hono.md +5 -158
- package/docs/en/intlayer_with_lynx+react.md +3 -109
- package/docs/en/intlayer_with_nestjs.md +3 -31
- package/docs/en/intlayer_with_nextjs_14.md +47 -777
- package/docs/en/intlayer_with_nextjs_15.md +39 -822
- package/docs/en/intlayer_with_nextjs_16.md +40 -891
- package/docs/en/intlayer_with_nextjs_compiler.md +2 -70
- package/docs/en/intlayer_with_nextjs_no_locale_path.md +11 -488
- package/docs/en/intlayer_with_nextjs_page_router.md +102 -713
- package/docs/en/intlayer_with_nuxt.md +16 -98
- package/docs/en/intlayer_with_react_native+expo.md +31 -291
- package/docs/en/intlayer_with_react_router_v7.md +15 -107
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +15 -99
- package/docs/en/intlayer_with_storybook.md +1 -37
- package/docs/en/intlayer_with_svelte_kit.md +28 -78
- package/docs/en/intlayer_with_tanstack+solid.md +14 -70
- package/docs/en/intlayer_with_tanstack.md +14 -70
- package/docs/en/intlayer_with_vanilla.md +28 -108
- package/docs/en/intlayer_with_vite+lit.md +98 -162
- package/docs/en/intlayer_with_vite+preact.md +100 -717
- package/docs/en/intlayer_with_vite+react.md +104 -796
- package/docs/en/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/en/intlayer_with_vite+solid.md +79 -211
- package/docs/en/intlayer_with_vite+svelte.md +104 -138
- package/docs/en/intlayer_with_vite+vanilla.md +105 -155
- package/docs/en/intlayer_with_vite+vue.md +92 -244
- package/docs/en/introduction.md +2 -58
- package/docs/en/packages/express-intlayer/t.md +6 -181
- package/docs/en/packages/hono-intlayer/t.md +3 -95
- package/docs/en/packages/intlayer/getConfiguration.md +2 -54
- package/docs/en/packages/intlayer/getEnumeration.md +2 -60
- package/docs/en/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/en/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/en/packages/intlayer/getLocaleName.md +1 -43
- package/docs/en/packages/intlayer/getLocalizedUrl.md +3 -71
- package/docs/en/packages/intlayer/getMultilingualUrls.md +3 -79
- package/docs/en/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/en/packages/intlayer/getPrefix.md +1 -15
- package/docs/en/packages/intlayer/getTranslation.md +3 -87
- package/docs/en/packages/next-intlayer/t.md +5 -137
- package/docs/en/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/en/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/en/packages/next-intlayer/useLocale.md +1 -51
- package/docs/en/packages/react-intlayer/t.md +4 -109
- package/docs/en/packages/react-intlayer/useI18n.md +4 -107
- package/docs/en/packages/react-intlayer/useLocale.md +3 -103
- package/docs/en/per_locale_file.md +3 -33
- package/docs/en-GB/dictionary/condition.md +2 -116
- package/docs/en-GB/dictionary/content_file.md +2 -213
- package/docs/en-GB/dictionary/enumeration.md +2 -116
- package/docs/en-GB/dictionary/file.md +3 -100
- package/docs/en-GB/dictionary/function_fetching.md +3 -103
- package/docs/en-GB/dictionary/gender.md +2 -140
- package/docs/en-GB/dictionary/insertion.md +3 -81
- package/docs/en-GB/dictionary/nesting.md +3 -121
- package/docs/en-GB/dictionary/translation.md +4 -146
- package/docs/en-GB/interest_of_intlayer.md +2 -58
- package/docs/en-GB/intlayer_CMS.md +3 -223
- package/docs/en-GB/intlayer_visual_editor.md +1 -72
- package/docs/en-GB/intlayer_with_adonisjs.md +3 -109
- package/docs/en-GB/intlayer_with_analog.md +21 -41
- package/docs/en-GB/intlayer_with_angular.md +15 -41
- package/docs/en-GB/intlayer_with_astro.md +183 -53
- package/docs/en-GB/intlayer_with_astro_lit.md +619 -0
- package/docs/en-GB/intlayer_with_astro_preact.md +568 -0
- package/docs/en-GB/intlayer_with_astro_react.md +566 -0
- package/docs/en-GB/intlayer_with_astro_solid.md +566 -0
- package/docs/en-GB/intlayer_with_astro_svelte.md +570 -0
- package/docs/en-GB/intlayer_with_astro_vanilla.md +547 -0
- package/docs/en-GB/intlayer_with_astro_vue.md +588 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +33 -707
- package/docs/en-GB/intlayer_with_express.md +5 -182
- package/docs/en-GB/intlayer_with_fastify.md +5 -193
- package/docs/en-GB/intlayer_with_hono.md +5 -158
- package/docs/en-GB/intlayer_with_lynx+react.md +2 -116
- package/docs/en-GB/intlayer_with_nestjs.md +3 -31
- package/docs/en-GB/intlayer_with_nextjs_14.md +77 -773
- package/docs/en-GB/intlayer_with_nextjs_15.md +59 -839
- package/docs/en-GB/intlayer_with_nextjs_16.md +39 -822
- package/docs/en-GB/intlayer_with_nextjs_compiler.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +11 -500
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +38 -634
- package/docs/en-GB/intlayer_with_nuxt.md +16 -103
- package/docs/en-GB/intlayer_with_react_native+expo.md +31 -284
- package/docs/en-GB/intlayer_with_react_router_v7.md +14 -30
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +14 -30
- package/docs/en-GB/intlayer_with_storybook.md +1 -37
- package/docs/en-GB/intlayer_with_svelte_kit.md +28 -10
- package/docs/en-GB/intlayer_with_tanstack+solid.md +14 -70
- package/docs/en-GB/intlayer_with_tanstack.md +13 -1
- package/docs/en-GB/intlayer_with_vanilla.md +28 -108
- package/docs/en-GB/intlayer_with_vite+lit.md +98 -162
- package/docs/en-GB/intlayer_with_vite+preact.md +98 -647
- package/docs/en-GB/intlayer_with_vite+react.md +99 -906
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/en-GB/intlayer_with_vite+solid.md +78 -88
- package/docs/en-GB/intlayer_with_vite+svelte.md +103 -71
- package/docs/en-GB/intlayer_with_vite+vanilla.md +105 -155
- package/docs/en-GB/intlayer_with_vite+vue.md +91 -195
- package/docs/en-GB/introduction.md +2 -58
- package/docs/en-GB/packages/express-intlayer/t.md +6 -181
- package/docs/en-GB/packages/hono-intlayer/t.md +3 -95
- package/docs/en-GB/packages/intlayer/getConfiguration.md +2 -54
- package/docs/en-GB/packages/intlayer/getEnumeration.md +2 -60
- package/docs/en-GB/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/en-GB/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/en-GB/packages/intlayer/getLocaleName.md +1 -43
- package/docs/en-GB/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/en-GB/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/en-GB/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/en-GB/packages/intlayer/getPrefix.md +1 -15
- package/docs/en-GB/packages/intlayer/getTranslation.md +4 -107
- package/docs/en-GB/packages/intlayer/getTranslationContent.md +3 -98
- package/docs/en-GB/packages/next-intlayer/t.md +5 -141
- package/docs/en-GB/packages/next-intlayer/useDictionary.md +3 -124
- package/docs/en-GB/packages/next-intlayer/useIntlayer.md +3 -119
- package/docs/en-GB/packages/next-intlayer/useLocale.md +1 -51
- package/docs/en-GB/packages/react-intlayer/t.md +4 -110
- package/docs/en-GB/packages/react-intlayer/useDictionary.md +3 -117
- package/docs/en-GB/packages/react-intlayer/useI18n.md +3 -106
- package/docs/en-GB/packages/react-intlayer/useIntlayer.md +3 -114
- package/docs/en-GB/packages/react-intlayer/useLocale.md +3 -102
- package/docs/en-GB/per_locale_file.md +3 -33
- package/docs/es/dictionary/condition.md +2 -116
- package/docs/es/dictionary/content_file.md +2 -233
- package/docs/es/dictionary/enumeration.md +2 -116
- package/docs/es/dictionary/file.md +3 -100
- package/docs/es/dictionary/function_fetching.md +3 -103
- package/docs/es/dictionary/gender.md +2 -140
- package/docs/es/dictionary/insertion.md +3 -57
- package/docs/es/dictionary/nesting.md +3 -121
- package/docs/es/dictionary/translation.md +4 -146
- package/docs/es/interest_of_intlayer.md +2 -58
- package/docs/es/intlayer_CMS.md +3 -227
- package/docs/es/intlayer_visual_editor.md +1 -72
- package/docs/es/intlayer_with_adonisjs.md +3 -107
- package/docs/es/intlayer_with_analog.md +21 -41
- package/docs/es/intlayer_with_angular.md +15 -41
- package/docs/es/intlayer_with_astro.md +178 -52
- package/docs/es/intlayer_with_astro_lit.md +612 -0
- package/docs/es/intlayer_with_astro_preact.md +562 -0
- package/docs/es/intlayer_with_astro_react.md +560 -0
- package/docs/es/intlayer_with_astro_solid.md +560 -0
- package/docs/es/intlayer_with_astro_svelte.md +564 -0
- package/docs/es/intlayer_with_astro_vanilla.md +539 -0
- package/docs/es/intlayer_with_astro_vue.md +582 -0
- package/docs/es/intlayer_with_create_react_app.md +33 -649
- package/docs/es/intlayer_with_express.md +5 -179
- package/docs/es/intlayer_with_fastify.md +5 -193
- package/docs/es/intlayer_with_hono.md +5 -158
- package/docs/es/intlayer_with_lynx+react.md +2 -108
- package/docs/es/intlayer_with_nestjs.md +3 -31
- package/docs/es/intlayer_with_nextjs_14.md +53 -678
- package/docs/es/intlayer_with_nextjs_15.md +56 -812
- package/docs/es/intlayer_with_nextjs_16.md +40 -890
- package/docs/es/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/es/intlayer_with_nextjs_no_locale_path.md +11 -486
- package/docs/es/intlayer_with_nextjs_page_router.md +37 -648
- package/docs/es/intlayer_with_nuxt.md +16 -98
- package/docs/es/intlayer_with_react_native+expo.md +31 -284
- package/docs/es/intlayer_with_react_router_v7.md +15 -92
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +15 -92
- package/docs/es/intlayer_with_storybook.md +1 -37
- package/docs/es/intlayer_with_svelte_kit.md +29 -71
- package/docs/es/intlayer_with_tanstack+solid.md +14 -70
- package/docs/es/intlayer_with_tanstack.md +14 -62
- package/docs/es/intlayer_with_vanilla.md +28 -108
- package/docs/es/intlayer_with_vite+lit.md +98 -162
- package/docs/es/intlayer_with_vite+preact.md +100 -709
- package/docs/es/intlayer_with_vite+react.md +105 -789
- package/docs/es/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/es/intlayer_with_vite+solid.md +79 -152
- package/docs/es/intlayer_with_vite+svelte.md +104 -132
- package/docs/es/intlayer_with_vite+vanilla.md +105 -155
- package/docs/es/intlayer_with_vite+vue.md +92 -255
- package/docs/es/introduction.md +2 -60
- package/docs/es/packages/express-intlayer/t.md +6 -183
- package/docs/es/packages/hono-intlayer/t.md +3 -95
- package/docs/es/packages/intlayer/getConfiguration.md +2 -54
- package/docs/es/packages/intlayer/getEnumeration.md +2 -60
- package/docs/es/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/es/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/es/packages/intlayer/getLocaleName.md +1 -43
- package/docs/es/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/es/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/es/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/es/packages/intlayer/getPrefix.md +1 -15
- package/docs/es/packages/intlayer/getTranslation.md +3 -87
- package/docs/es/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/es/packages/next-intlayer/index.md +2 -60
- package/docs/es/packages/next-intlayer/t.md +5 -137
- package/docs/es/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/es/packages/next-intlayer/useIntlayer.md +3 -119
- package/docs/es/packages/next-intlayer/useLocale.md +1 -51
- package/docs/es/packages/react-intlayer/index.md +2 -60
- package/docs/es/packages/react-intlayer/t.md +4 -110
- package/docs/es/packages/react-intlayer/useDictionary.md +3 -113
- package/docs/es/packages/react-intlayer/useI18n.md +4 -107
- package/docs/es/packages/react-intlayer/useIntlayer.md +3 -110
- package/docs/es/packages/react-intlayer/useLocale.md +3 -103
- package/docs/es/per_locale_file.md +3 -34
- package/docs/fr/dictionary/condition.md +2 -116
- package/docs/fr/dictionary/content_file.md +2 -200
- package/docs/fr/dictionary/enumeration.md +2 -116
- package/docs/fr/dictionary/file.md +3 -100
- package/docs/fr/dictionary/function_fetching.md +3 -103
- package/docs/fr/dictionary/gender.md +2 -141
- package/docs/fr/dictionary/insertion.md +3 -57
- package/docs/fr/dictionary/nesting.md +3 -121
- package/docs/fr/dictionary/translation.md +4 -146
- package/docs/fr/interest_of_intlayer.md +2 -59
- package/docs/fr/intlayer_CMS.md +3 -227
- package/docs/fr/intlayer_visual_editor.md +1 -72
- package/docs/fr/intlayer_with_adonisjs.md +3 -107
- package/docs/fr/intlayer_with_analog.md +21 -41
- package/docs/fr/intlayer_with_angular.md +15 -41
- package/docs/fr/intlayer_with_astro.md +175 -49
- package/docs/fr/intlayer_with_astro_lit.md +612 -0
- package/docs/fr/intlayer_with_astro_preact.md +567 -0
- package/docs/fr/intlayer_with_astro_react.md +560 -0
- package/docs/fr/intlayer_with_astro_solid.md +560 -0
- package/docs/fr/intlayer_with_astro_svelte.md +564 -0
- package/docs/fr/intlayer_with_astro_vanilla.md +539 -0
- package/docs/fr/intlayer_with_astro_vue.md +582 -0
- package/docs/fr/intlayer_with_create_react_app.md +9 -645
- package/docs/fr/intlayer_with_express.md +4 -110
- package/docs/fr/intlayer_with_fastify.md +5 -193
- package/docs/fr/intlayer_with_hono.md +5 -158
- package/docs/fr/intlayer_with_lynx+react.md +2 -108
- package/docs/fr/intlayer_with_nestjs.md +3 -31
- package/docs/fr/intlayer_with_nextjs_14.md +51 -573
- package/docs/fr/intlayer_with_nextjs_15.md +64 -842
- package/docs/fr/intlayer_with_nextjs_16.md +44 -867
- package/docs/fr/intlayer_with_nextjs_compiler.md +2 -64
- package/docs/fr/intlayer_with_nextjs_no_locale_path.md +11 -522
- package/docs/fr/intlayer_with_nextjs_page_router.md +37 -647
- package/docs/fr/intlayer_with_nuxt.md +16 -99
- package/docs/fr/intlayer_with_react_native+expo.md +31 -284
- package/docs/fr/intlayer_with_react_router_v7.md +15 -94
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +15 -94
- package/docs/fr/intlayer_with_storybook.md +1 -37
- package/docs/fr/intlayer_with_svelte_kit.md +29 -71
- package/docs/fr/intlayer_with_tanstack+solid.md +14 -70
- package/docs/fr/intlayer_with_tanstack.md +14 -62
- package/docs/fr/intlayer_with_vanilla.md +28 -108
- package/docs/fr/intlayer_with_vite+lit.md +98 -162
- package/docs/fr/intlayer_with_vite+preact.md +100 -709
- package/docs/fr/intlayer_with_vite+react.md +104 -788
- package/docs/fr/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/fr/intlayer_with_vite+solid.md +79 -152
- package/docs/fr/intlayer_with_vite+svelte.md +104 -132
- package/docs/fr/intlayer_with_vite+vanilla.md +105 -155
- package/docs/fr/intlayer_with_vite+vue.md +92 -251
- package/docs/fr/introduction.md +2 -60
- package/docs/fr/packages/express-intlayer/t.md +6 -184
- package/docs/fr/packages/hono-intlayer/t.md +3 -95
- package/docs/fr/packages/intlayer/getConfiguration.md +2 -54
- package/docs/fr/packages/intlayer/getEnumeration.md +2 -60
- package/docs/fr/packages/intlayer/getHTMLTextDir.md +2 -39
- package/docs/fr/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/fr/packages/intlayer/getLocaleName.md +1 -43
- package/docs/fr/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/fr/packages/intlayer/getMultilingualUrls.md +2 -60
- package/docs/fr/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/fr/packages/intlayer/getPrefix.md +1 -15
- package/docs/fr/packages/intlayer/getTranslation.md +3 -87
- package/docs/fr/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/fr/packages/next-intlayer/t.md +5 -137
- package/docs/fr/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/fr/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/fr/packages/next-intlayer/useLocale.md +1 -51
- package/docs/fr/packages/react-intlayer/index.md +2 -60
- package/docs/fr/packages/react-intlayer/t.md +4 -109
- package/docs/fr/packages/react-intlayer/useDictionary.md +3 -114
- package/docs/fr/packages/react-intlayer/useI18n.md +4 -107
- package/docs/fr/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/fr/packages/react-intlayer/useLocale.md +3 -103
- package/docs/fr/per_locale_file.md +3 -35
- package/docs/hi/dictionary/condition.md +2 -116
- package/docs/hi/dictionary/content_file.md +2 -201
- package/docs/hi/dictionary/enumeration.md +2 -116
- package/docs/hi/dictionary/file.md +3 -100
- package/docs/hi/dictionary/function_fetching.md +3 -103
- package/docs/hi/dictionary/gender.md +2 -141
- package/docs/hi/dictionary/insertion.md +3 -57
- package/docs/hi/dictionary/nesting.md +3 -121
- package/docs/hi/dictionary/translation.md +4 -149
- package/docs/hi/interest_of_intlayer.md +2 -58
- package/docs/hi/intlayer_CMS.md +3 -227
- package/docs/hi/intlayer_visual_editor.md +1 -72
- package/docs/hi/intlayer_with_adonisjs.md +3 -109
- package/docs/hi/intlayer_with_analog.md +21 -41
- package/docs/hi/intlayer_with_angular.md +15 -41
- package/docs/hi/intlayer_with_astro.md +183 -57
- package/docs/hi/intlayer_with_astro_lit.md +615 -0
- package/docs/hi/intlayer_with_astro_preact.md +564 -0
- package/docs/hi/intlayer_with_astro_react.md +562 -0
- package/docs/hi/intlayer_with_astro_solid.md +562 -0
- package/docs/hi/intlayer_with_astro_svelte.md +566 -0
- package/docs/hi/intlayer_with_astro_vanilla.md +543 -0
- package/docs/hi/intlayer_with_astro_vue.md +584 -0
- package/docs/hi/intlayer_with_create_react_app.md +8 -444
- package/docs/hi/intlayer_with_express.md +6 -195
- package/docs/hi/intlayer_with_fastify.md +5 -193
- package/docs/hi/intlayer_with_hono.md +2 -2
- package/docs/hi/intlayer_with_lynx+react.md +2 -116
- package/docs/hi/intlayer_with_nestjs.md +3 -31
- package/docs/hi/intlayer_with_nextjs_14.md +60 -512
- package/docs/hi/intlayer_with_nextjs_15.md +60 -822
- package/docs/hi/intlayer_with_nextjs_16.md +40 -883
- package/docs/hi/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/hi/intlayer_with_nextjs_no_locale_path.md +11 -498
- package/docs/hi/intlayer_with_nextjs_page_router.md +37 -648
- package/docs/hi/intlayer_with_nuxt.md +16 -101
- package/docs/hi/intlayer_with_react_native+expo.md +31 -284
- package/docs/hi/intlayer_with_react_router_v7.md +15 -91
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/hi/intlayer_with_storybook.md +1 -37
- package/docs/hi/intlayer_with_svelte_kit.md +29 -71
- package/docs/hi/intlayer_with_tanstack+solid.md +14 -70
- package/docs/hi/intlayer_with_tanstack.md +14 -62
- package/docs/hi/intlayer_with_vanilla.md +28 -108
- package/docs/hi/intlayer_with_vite+lit.md +98 -156
- package/docs/hi/intlayer_with_vite+preact.md +98 -619
- package/docs/hi/intlayer_with_vite+react.md +123 -816
- package/docs/hi/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/hi/intlayer_with_vite+solid.md +79 -151
- package/docs/hi/intlayer_with_vite+svelte.md +104 -132
- package/docs/hi/intlayer_with_vite+vanilla.md +105 -87
- package/docs/hi/intlayer_with_vite+vue.md +92 -250
- package/docs/hi/introduction.md +2 -62
- package/docs/hi/packages/express-intlayer/t.md +6 -181
- package/docs/hi/packages/hono-intlayer/t.md +1 -45
- package/docs/hi/packages/intlayer/getConfiguration.md +2 -54
- package/docs/hi/packages/intlayer/getEnumeration.md +2 -60
- package/docs/hi/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/hi/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/hi/packages/intlayer/getLocaleName.md +1 -43
- package/docs/hi/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/hi/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/hi/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/hi/packages/intlayer/getPrefix.md +1 -19
- package/docs/hi/packages/intlayer/getTranslation.md +3 -87
- package/docs/hi/packages/intlayer/getTranslationContent.md +3 -86
- package/docs/hi/packages/intlayer/index.md +4 -129
- package/docs/hi/packages/next-intlayer/t.md +5 -138
- package/docs/hi/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/hi/packages/next-intlayer/useIntlayer.md +3 -120
- package/docs/hi/packages/next-intlayer/useLocale.md +1 -51
- package/docs/hi/packages/react-intlayer/t.md +4 -106
- package/docs/hi/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/hi/packages/react-intlayer/useI18n.md +3 -111
- package/docs/hi/packages/react-intlayer/useIntlayer.md +3 -113
- package/docs/hi/packages/react-intlayer/useLocale.md +3 -103
- package/docs/hi/per_locale_file.md +3 -34
- package/docs/id/dictionary/condition.md +2 -110
- package/docs/id/dictionary/content_file.md +2 -200
- package/docs/id/dictionary/enumeration.md +2 -116
- package/docs/id/dictionary/file.md +3 -105
- package/docs/id/dictionary/function_fetching.md +3 -103
- package/docs/id/dictionary/gender.md +2 -140
- package/docs/id/dictionary/insertion.md +3 -57
- package/docs/id/dictionary/nesting.md +3 -121
- package/docs/id/dictionary/translation.md +4 -147
- package/docs/id/interest_of_intlayer.md +2 -58
- package/docs/id/intlayer_CMS.md +3 -227
- package/docs/id/intlayer_visual_editor.md +1 -72
- package/docs/id/intlayer_with_adonisjs.md +3 -109
- package/docs/id/intlayer_with_analog.md +21 -41
- package/docs/id/intlayer_with_angular.md +15 -41
- package/docs/id/intlayer_with_astro.md +182 -64
- package/docs/id/intlayer_with_astro_lit.md +615 -0
- package/docs/id/intlayer_with_astro_preact.md +564 -0
- package/docs/id/intlayer_with_astro_react.md +562 -0
- package/docs/id/intlayer_with_astro_solid.md +562 -0
- package/docs/id/intlayer_with_astro_svelte.md +566 -0
- package/docs/id/intlayer_with_astro_vanilla.md +543 -0
- package/docs/id/intlayer_with_astro_vue.md +584 -0
- package/docs/id/intlayer_with_create_react_app.md +39 -694
- package/docs/id/intlayer_with_express.md +5 -181
- package/docs/id/intlayer_with_fastify.md +5 -193
- package/docs/id/intlayer_with_hono.md +2 -2
- package/docs/id/intlayer_with_lynx+react.md +3 -109
- package/docs/id/intlayer_with_nestjs.md +3 -31
- package/docs/id/intlayer_with_nextjs_14.md +59 -796
- package/docs/id/intlayer_with_nextjs_15.md +37 -815
- package/docs/id/intlayer_with_nextjs_16.md +41 -884
- package/docs/id/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/id/intlayer_with_nextjs_no_locale_path.md +11 -501
- package/docs/id/intlayer_with_nextjs_page_router.md +102 -713
- package/docs/id/intlayer_with_nuxt.md +16 -99
- package/docs/id/intlayer_with_react_native+expo.md +31 -291
- package/docs/id/intlayer_with_react_router_v7.md +15 -99
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +15 -99
- package/docs/id/intlayer_with_storybook.md +1 -37
- package/docs/id/intlayer_with_svelte_kit.md +29 -71
- package/docs/id/intlayer_with_tanstack+solid.md +14 -70
- package/docs/id/intlayer_with_tanstack.md +14 -62
- package/docs/id/intlayer_with_vanilla.md +28 -108
- package/docs/id/intlayer_with_vite+lit.md +98 -156
- package/docs/id/intlayer_with_vite+preact.md +103 -712
- package/docs/id/intlayer_with_vite+react.md +115 -803
- package/docs/id/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/id/intlayer_with_vite+solid.md +79 -150
- package/docs/id/intlayer_with_vite+svelte.md +104 -132
- package/docs/id/intlayer_with_vite+vanilla.md +105 -155
- package/docs/id/intlayer_with_vite+vue.md +92 -258
- package/docs/id/introduction.md +2 -60
- package/docs/id/packages/express-intlayer/t.md +6 -181
- package/docs/id/packages/hono-intlayer/t.md +1 -45
- package/docs/id/packages/intlayer/getConfiguration.md +2 -54
- package/docs/id/packages/intlayer/getEnumeration.md +2 -60
- package/docs/id/packages/intlayer/getHTMLTextDir.md +2 -39
- package/docs/id/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/id/packages/intlayer/getLocaleName.md +1 -44
- package/docs/id/packages/intlayer/getLocalizedUrl.md +2 -59
- package/docs/id/packages/intlayer/getMultilingualUrls.md +2 -64
- package/docs/id/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/id/packages/intlayer/getPrefix.md +1 -12
- package/docs/id/packages/intlayer/getTranslation.md +3 -87
- package/docs/id/packages/intlayer/getTranslationContent.md +3 -86
- package/docs/id/packages/next-intlayer/t.md +5 -137
- package/docs/id/packages/next-intlayer/useDictionary.md +3 -121
- package/docs/id/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/id/packages/next-intlayer/useLocale.md +1 -51
- package/docs/id/packages/react-intlayer/t.md +4 -109
- package/docs/id/packages/react-intlayer/useDictionary.md +3 -113
- package/docs/id/packages/react-intlayer/useI18n.md +4 -123
- package/docs/id/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/id/packages/react-intlayer/useLocale.md +3 -103
- package/docs/id/per_locale_file.md +3 -35
- package/docs/it/dictionary/condition.md +2 -116
- package/docs/it/dictionary/content_file.md +2 -201
- package/docs/it/dictionary/enumeration.md +2 -116
- package/docs/it/dictionary/file.md +3 -100
- package/docs/it/dictionary/function_fetching.md +3 -103
- package/docs/it/dictionary/gender.md +2 -140
- package/docs/it/dictionary/insertion.md +3 -57
- package/docs/it/dictionary/nesting.md +3 -121
- package/docs/it/dictionary/translation.md +4 -146
- package/docs/it/interest_of_intlayer.md +2 -59
- package/docs/it/intlayer_CMS.md +3 -227
- package/docs/it/intlayer_visual_editor.md +1 -72
- package/docs/it/intlayer_with_adonisjs.md +3 -109
- package/docs/it/intlayer_with_analog.md +21 -41
- package/docs/it/intlayer_with_angular.md +15 -41
- package/docs/it/intlayer_with_astro.md +187 -61
- package/docs/it/intlayer_with_astro_lit.md +615 -0
- package/docs/it/intlayer_with_astro_preact.md +564 -0
- package/docs/it/intlayer_with_astro_react.md +562 -0
- package/docs/it/intlayer_with_astro_solid.md +562 -0
- package/docs/it/intlayer_with_astro_svelte.md +566 -0
- package/docs/it/intlayer_with_astro_vanilla.md +543 -0
- package/docs/it/intlayer_with_astro_vue.md +584 -0
- package/docs/it/intlayer_with_create_react_app.md +9 -551
- package/docs/it/intlayer_with_express.md +5 -182
- package/docs/it/intlayer_with_fastify.md +5 -193
- package/docs/it/intlayer_with_hono.md +2 -2
- package/docs/it/intlayer_with_lynx+react.md +2 -116
- package/docs/it/intlayer_with_nestjs.md +3 -31
- package/docs/it/intlayer_with_nextjs_14.md +51 -575
- package/docs/it/intlayer_with_nextjs_15.md +55 -813
- package/docs/it/intlayer_with_nextjs_16.md +40 -883
- package/docs/it/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/it/intlayer_with_nextjs_no_locale_path.md +11 -498
- package/docs/it/intlayer_with_nextjs_page_router.md +37 -650
- package/docs/it/intlayer_with_nuxt.md +16 -101
- package/docs/it/intlayer_with_react_native+expo.md +31 -286
- package/docs/it/intlayer_with_react_router_v7.md +15 -93
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +15 -93
- package/docs/it/intlayer_with_storybook.md +1 -37
- package/docs/it/intlayer_with_svelte_kit.md +29 -71
- package/docs/it/intlayer_with_tanstack+solid.md +14 -70
- package/docs/it/intlayer_with_tanstack.md +14 -62
- package/docs/it/intlayer_with_vanilla.md +28 -108
- package/docs/it/intlayer_with_vite+lit.md +98 -162
- package/docs/it/intlayer_with_vite+preact.md +102 -711
- package/docs/it/intlayer_with_vite+react.md +112 -797
- package/docs/it/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/it/intlayer_with_vite+solid.md +79 -151
- package/docs/it/intlayer_with_vite+svelte.md +104 -132
- package/docs/it/intlayer_with_vite+vanilla.md +105 -155
- package/docs/it/intlayer_with_vite+vue.md +80 -281
- package/docs/it/introduction.md +2 -60
- package/docs/it/packages/express-intlayer/t.md +6 -181
- package/docs/it/packages/hono-intlayer/t.md +1 -45
- package/docs/it/packages/intlayer/getConfiguration.md +2 -54
- package/docs/it/packages/intlayer/getEnumeration.md +2 -60
- package/docs/it/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/it/packages/intlayer/getLocaleLang.md +1 -20
- package/docs/it/packages/intlayer/getLocaleName.md +1 -43
- package/docs/it/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/it/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/it/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/it/packages/intlayer/getPrefix.md +1 -12
- package/docs/it/packages/intlayer/getTranslation.md +3 -86
- package/docs/it/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/it/packages/next-intlayer/t.md +5 -141
- package/docs/it/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/it/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/it/packages/next-intlayer/useLocale.md +1 -51
- package/docs/it/packages/react-intlayer/t.md +4 -109
- package/docs/it/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/it/packages/react-intlayer/useI18n.md +4 -107
- package/docs/it/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/it/packages/react-intlayer/useLocale.md +3 -103
- package/docs/it/per_locale_file.md +3 -35
- package/docs/ja/dictionary/condition.md +2 -116
- package/docs/ja/dictionary/content_file.md +2 -204
- package/docs/ja/dictionary/enumeration.md +2 -116
- package/docs/ja/dictionary/file.md +3 -100
- package/docs/ja/dictionary/function_fetching.md +3 -103
- package/docs/ja/dictionary/gender.md +2 -140
- package/docs/ja/dictionary/insertion.md +3 -57
- package/docs/ja/dictionary/nesting.md +3 -121
- package/docs/ja/dictionary/translation.md +6 -160
- package/docs/ja/interest_of_intlayer.md +2 -58
- package/docs/ja/intlayer_CMS.md +3 -227
- package/docs/ja/intlayer_visual_editor.md +1 -75
- package/docs/ja/intlayer_with_adonisjs.md +3 -109
- package/docs/ja/intlayer_with_analog.md +21 -41
- package/docs/ja/intlayer_with_angular.md +15 -41
- package/docs/ja/intlayer_with_astro.md +184 -53
- package/docs/ja/intlayer_with_astro_lit.md +618 -0
- package/docs/ja/intlayer_with_astro_preact.md +572 -0
- package/docs/ja/intlayer_with_astro_react.md +565 -0
- package/docs/ja/intlayer_with_astro_solid.md +565 -0
- package/docs/ja/intlayer_with_astro_svelte.md +569 -0
- package/docs/ja/intlayer_with_astro_vanilla.md +546 -0
- package/docs/ja/intlayer_with_astro_vue.md +587 -0
- package/docs/ja/intlayer_with_create_react_app.md +7 -387
- package/docs/ja/intlayer_with_express.md +5 -182
- package/docs/ja/intlayer_with_fastify.md +5 -193
- package/docs/ja/intlayer_with_hono.md +2 -2
- package/docs/ja/intlayer_with_lynx+react.md +2 -116
- package/docs/ja/intlayer_with_nestjs.md +3 -31
- package/docs/ja/intlayer_with_nextjs_14.md +54 -682
- package/docs/ja/intlayer_with_nextjs_15.md +56 -836
- package/docs/ja/intlayer_with_nextjs_16.md +40 -883
- package/docs/ja/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +12 -551
- package/docs/ja/intlayer_with_nextjs_page_router.md +73 -745
- package/docs/ja/intlayer_with_nuxt.md +16 -99
- package/docs/ja/intlayer_with_react_native+expo.md +31 -287
- package/docs/ja/intlayer_with_react_router_v7.md +32 -61
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/ja/intlayer_with_storybook.md +1 -37
- package/docs/ja/intlayer_with_svelte_kit.md +27 -69
- package/docs/ja/intlayer_with_tanstack+solid.md +14 -70
- package/docs/ja/intlayer_with_tanstack.md +13 -1
- package/docs/ja/intlayer_with_vanilla.md +28 -108
- package/docs/ja/intlayer_with_vite+lit.md +98 -162
- package/docs/ja/intlayer_with_vite+preact.md +88 -62
- package/docs/ja/intlayer_with_vite+react.md +88 -62
- package/docs/ja/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/ja/intlayer_with_vite+solid.md +80 -161
- package/docs/ja/intlayer_with_vite+svelte.md +104 -132
- package/docs/ja/intlayer_with_vite+vanilla.md +105 -155
- package/docs/ja/intlayer_with_vite+vue.md +92 -264
- package/docs/ja/introduction.md +2 -59
- package/docs/ja/packages/express-intlayer/t.md +6 -188
- package/docs/ja/packages/hono-intlayer/t.md +1 -45
- package/docs/ja/packages/intlayer/getConfiguration.md +2 -54
- package/docs/ja/packages/intlayer/getEnumeration.md +2 -60
- package/docs/ja/packages/intlayer/getHTMLTextDir.md +2 -39
- package/docs/ja/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/ja/packages/intlayer/getLocaleName.md +1 -43
- package/docs/ja/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/ja/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/ja/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/ja/packages/intlayer/getPrefix.md +1 -12
- package/docs/ja/packages/intlayer/getTranslation.md +3 -87
- package/docs/ja/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/ja/packages/next-intlayer/t.md +5 -137
- package/docs/ja/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/ja/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/ja/packages/next-intlayer/useLocale.md +1 -51
- package/docs/ja/packages/react-intlayer/t.md +4 -109
- package/docs/ja/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/ja/packages/react-intlayer/useI18n.md +4 -107
- package/docs/ja/packages/react-intlayer/useIntlayer.md +2 -95
- package/docs/ja/packages/react-intlayer/useLocale.md +3 -103
- package/docs/ja/per_locale_file.md +3 -34
- package/docs/ko/cli/index.md +1 -1
- package/docs/ko/dictionary/condition.md +2 -116
- package/docs/ko/dictionary/content_file.md +2 -201
- package/docs/ko/dictionary/enumeration.md +2 -116
- package/docs/ko/dictionary/file.md +3 -100
- package/docs/ko/dictionary/function_fetching.md +3 -103
- package/docs/ko/dictionary/gender.md +2 -140
- package/docs/ko/dictionary/insertion.md +3 -57
- package/docs/ko/dictionary/nesting.md +3 -121
- package/docs/ko/dictionary/translation.md +5 -161
- package/docs/ko/interest_of_intlayer.md +2 -60
- package/docs/ko/intlayer_CMS.md +3 -227
- package/docs/ko/intlayer_visual_editor.md +1 -72
- package/docs/ko/intlayer_with_adonisjs.md +3 -109
- package/docs/ko/intlayer_with_analog.md +21 -41
- package/docs/ko/intlayer_with_angular.md +15 -41
- package/docs/ko/intlayer_with_astro.md +169 -58
- package/docs/ko/intlayer_with_astro_lit.md +598 -0
- package/docs/ko/intlayer_with_astro_preact.md +552 -0
- package/docs/ko/intlayer_with_astro_react.md +545 -0
- package/docs/ko/intlayer_with_astro_solid.md +545 -0
- package/docs/ko/intlayer_with_astro_svelte.md +549 -0
- package/docs/ko/intlayer_with_astro_vanilla.md +526 -0
- package/docs/ko/intlayer_with_astro_vue.md +567 -0
- package/docs/ko/intlayer_with_create_react_app.md +38 -693
- package/docs/ko/intlayer_with_express.md +5 -182
- package/docs/ko/intlayer_with_fastify.md +5 -193
- package/docs/ko/intlayer_with_hono.md +2 -2
- package/docs/ko/intlayer_with_lynx+react.md +2 -116
- package/docs/ko/intlayer_with_nestjs.md +3 -31
- package/docs/ko/intlayer_with_nextjs_14.md +55 -693
- package/docs/ko/intlayer_with_nextjs_15.md +73 -859
- package/docs/ko/intlayer_with_nextjs_16.md +40 -883
- package/docs/ko/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +13 -548
- package/docs/ko/intlayer_with_nextjs_page_router.md +66 -652
- package/docs/ko/intlayer_with_nuxt.md +16 -99
- package/docs/ko/intlayer_with_react_native+expo.md +31 -286
- package/docs/ko/intlayer_with_react_router_v7.md +15 -91
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/ko/intlayer_with_storybook.md +1 -37
- package/docs/ko/intlayer_with_svelte_kit.md +29 -71
- package/docs/ko/intlayer_with_tanstack+solid.md +14 -70
- package/docs/ko/intlayer_with_tanstack.md +13 -1
- package/docs/ko/intlayer_with_vanilla.md +28 -108
- package/docs/ko/intlayer_with_vite+lit.md +98 -162
- package/docs/ko/intlayer_with_vite+preact.md +102 -711
- package/docs/ko/intlayer_with_vite+react.md +123 -805
- package/docs/ko/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/ko/intlayer_with_vite+solid.md +79 -151
- package/docs/ko/intlayer_with_vite+svelte.md +104 -130
- package/docs/ko/intlayer_with_vite+vanilla.md +105 -155
- package/docs/ko/intlayer_with_vite+vue.md +92 -269
- package/docs/ko/introduction.md +2 -60
- package/docs/ko/packages/express-intlayer/t.md +5 -158
- package/docs/ko/packages/hono-intlayer/t.md +1 -45
- package/docs/ko/packages/intlayer/getConfiguration.md +2 -54
- package/docs/ko/packages/intlayer/getEnumeration.md +2 -60
- package/docs/ko/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/ko/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/ko/packages/intlayer/getLocaleName.md +1 -43
- package/docs/ko/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/ko/packages/intlayer/getMultilingualUrls.md +2 -64
- package/docs/ko/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/ko/packages/intlayer/getPrefix.md +1 -12
- package/docs/ko/packages/intlayer/getTranslation.md +3 -87
- package/docs/ko/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/ko/packages/next-intlayer/t.md +5 -139
- package/docs/ko/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/ko/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/ko/packages/next-intlayer/useLocale.md +1 -51
- package/docs/ko/packages/react-intlayer/t.md +5 -133
- package/docs/ko/packages/react-intlayer/useDictionary.md +3 -113
- package/docs/ko/packages/react-intlayer/useI18n.md +4 -107
- package/docs/ko/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/ko/packages/react-intlayer/useLocale.md +3 -103
- package/docs/ko/per_locale_file.md +3 -34
- package/docs/nl/intlayer_with_fastify.md +5 -193
- package/docs/nl/intlayer_with_hono.md +5 -158
- package/docs/nl/intlayer_with_storybook.md +1 -37
- package/docs/nl/intlayer_with_vanilla.md +28 -108
- package/docs/nl/intlayer_with_vite+lit.md +98 -156
- package/docs/nl/intlayer_with_vite+vanilla.md +105 -155
- package/docs/nl/introduction.md +2 -58
- package/docs/pl/dictionary/condition.md +2 -111
- package/docs/pl/dictionary/content_file.md +2 -205
- package/docs/pl/dictionary/enumeration.md +2 -116
- package/docs/pl/dictionary/file.md +3 -102
- package/docs/pl/dictionary/function_fetching.md +3 -103
- package/docs/pl/dictionary/gender.md +2 -141
- package/docs/pl/dictionary/insertion.md +3 -57
- package/docs/pl/dictionary/nesting.md +3 -121
- package/docs/pl/dictionary/translation.md +4 -147
- package/docs/pl/interest_of_intlayer.md +2 -58
- package/docs/pl/intlayer_CMS.md +3 -227
- package/docs/pl/intlayer_visual_editor.md +1 -72
- package/docs/pl/intlayer_with_adonisjs.md +3 -109
- package/docs/pl/intlayer_with_analog.md +21 -41
- package/docs/pl/intlayer_with_angular.md +15 -41
- package/docs/pl/intlayer_with_astro.md +179 -89
- package/docs/pl/intlayer_with_astro_lit.md +615 -0
- package/docs/pl/intlayer_with_astro_preact.md +564 -0
- package/docs/pl/intlayer_with_astro_react.md +562 -0
- package/docs/pl/intlayer_with_astro_solid.md +562 -0
- package/docs/pl/intlayer_with_astro_svelte.md +566 -0
- package/docs/pl/intlayer_with_astro_vanilla.md +543 -0
- package/docs/pl/intlayer_with_astro_vue.md +584 -0
- package/docs/pl/intlayer_with_create_react_app.md +39 -696
- package/docs/pl/intlayer_with_express.md +5 -180
- package/docs/pl/intlayer_with_fastify.md +5 -193
- package/docs/pl/intlayer_with_hono.md +2 -2
- package/docs/pl/intlayer_with_lynx+react.md +3 -109
- package/docs/pl/intlayer_with_nestjs.md +3 -31
- package/docs/pl/intlayer_with_nextjs_14.md +54 -789
- package/docs/pl/intlayer_with_nextjs_15.md +39 -843
- package/docs/pl/intlayer_with_nextjs_16.md +60 -903
- package/docs/pl/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/pl/intlayer_with_nextjs_no_locale_path.md +11 -499
- package/docs/pl/intlayer_with_nextjs_page_router.md +69 -751
- package/docs/pl/intlayer_with_nuxt.md +16 -100
- package/docs/pl/intlayer_with_react_native+expo.md +31 -292
- package/docs/pl/intlayer_with_react_router_v7.md +15 -101
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +16 -94
- package/docs/pl/intlayer_with_storybook.md +1 -37
- package/docs/pl/intlayer_with_svelte_kit.md +29 -71
- package/docs/pl/intlayer_with_tanstack+solid.md +14 -70
- package/docs/pl/intlayer_with_tanstack.md +14 -62
- package/docs/pl/intlayer_with_vanilla.md +28 -108
- package/docs/pl/intlayer_with_vite+lit.md +98 -156
- package/docs/pl/intlayer_with_vite+preact.md +102 -711
- package/docs/pl/intlayer_with_vite+react.md +121 -840
- package/docs/pl/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/pl/intlayer_with_vite+solid.md +79 -151
- package/docs/pl/intlayer_with_vite+svelte.md +104 -132
- package/docs/pl/intlayer_with_vite+vanilla.md +105 -155
- package/docs/pl/intlayer_with_vite+vue.md +92 -267
- package/docs/pl/introduction.md +2 -48
- package/docs/pl/packages/express-intlayer/t.md +6 -181
- package/docs/pl/packages/hono-intlayer/t.md +1 -45
- package/docs/pl/packages/intlayer/getConfiguration.md +2 -54
- package/docs/pl/packages/intlayer/getEnumeration.md +2 -60
- package/docs/pl/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/pl/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/pl/packages/intlayer/getLocaleName.md +1 -43
- package/docs/pl/packages/intlayer/getLocalizedUrl.md +2 -59
- package/docs/pl/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/pl/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/pl/packages/intlayer/getPrefix.md +1 -19
- package/docs/pl/packages/intlayer/getTranslation.md +3 -87
- package/docs/pl/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/pl/packages/next-intlayer/t.md +5 -137
- package/docs/pl/packages/next-intlayer/useDictionary.md +3 -120
- package/docs/pl/packages/next-intlayer/useIntlayer.md +2 -82
- package/docs/pl/packages/next-intlayer/useLocale.md +1 -51
- package/docs/pl/packages/react-intlayer/t.md +4 -109
- package/docs/pl/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/pl/packages/react-intlayer/useI18n.md +3 -91
- package/docs/pl/packages/react-intlayer/useIntlayer.md +3 -114
- package/docs/pl/packages/react-intlayer/useLocale.md +3 -103
- package/docs/pl/per_locale_file.md +3 -34
- package/docs/pt/dictionary/condition.md +2 -116
- package/docs/pt/dictionary/content_file.md +2 -202
- package/docs/pt/dictionary/enumeration.md +2 -116
- package/docs/pt/dictionary/file.md +3 -101
- package/docs/pt/dictionary/function_fetching.md +3 -103
- package/docs/pt/dictionary/gender.md +2 -140
- package/docs/pt/dictionary/insertion.md +3 -57
- package/docs/pt/dictionary/nesting.md +3 -121
- package/docs/pt/dictionary/translation.md +4 -146
- package/docs/pt/interest_of_intlayer.md +2 -60
- package/docs/pt/intlayer_CMS.md +3 -227
- package/docs/pt/intlayer_visual_editor.md +1 -72
- package/docs/pt/intlayer_with_adonisjs.md +3 -109
- package/docs/pt/intlayer_with_analog.md +21 -41
- package/docs/pt/intlayer_with_angular.md +15 -41
- package/docs/pt/intlayer_with_astro.md +184 -58
- package/docs/pt/intlayer_with_astro_lit.md +597 -0
- package/docs/pt/intlayer_with_astro_preact.md +564 -0
- package/docs/pt/intlayer_with_astro_react.md +562 -0
- package/docs/pt/intlayer_with_astro_solid.md +562 -0
- package/docs/pt/intlayer_with_astro_svelte.md +566 -0
- package/docs/pt/intlayer_with_astro_vanilla.md +543 -0
- package/docs/pt/intlayer_with_astro_vue.md +584 -0
- package/docs/pt/intlayer_with_create_react_app.md +53 -654
- package/docs/pt/intlayer_with_express.md +5 -183
- package/docs/pt/intlayer_with_fastify.md +5 -193
- package/docs/pt/intlayer_with_hono.md +2 -2
- package/docs/pt/intlayer_with_lynx+react.md +2 -116
- package/docs/pt/intlayer_with_nestjs.md +3 -33
- package/docs/pt/intlayer_with_nextjs_14.md +51 -575
- package/docs/pt/intlayer_with_nextjs_15.md +56 -819
- package/docs/pt/intlayer_with_nextjs_16.md +40 -883
- package/docs/pt/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/pt/intlayer_with_nextjs_no_locale_path.md +11 -499
- package/docs/pt/intlayer_with_nextjs_page_router.md +87 -707
- package/docs/pt/intlayer_with_nuxt.md +16 -98
- package/docs/pt/intlayer_with_react_native+expo.md +31 -283
- package/docs/pt/intlayer_with_react_router_v7.md +3 -98
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/pt/intlayer_with_storybook.md +1 -37
- package/docs/pt/intlayer_with_svelte_kit.md +29 -71
- package/docs/pt/intlayer_with_tanstack+solid.md +14 -70
- package/docs/pt/intlayer_with_tanstack.md +14 -62
- package/docs/pt/intlayer_with_vanilla.md +28 -108
- package/docs/pt/intlayer_with_vite+lit.md +98 -162
- package/docs/pt/intlayer_with_vite+preact.md +100 -709
- package/docs/pt/intlayer_with_vite+react.md +104 -797
- package/docs/pt/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/pt/intlayer_with_vite+solid.md +79 -149
- package/docs/pt/intlayer_with_vite+svelte.md +104 -132
- package/docs/pt/intlayer_with_vite+vanilla.md +105 -155
- package/docs/pt/intlayer_with_vite+vue.md +80 -263
- package/docs/pt/introduction.md +2 -59
- package/docs/pt/packages/express-intlayer/t.md +6 -181
- package/docs/pt/packages/hono-intlayer/t.md +1 -45
- package/docs/pt/packages/intlayer/getConfiguration.md +2 -54
- package/docs/pt/packages/intlayer/getEnumeration.md +2 -60
- package/docs/pt/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/pt/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/pt/packages/intlayer/getLocaleName.md +1 -43
- package/docs/pt/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/pt/packages/intlayer/getMultilingualUrls.md +2 -60
- package/docs/pt/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/pt/packages/intlayer/getPrefix.md +1 -19
- package/docs/pt/packages/intlayer/getTranslation.md +3 -87
- package/docs/pt/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/pt/packages/next-intlayer/t.md +5 -137
- package/docs/pt/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/pt/packages/next-intlayer/useIntlayer.md +3 -119
- package/docs/pt/packages/next-intlayer/useLocale.md +1 -51
- package/docs/pt/packages/react-intlayer/t.md +4 -109
- package/docs/pt/packages/react-intlayer/useDictionary.md +3 -113
- package/docs/pt/packages/react-intlayer/useI18n.md +4 -107
- package/docs/pt/packages/react-intlayer/useIntlayer.md +3 -114
- package/docs/pt/packages/react-intlayer/useLocale.md +3 -103
- package/docs/pt/per_locale_file.md +3 -35
- package/docs/ru/dictionary/condition.md +2 -116
- package/docs/ru/dictionary/content_file.md +2 -204
- package/docs/ru/dictionary/enumeration.md +2 -116
- package/docs/ru/dictionary/file.md +3 -102
- package/docs/ru/dictionary/function_fetching.md +3 -103
- package/docs/ru/dictionary/gender.md +2 -140
- package/docs/ru/dictionary/insertion.md +3 -57
- package/docs/ru/dictionary/nesting.md +3 -121
- package/docs/ru/dictionary/translation.md +4 -147
- package/docs/ru/interest_of_intlayer.md +2 -60
- package/docs/ru/intlayer_CMS.md +3 -225
- package/docs/ru/intlayer_visual_editor.md +1 -72
- package/docs/ru/intlayer_with_adonisjs.md +3 -109
- package/docs/ru/intlayer_with_analog.md +21 -41
- package/docs/ru/intlayer_with_angular.md +15 -41
- package/docs/ru/intlayer_with_astro.md +172 -45
- package/docs/ru/intlayer_with_astro_lit.md +614 -0
- package/docs/ru/intlayer_with_astro_preact.md +568 -0
- package/docs/ru/intlayer_with_astro_react.md +561 -0
- package/docs/ru/intlayer_with_astro_solid.md +561 -0
- package/docs/ru/intlayer_with_astro_svelte.md +565 -0
- package/docs/ru/intlayer_with_astro_vanilla.md +542 -0
- package/docs/ru/intlayer_with_astro_vue.md +583 -0
- package/docs/ru/intlayer_with_create_react_app.md +9 -677
- package/docs/ru/intlayer_with_express.md +4 -112
- package/docs/ru/intlayer_with_fastify.md +5 -193
- package/docs/ru/intlayer_with_hono.md +2 -2
- package/docs/ru/intlayer_with_lynx+react.md +2 -116
- package/docs/ru/intlayer_with_nestjs.md +3 -33
- package/docs/ru/intlayer_with_nextjs_14.md +50 -534
- package/docs/ru/intlayer_with_nextjs_15.md +60 -834
- package/docs/ru/intlayer_with_nextjs_16.md +60 -903
- package/docs/ru/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/ru/intlayer_with_nextjs_no_locale_path.md +11 -542
- package/docs/ru/intlayer_with_nextjs_page_router.md +38 -610
- package/docs/ru/intlayer_with_nuxt.md +16 -100
- package/docs/ru/intlayer_with_react_native+expo.md +31 -286
- package/docs/ru/intlayer_with_react_router_v7.md +15 -91
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/ru/intlayer_with_storybook.md +1 -37
- package/docs/ru/intlayer_with_svelte_kit.md +29 -71
- package/docs/ru/intlayer_with_tanstack+solid.md +14 -70
- package/docs/ru/intlayer_with_tanstack.md +14 -62
- package/docs/ru/intlayer_with_vanilla.md +28 -108
- package/docs/ru/intlayer_with_vite+lit.md +98 -162
- package/docs/ru/intlayer_with_vite+preact.md +102 -711
- package/docs/ru/intlayer_with_vite+react.md +111 -807
- package/docs/ru/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/ru/intlayer_with_vite+solid.md +79 -153
- package/docs/ru/intlayer_with_vite+svelte.md +104 -132
- package/docs/ru/intlayer_with_vite+vanilla.md +105 -155
- package/docs/ru/intlayer_with_vite+vue.md +92 -266
- package/docs/ru/introduction.md +2 -62
- package/docs/ru/packages/express-intlayer/t.md +6 -183
- package/docs/ru/packages/hono-intlayer/t.md +1 -45
- package/docs/ru/packages/intlayer/getConfiguration.md +2 -54
- package/docs/ru/packages/intlayer/getEnumeration.md +2 -60
- package/docs/ru/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/ru/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/ru/packages/intlayer/getLocaleName.md +1 -43
- package/docs/ru/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/ru/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/ru/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/ru/packages/intlayer/getPrefix.md +1 -15
- package/docs/ru/packages/intlayer/getTranslation.md +3 -87
- package/docs/ru/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/ru/packages/next-intlayer/t.md +5 -139
- package/docs/ru/packages/next-intlayer/useDictionary.md +3 -119
- package/docs/ru/packages/next-intlayer/useIntlayer.md +3 -120
- package/docs/ru/packages/next-intlayer/useLocale.md +1 -51
- package/docs/ru/packages/react-intlayer/t.md +4 -111
- package/docs/ru/packages/react-intlayer/useDictionary.md +3 -115
- package/docs/ru/packages/react-intlayer/useI18n.md +4 -107
- package/docs/ru/packages/react-intlayer/useIntlayer.md +3 -118
- package/docs/ru/packages/react-intlayer/useLocale.md +2 -58
- package/docs/ru/per_locale_file.md +3 -35
- package/docs/tr/dictionary/condition.md +2 -116
- package/docs/tr/dictionary/content_file.md +2 -201
- package/docs/tr/dictionary/enumeration.md +2 -116
- package/docs/tr/dictionary/file.md +3 -100
- package/docs/tr/dictionary/function_fetching.md +3 -103
- package/docs/tr/dictionary/gender.md +2 -140
- package/docs/tr/dictionary/insertion.md +3 -57
- package/docs/tr/dictionary/nesting.md +3 -121
- package/docs/tr/dictionary/translation.md +4 -119
- package/docs/tr/interest_of_intlayer.md +2 -58
- package/docs/tr/intlayer_CMS.md +3 -227
- package/docs/tr/intlayer_visual_editor.md +1 -72
- package/docs/tr/intlayer_with_adonisjs.md +3 -109
- package/docs/tr/intlayer_with_analog.md +21 -41
- package/docs/tr/intlayer_with_angular.md +15 -41
- package/docs/tr/intlayer_with_astro.md +187 -61
- package/docs/tr/intlayer_with_astro_lit.md +615 -0
- package/docs/tr/intlayer_with_astro_preact.md +564 -0
- package/docs/tr/intlayer_with_astro_react.md +562 -0
- package/docs/tr/intlayer_with_astro_solid.md +562 -0
- package/docs/tr/intlayer_with_astro_svelte.md +566 -0
- package/docs/tr/intlayer_with_astro_vanilla.md +543 -0
- package/docs/tr/intlayer_with_astro_vue.md +584 -0
- package/docs/tr/intlayer_with_create_react_app.md +33 -685
- package/docs/tr/intlayer_with_express.md +5 -179
- package/docs/tr/intlayer_with_fastify.md +5 -193
- package/docs/tr/intlayer_with_hono.md +2 -2
- package/docs/tr/intlayer_with_lynx+react.md +2 -108
- package/docs/tr/intlayer_with_nestjs.md +3 -31
- package/docs/tr/intlayer_with_nextjs_14.md +12 -431
- package/docs/tr/intlayer_with_nextjs_15.md +59 -815
- package/docs/tr/intlayer_with_nextjs_16.md +60 -903
- package/docs/tr/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +11 -498
- package/docs/tr/intlayer_with_nextjs_page_router.md +37 -622
- package/docs/tr/intlayer_with_nuxt.md +16 -98
- package/docs/tr/intlayer_with_react_native+expo.md +31 -265
- package/docs/tr/intlayer_with_react_router_v7.md +15 -91
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +15 -91
- package/docs/tr/intlayer_with_storybook.md +1 -37
- package/docs/tr/intlayer_with_svelte_kit.md +29 -71
- package/docs/tr/intlayer_with_tanstack+solid.md +14 -70
- package/docs/tr/intlayer_with_tanstack.md +14 -62
- package/docs/tr/intlayer_with_vanilla.md +28 -108
- package/docs/tr/intlayer_with_vite+lit.md +98 -156
- package/docs/tr/intlayer_with_vite+preact.md +102 -711
- package/docs/tr/intlayer_with_vite+react.md +107 -791
- package/docs/tr/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/tr/intlayer_with_vite+solid.md +79 -149
- package/docs/tr/intlayer_with_vite+svelte.md +104 -132
- package/docs/tr/intlayer_with_vite+vanilla.md +105 -155
- package/docs/tr/intlayer_with_vite+vue.md +92 -196
- package/docs/tr/introduction.md +2 -58
- package/docs/tr/packages/express-intlayer/t.md +6 -181
- package/docs/tr/packages/hono-intlayer/t.md +1 -45
- package/docs/tr/packages/intlayer/getConfiguration.md +2 -54
- package/docs/tr/packages/intlayer/getEnumeration.md +2 -60
- package/docs/tr/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/tr/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/tr/packages/intlayer/getLocaleName.md +1 -43
- package/docs/tr/packages/intlayer/getLocalizedUrl.md +3 -79
- package/docs/tr/packages/intlayer/getMultilingualUrls.md +2 -60
- package/docs/tr/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/tr/packages/intlayer/getPrefix.md +1 -15
- package/docs/tr/packages/intlayer/getTranslation.md +3 -87
- package/docs/tr/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/tr/packages/next-intlayer/t.md +5 -137
- package/docs/tr/packages/next-intlayer/useDictionary.md +3 -118
- package/docs/tr/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/tr/packages/next-intlayer/useLocale.md +1 -51
- package/docs/tr/packages/react-intlayer/t.md +4 -109
- package/docs/tr/packages/react-intlayer/useDictionary.md +3 -113
- package/docs/tr/packages/react-intlayer/useI18n.md +8 -214
- package/docs/tr/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/tr/packages/react-intlayer/useLocale.md +3 -103
- package/docs/tr/per_locale_file.md +3 -33
- package/docs/uk/dictionary/condition.md +2 -116
- package/docs/uk/dictionary/content_file.md +2 -218
- package/docs/uk/dictionary/enumeration.md +2 -116
- package/docs/uk/dictionary/file.md +3 -100
- package/docs/uk/dictionary/function_fetching.md +3 -103
- package/docs/uk/dictionary/gender.md +2 -140
- package/docs/uk/dictionary/insertion.md +3 -57
- package/docs/uk/dictionary/nesting.md +3 -121
- package/docs/uk/dictionary/translation.md +4 -156
- package/docs/uk/interest_of_intlayer.md +2 -60
- package/docs/uk/intlayer_CMS.md +3 -227
- package/docs/uk/intlayer_visual_editor.md +1 -72
- package/docs/uk/intlayer_with_adonisjs.md +3 -109
- package/docs/uk/intlayer_with_analog.md +21 -41
- package/docs/uk/intlayer_with_angular.md +15 -41
- package/docs/uk/intlayer_with_astro.md +187 -70
- package/docs/uk/intlayer_with_astro_lit.md +615 -0
- package/docs/uk/intlayer_with_astro_preact.md +564 -0
- package/docs/uk/intlayer_with_astro_react.md +562 -0
- package/docs/uk/intlayer_with_astro_solid.md +562 -0
- package/docs/uk/intlayer_with_astro_svelte.md +566 -0
- package/docs/uk/intlayer_with_astro_vanilla.md +543 -0
- package/docs/uk/intlayer_with_astro_vue.md +584 -0
- package/docs/uk/intlayer_with_create_react_app.md +39 -697
- package/docs/uk/intlayer_with_express.md +5 -184
- package/docs/uk/intlayer_with_fastify.md +5 -193
- package/docs/uk/intlayer_with_hono.md +2 -2
- package/docs/uk/intlayer_with_lynx+react.md +3 -118
- package/docs/uk/intlayer_with_nestjs.md +3 -31
- package/docs/uk/intlayer_with_nextjs_14.md +54 -797
- package/docs/uk/intlayer_with_nextjs_15.md +42 -708
- package/docs/uk/intlayer_with_nextjs_16.md +60 -903
- package/docs/uk/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +11 -499
- package/docs/uk/intlayer_with_nextjs_page_router.md +37 -659
- package/docs/uk/intlayer_with_nuxt.md +16 -106
- package/docs/uk/intlayer_with_react_native+expo.md +31 -293
- package/docs/uk/intlayer_with_react_router_v7.md +15 -99
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +15 -93
- package/docs/uk/intlayer_with_storybook.md +1 -37
- package/docs/uk/intlayer_with_svelte_kit.md +28 -70
- package/docs/uk/intlayer_with_tanstack+solid.md +14 -70
- package/docs/uk/intlayer_with_tanstack.md +14 -62
- package/docs/uk/intlayer_with_vanilla.md +28 -108
- package/docs/uk/intlayer_with_vite+lit.md +98 -156
- package/docs/uk/intlayer_with_vite+preact.md +105 -714
- package/docs/uk/intlayer_with_vite+react.md +113 -822
- package/docs/uk/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/uk/intlayer_with_vite+solid.md +79 -151
- package/docs/uk/intlayer_with_vite+svelte.md +104 -132
- package/docs/uk/intlayer_with_vite+vanilla.md +105 -155
- package/docs/uk/intlayer_with_vite+vue.md +92 -268
- package/docs/uk/introduction.md +2 -61
- package/docs/uk/packages/express-intlayer/t.md +6 -187
- package/docs/uk/packages/hono-intlayer/t.md +1 -45
- package/docs/uk/packages/intlayer/getConfiguration.md +2 -54
- package/docs/uk/packages/intlayer/getEnumeration.md +2 -60
- package/docs/uk/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/uk/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/uk/packages/intlayer/getLocaleName.md +1 -43
- package/docs/uk/packages/intlayer/getLocalizedUrl.md +3 -71
- package/docs/uk/packages/intlayer/getMultilingualUrls.md +3 -79
- package/docs/uk/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/uk/packages/intlayer/getPrefix.md +1 -15
- package/docs/uk/packages/intlayer/getTranslation.md +3 -87
- package/docs/uk/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/uk/packages/next-intlayer/t.md +5 -141
- package/docs/uk/packages/next-intlayer/useDictionary.md +3 -126
- package/docs/uk/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/uk/packages/next-intlayer/useLocale.md +1 -51
- package/docs/uk/packages/react-intlayer/t.md +4 -113
- package/docs/uk/packages/react-intlayer/useDictionary.md +3 -118
- package/docs/uk/packages/react-intlayer/useI18n.md +4 -107
- package/docs/uk/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/uk/packages/react-intlayer/useLocale.md +3 -103
- package/docs/uk/per_locale_file.md +3 -34
- package/docs/ur/intlayer_with_fastify.md +5 -193
- package/docs/ur/intlayer_with_hono.md +5 -158
- package/docs/ur/intlayer_with_storybook.md +1 -37
- package/docs/ur/intlayer_with_vanilla.md +28 -108
- package/docs/ur/intlayer_with_vite+lit.md +98 -156
- package/docs/ur/intlayer_with_vite+vanilla.md +105 -155
- package/docs/ur/introduction.md +2 -58
- package/docs/vi/dictionary/condition.md +2 -116
- package/docs/vi/dictionary/content_file.md +2 -200
- package/docs/vi/dictionary/enumeration.md +2 -116
- package/docs/vi/dictionary/file.md +3 -102
- package/docs/vi/dictionary/function_fetching.md +3 -103
- package/docs/vi/dictionary/gender.md +2 -140
- package/docs/vi/dictionary/insertion.md +3 -57
- package/docs/vi/dictionary/nesting.md +3 -121
- package/docs/vi/dictionary/translation.md +4 -146
- package/docs/vi/interest_of_intlayer.md +2 -60
- package/docs/vi/intlayer_CMS.md +3 -227
- package/docs/vi/intlayer_visual_editor.md +1 -72
- package/docs/vi/intlayer_with_adonisjs.md +3 -109
- package/docs/vi/intlayer_with_analog.md +21 -41
- package/docs/vi/intlayer_with_angular.md +15 -41
- package/docs/vi/intlayer_with_astro.md +184 -66
- package/docs/vi/intlayer_with_astro_lit.md +615 -0
- package/docs/vi/intlayer_with_astro_preact.md +564 -0
- package/docs/vi/intlayer_with_astro_react.md +562 -0
- package/docs/vi/intlayer_with_astro_solid.md +562 -0
- package/docs/vi/intlayer_with_astro_svelte.md +566 -0
- package/docs/vi/intlayer_with_astro_vanilla.md +543 -0
- package/docs/vi/intlayer_with_astro_vue.md +584 -0
- package/docs/vi/intlayer_with_create_react_app.md +39 -693
- package/docs/vi/intlayer_with_express.md +5 -179
- package/docs/vi/intlayer_with_fastify.md +5 -193
- package/docs/vi/intlayer_with_hono.md +2 -2
- package/docs/vi/intlayer_with_lynx+react.md +3 -111
- package/docs/vi/intlayer_with_nestjs.md +3 -31
- package/docs/vi/intlayer_with_nextjs_14.md +54 -785
- package/docs/vi/intlayer_with_nextjs_15.md +34 -1171
- package/docs/vi/intlayer_with_nextjs_16.md +60 -903
- package/docs/vi/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/vi/intlayer_with_nextjs_no_locale_path.md +10 -516
- package/docs/vi/intlayer_with_nextjs_page_router.md +69 -742
- package/docs/vi/intlayer_with_nuxt.md +16 -98
- package/docs/vi/intlayer_with_react_native+expo.md +31 -293
- package/docs/vi/intlayer_with_react_router_v7.md +15 -101
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +15 -101
- package/docs/vi/intlayer_with_storybook.md +1 -37
- package/docs/vi/intlayer_with_svelte_kit.md +29 -71
- package/docs/vi/intlayer_with_tanstack+solid.md +14 -70
- package/docs/vi/intlayer_with_tanstack.md +14 -62
- package/docs/vi/intlayer_with_vanilla.md +28 -108
- package/docs/vi/intlayer_with_vite+lit.md +98 -156
- package/docs/vi/intlayer_with_vite+preact.md +103 -712
- package/docs/vi/intlayer_with_vite+react.md +105 -787
- package/docs/vi/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/vi/intlayer_with_vite+solid.md +79 -150
- package/docs/vi/intlayer_with_vite+svelte.md +104 -132
- package/docs/vi/intlayer_with_vite+vanilla.md +105 -155
- package/docs/vi/intlayer_with_vite+vue.md +92 -252
- package/docs/vi/introduction.md +2 -58
- package/docs/vi/packages/express-intlayer/t.md +6 -181
- package/docs/vi/packages/hono-intlayer/t.md +1 -45
- package/docs/vi/packages/intlayer/getConfiguration.md +2 -54
- package/docs/vi/packages/intlayer/getEnumeration.md +2 -62
- package/docs/vi/packages/intlayer/getHTMLTextDir.md +2 -38
- package/docs/vi/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/vi/packages/intlayer/getLocaleName.md +1 -54
- package/docs/vi/packages/intlayer/getLocalizedUrl.md +2 -59
- package/docs/vi/packages/intlayer/getMultilingualUrls.md +2 -62
- package/docs/vi/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/vi/packages/intlayer/getPrefix.md +1 -15
- package/docs/vi/packages/intlayer/getTranslation.md +3 -98
- package/docs/vi/packages/intlayer/getTranslationContent.md +3 -86
- package/docs/vi/packages/next-intlayer/t.md +5 -137
- package/docs/vi/packages/next-intlayer/useDictionary.md +3 -123
- package/docs/vi/packages/next-intlayer/useIntlayer.md +3 -117
- package/docs/vi/packages/next-intlayer/useLocale.md +1 -51
- package/docs/vi/packages/react-intlayer/t.md +4 -111
- package/docs/vi/packages/react-intlayer/useDictionary.md +3 -114
- package/docs/vi/packages/react-intlayer/useI18n.md +5 -124
- package/docs/vi/packages/react-intlayer/useIntlayer.md +3 -114
- package/docs/vi/packages/react-intlayer/useLocale.md +3 -103
- package/docs/vi/per_locale_file.md +3 -35
- package/docs/zh/dictionary/condition.md +2 -116
- package/docs/zh/dictionary/content_file.md +2 -201
- package/docs/zh/dictionary/enumeration.md +2 -116
- package/docs/zh/dictionary/file.md +3 -101
- package/docs/zh/dictionary/function_fetching.md +3 -103
- package/docs/zh/dictionary/gender.md +2 -140
- package/docs/zh/dictionary/insertion.md +3 -57
- package/docs/zh/dictionary/nesting.md +3 -121
- package/docs/zh/dictionary/translation.md +5 -159
- package/docs/zh/interest_of_intlayer.md +2 -59
- package/docs/zh/intlayer_CMS.md +3 -224
- package/docs/zh/intlayer_visual_editor.md +1 -72
- package/docs/zh/intlayer_with_adonisjs.md +3 -109
- package/docs/zh/intlayer_with_analog.md +21 -41
- package/docs/zh/intlayer_with_angular.md +15 -41
- package/docs/zh/intlayer_with_astro.md +169 -58
- package/docs/zh/intlayer_with_astro_lit.md +598 -0
- package/docs/zh/intlayer_with_astro_preact.md +547 -0
- package/docs/zh/intlayer_with_astro_react.md +545 -0
- package/docs/zh/intlayer_with_astro_solid.md +545 -0
- package/docs/zh/intlayer_with_astro_svelte.md +549 -0
- package/docs/zh/intlayer_with_astro_vanilla.md +526 -0
- package/docs/zh/intlayer_with_astro_vue.md +567 -0
- package/docs/zh/intlayer_with_create_react_app.md +33 -680
- package/docs/zh/intlayer_with_express.md +5 -182
- package/docs/zh/intlayer_with_fastify.md +5 -193
- package/docs/zh/intlayer_with_hono.md +5 -158
- package/docs/zh/intlayer_with_lynx+react.md +2 -116
- package/docs/zh/intlayer_with_nestjs.md +3 -31
- package/docs/zh/intlayer_with_nextjs_14.md +56 -597
- package/docs/zh/intlayer_with_nextjs_15.md +56 -818
- package/docs/zh/intlayer_with_nextjs_16.md +60 -903
- package/docs/zh/intlayer_with_nextjs_compiler.md +2 -62
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +11 -541
- package/docs/zh/intlayer_with_nextjs_page_router.md +39 -636
- package/docs/zh/intlayer_with_nuxt.md +16 -101
- package/docs/zh/intlayer_with_react_native+expo.md +31 -286
- package/docs/zh/intlayer_with_react_router_v7.md +15 -92
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +15 -92
- package/docs/zh/intlayer_with_storybook.md +1 -37
- package/docs/zh/intlayer_with_svelte_kit.md +29 -71
- package/docs/zh/intlayer_with_tanstack+solid.md +14 -70
- package/docs/zh/intlayer_with_tanstack.md +14 -2
- package/docs/zh/intlayer_with_vanilla.md +28 -108
- package/docs/zh/intlayer_with_vite+lit.md +98 -162
- package/docs/zh/intlayer_with_vite+preact.md +104 -713
- package/docs/zh/intlayer_with_vite+react.md +106 -786
- package/docs/zh/intlayer_with_vite+react_compiler.md +87 -1
- package/docs/zh/intlayer_with_vite+solid.md +79 -151
- package/docs/zh/intlayer_with_vite+svelte.md +104 -132
- package/docs/zh/intlayer_with_vite+vanilla.md +105 -155
- package/docs/zh/intlayer_with_vite+vue.md +92 -256
- package/docs/zh/introduction.md +2 -59
- package/docs/zh/packages/express-intlayer/t.md +6 -183
- package/docs/zh/packages/hono-intlayer/t.md +2 -70
- package/docs/zh/packages/intlayer/getConfiguration.md +2 -54
- package/docs/zh/packages/intlayer/getEnumeration.md +2 -60
- package/docs/zh/packages/intlayer/getHTMLTextDir.md +2 -39
- package/docs/zh/packages/intlayer/getLocaleLang.md +1 -19
- package/docs/zh/packages/intlayer/getLocaleName.md +1 -43
- package/docs/zh/packages/intlayer/getLocalizedUrl.md +2 -45
- package/docs/zh/packages/intlayer/getMultilingualUrls.md +2 -64
- package/docs/zh/packages/intlayer/getPathWithoutLocale.md +1 -19
- package/docs/zh/packages/intlayer/getPrefix.md +1 -12
- package/docs/zh/packages/intlayer/getTranslation.md +3 -87
- package/docs/zh/packages/intlayer/getTranslationContent.md +3 -87
- package/docs/zh/packages/next-intlayer/t.md +5 -139
- package/docs/zh/packages/next-intlayer/useDictionary.md +3 -120
- package/docs/zh/packages/next-intlayer/useIntlayer.md +3 -119
- package/docs/zh/packages/next-intlayer/useLocale.md +1 -51
- package/docs/zh/packages/react-intlayer/t.md +4 -107
- package/docs/zh/packages/react-intlayer/useDictionary.md +3 -116
- package/docs/zh/packages/react-intlayer/useI18n.md +4 -107
- package/docs/zh/packages/react-intlayer/useIntlayer.md +3 -109
- package/docs/zh/packages/react-intlayer/useLocale.md +3 -103
- package/docs/zh/per_locale_file.md +3 -35
- package/package.json +6 -6
- package/src/common.ts +2 -1
- package/src/generated/docs.entry.ts +140 -0
|
@@ -16,6 +16,7 @@ slugs:
|
|
|
16
16
|
- nextjs
|
|
17
17
|
- 15
|
|
18
18
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-15-template
|
|
19
|
+
applicationShowcase: https://next-15-intlayer-template-xt83.vercel.app
|
|
19
20
|
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
20
21
|
history:
|
|
21
22
|
- version: 7.5.9
|
|
@@ -89,13 +90,24 @@ Với Intlayer, bạn có thể:
|
|
|
89
90
|
<Tab label="Code" value="code">
|
|
90
91
|
|
|
91
92
|
<iframe
|
|
92
|
-
src="https://
|
|
93
|
+
src="https://ide.intlayer.org/aymericzip/intlayer-next-15-template?file=intlayer.config.ts"
|
|
93
94
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
94
95
|
title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
|
|
95
96
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
96
97
|
loading="lazy"
|
|
97
98
|
/>
|
|
98
99
|
|
|
100
|
+
</Tab>
|
|
101
|
+
<Tab label="Bản demo" value="demo">
|
|
102
|
+
|
|
103
|
+
<iframe
|
|
104
|
+
src="https://next-15-intlayer-template-xt83.vercel.app"
|
|
105
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
106
|
+
title="Bản demo — intlayer-next-15-template"
|
|
107
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
108
|
+
loading="lazy"
|
|
109
|
+
/>
|
|
110
|
+
|
|
99
111
|
</Tab>
|
|
100
112
|
</Tabs>
|
|
101
113
|
|
|
@@ -165,7 +177,7 @@ Here is the final structure that we will make:
|
|
|
165
177
|
|
|
166
178
|
Tạo một file cấu hình để cấu hình các ngôn ngữ của ứng dụng của bạn:
|
|
167
179
|
|
|
168
|
-
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
180
|
+
```typescript fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
169
181
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
170
182
|
|
|
171
183
|
const config: IntlayerConfig = {
|
|
@@ -183,51 +195,13 @@ const config: IntlayerConfig = {
|
|
|
183
195
|
export default config;
|
|
184
196
|
```
|
|
185
197
|
|
|
186
|
-
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
187
|
-
import { Locales } from "intlayer";
|
|
188
|
-
|
|
189
|
-
/** @type {import('intlayer').IntlayerConfig} */
|
|
190
|
-
const config = {
|
|
191
|
-
internationalization: {
|
|
192
|
-
locales: [
|
|
193
|
-
Locales.ENGLISH,
|
|
194
|
-
Locales.FRENCH,
|
|
195
|
-
Locales.SPANISH,
|
|
196
|
-
// Các ngôn ngữ khác của bạn
|
|
197
|
-
],
|
|
198
|
-
defaultLocale: Locales.ENGLISH,
|
|
199
|
-
},
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
export default config;
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
206
|
-
const { Locales } = require("intlayer");
|
|
207
|
-
|
|
208
|
-
/** @type {import('intlayer').IntlayerConfig} */
|
|
209
|
-
const config = {
|
|
210
|
-
internationalization: {
|
|
211
|
-
locales: [
|
|
212
|
-
Locales.ENGLISH,
|
|
213
|
-
Locales.FRENCH,
|
|
214
|
-
Locales.SPANISH,
|
|
215
|
-
// Các locale khác của bạn
|
|
216
|
-
],
|
|
217
|
-
defaultLocale: Locales.ENGLISH,
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
module.exports = config;
|
|
222
|
-
```
|
|
223
|
-
|
|
224
198
|
> Thông qua tệp cấu hình này, bạn có thể thiết lập URL địa phương hóa, chuyển hướng middleware, tên cookie, vị trí và phần mở rộng của các khai báo nội dung, tắt các log của Intlayer trên console, và nhiều hơn nữa. Để xem danh sách đầy đủ các tham số có sẵn, hãy tham khảo [tài liệu cấu hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md).
|
|
225
199
|
|
|
226
200
|
### Bước 3: Tích hợp Intlayer vào cấu hình Next.js của bạn
|
|
227
201
|
|
|
228
202
|
Cấu hình thiết lập Next.js của bạn để sử dụng Intlayer:
|
|
229
203
|
|
|
230
|
-
```typescript fileName="next.config.ts" codeFormat="typescript"
|
|
204
|
+
```typescript fileName="next.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
231
205
|
import type { NextConfig } from "next";
|
|
232
206
|
import { withIntlayer } from "next-intlayer/server";
|
|
233
207
|
|
|
@@ -238,28 +212,6 @@ const nextConfig: NextConfig = {
|
|
|
238
212
|
export default withIntlayer(nextConfig);
|
|
239
213
|
```
|
|
240
214
|
|
|
241
|
-
```typescript fileName="next.config.mjs" codeFormat="esm"
|
|
242
|
-
import { withIntlayer } from "next-intlayer/server";
|
|
243
|
-
|
|
244
|
-
/** @type {import('next').NextConfig} */
|
|
245
|
-
const nextConfig = {
|
|
246
|
-
/* các tùy chọn cấu hình ở đây */
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
export default withIntlayer(nextConfig);
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
```typescript fileName="next.config.cjs" codeFormat="commonjs"
|
|
253
|
-
const { withIntlayer } = require("next-intlayer/server");
|
|
254
|
-
|
|
255
|
-
/** @type {import('next').NextConfig} */
|
|
256
|
-
const nextConfig = {
|
|
257
|
-
/* các tùy chọn cấu hình ở đây */
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
module.exports = withIntlayer(nextConfig);
|
|
261
|
-
```
|
|
262
|
-
|
|
263
215
|
> Plugin Next.js `withIntlayer()` được sử dụng để tích hợp Intlayer với Next.js. Nó đảm bảo việc xây dựng các tệp khai báo nội dung và giám sát chúng trong chế độ phát triển. Nó định nghĩa các biến môi trường Intlayer trong môi trường [Webpack](https://webpack.js.org/) hoặc [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack). Ngoài ra, nó cung cấp các bí danh để tối ưu hiệu suất và đảm bảo tương thích với các thành phần server.
|
|
264
216
|
|
|
265
217
|
> Hàm `withIntlayer()` là một hàm promise. Nó cho phép chuẩn bị các từ điển intlayer trước khi quá trình build bắt đầu. Nếu bạn muốn sử dụng nó cùng với các plugin khác, bạn có thể dùng await. Ví dụ:
|
|
@@ -327,7 +279,7 @@ module.exports = {
|
|
|
327
279
|
|
|
328
280
|
Để triển khai dynamic routing, cung cấp đường dẫn cho locale bằng cách thêm một layout mới trong thư mục `[locale]` của bạn:
|
|
329
281
|
|
|
330
|
-
````tsx fileName="src/app/[locale]/layout.tsx" codeFormat="typescript"
|
|
282
|
+
````tsx fileName="src/app/[locale]/layout.tsx" codeFormat={["typescript", "esm"]}
|
|
331
283
|
import type { NextLayoutIntlayer } from "next-intlayer";
|
|
332
284
|
import { Inter } from "next/font/google";
|
|
333
285
|
import { getHTMLTextDir } from "intlayer";
|
|
@@ -342,7 +294,7 @@ const LocaleLayout: NextLayoutIntlayer = async ({ children, params }) => {
|
|
|
342
294
|
Để triển khai routing động, cung cấp đường dẫn cho locale bằng cách thêm một layout mới trong thư mục `[locale]` của bạn:
|
|
343
295
|
|
|
344
296
|
```tsx fileName="src/app/[locale]/layout.tsx" codeFormat="typescript"
|
|
345
|
-
import type
|
|
297
|
+
import { type NextLayoutIntlayer, IntlayerClientProvider } from "next-intlayer";
|
|
346
298
|
import { Inter } from "next/font/google";
|
|
347
299
|
import { getHTMLTextDir } from "intlayer";
|
|
348
300
|
|
|
@@ -352,7 +304,11 @@ const LocaleLayout: NextLayoutIntlayer = async ({ children, params }) => {
|
|
|
352
304
|
const { locale } = await params;
|
|
353
305
|
return (
|
|
354
306
|
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
355
|
-
<body className={inter.className}>
|
|
307
|
+
<body className={inter.className}>
|
|
308
|
+
<IntlayerClientProvider locale={locale}>
|
|
309
|
+
{children}
|
|
310
|
+
</IntlayerClientProvider>
|
|
311
|
+
</body>
|
|
356
312
|
</html>
|
|
357
313
|
);
|
|
358
314
|
};
|
|
@@ -360,41 +316,6 @@ const LocaleLayout: NextLayoutIntlayer = async ({ children, params }) => {
|
|
|
360
316
|
export default LocaleLayout;
|
|
361
317
|
````
|
|
362
318
|
|
|
363
|
-
```jsx fileName="src/app/[locale]/layout.mjx" codeFormat="esm"
|
|
364
|
-
import { getHTMLTextDir } from "intlayer";
|
|
365
|
-
|
|
366
|
-
const inter = Inter({ subsets: ["latin"] });
|
|
367
|
-
|
|
368
|
-
const LocaleLayout = async ({ children, params: { locale } }) => {
|
|
369
|
-
const { locale } = await params;
|
|
370
|
-
return (
|
|
371
|
-
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
372
|
-
<body className={inter.className}>{children}</body>
|
|
373
|
-
</html>
|
|
374
|
-
);
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
export default LocaleLayout;
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
```jsx fileName="src/app/[locale]/layout.csx" codeFormat="commonjs"
|
|
381
|
-
const { Inter } = require("next/font/google");
|
|
382
|
-
const { getHTMLTextDir } = require("intlayer");
|
|
383
|
-
|
|
384
|
-
const inter = Inter({ subsets: ["latin"] });
|
|
385
|
-
|
|
386
|
-
const LocaleLayout = async ({ children, params: { locale } }) => {
|
|
387
|
-
const { locale } = await params;
|
|
388
|
-
return (
|
|
389
|
-
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
390
|
-
<body className={inter.className}>{children}</body>
|
|
391
|
-
</html>
|
|
392
|
-
);
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
module.exports = LocaleLayout;
|
|
396
|
-
```
|
|
397
|
-
|
|
398
319
|
> Đoạn đường dẫn `[locale]` được sử dụng để định nghĩa locale. Ví dụ: `/en-US/about` sẽ tương ứng với `en-US` và `/fr/about` sẽ tương ứng với `fr`.
|
|
399
320
|
|
|
400
321
|
const inter = Inter({ subsets: ["latin"] });
|
|
@@ -404,7 +325,9 @@ const { locale } = await params;
|
|
|
404
325
|
return (
|
|
405
326
|
|
|
406
327
|
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
407
|
-
<body className={inter.className}>
|
|
328
|
+
<body className={inter.className}>
|
|
329
|
+
{children}
|
|
330
|
+
</body>
|
|
408
331
|
</html>
|
|
409
332
|
);
|
|
410
333
|
};
|
|
@@ -457,7 +380,7 @@ module.exports = { default: LocaleLayout, generateStaticParams };
|
|
|
457
380
|
|
|
458
381
|
Tạo và quản lý các khai báo nội dung để lưu trữ bản dịch:
|
|
459
382
|
|
|
460
|
-
```tsx fileName="src/app/[locale]/page.content.ts" contentDeclarationFormat="typescript"
|
|
383
|
+
```tsx fileName="src/app/[locale]/page.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
461
384
|
import { t, type Dictionary } from "intlayer";
|
|
462
385
|
|
|
463
386
|
const pageContent = {
|
|
@@ -477,50 +400,6 @@ const pageContent = {
|
|
|
477
400
|
export default pageContent;
|
|
478
401
|
```
|
|
479
402
|
|
|
480
|
-
```javascript fileName="src/app/[locale]/page.content.mjs" contentDeclarationFormat="esm"
|
|
481
|
-
import { t } from "intlayer";
|
|
482
|
-
|
|
483
|
-
/** @type {import('intlayer').Dictionary} */
|
|
484
|
-
// Nội dung trang với các bản dịch
|
|
485
|
-
const pageContent = {
|
|
486
|
-
key: "page",
|
|
487
|
-
content: {
|
|
488
|
-
getStarted: {
|
|
489
|
-
main: t({
|
|
490
|
-
en: "Get started by editing",
|
|
491
|
-
fr: "Commencez par éditer",
|
|
492
|
-
es: "Comience por editar",
|
|
493
|
-
}),
|
|
494
|
-
pageLink: "src/app/page.tsx",
|
|
495
|
-
},
|
|
496
|
-
},
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
export default pageContent;
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
```javascript fileName="src/app/[locale]/page.content.cjs" contentDeclarationFormat="commonjs"
|
|
503
|
-
const { t } = require("intlayer");
|
|
504
|
-
|
|
505
|
-
/** @type {import('intlayer').Dictionary} */
|
|
506
|
-
const pageContent = {
|
|
507
|
-
key: "page",
|
|
508
|
-
content: {
|
|
509
|
-
getStarted: {
|
|
510
|
-
main: t({
|
|
511
|
-
en: "Get started by editing",
|
|
512
|
-
fr: "Commencez par éditer",
|
|
513
|
-
es: "Comience por editar",
|
|
514
|
-
vi: "Bắt đầu bằng cách chỉnh sửa",
|
|
515
|
-
}),
|
|
516
|
-
pageLink: "src/app/page.tsx",
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
module.exports = pageContent;
|
|
522
|
-
```
|
|
523
|
-
|
|
524
403
|
```json fileName="src/app/[locale]/page.content.json" contentDeclarationFormat="json"
|
|
525
404
|
{
|
|
526
405
|
"$schema": "https://intlayer.org/schema.json",
|
|
@@ -548,11 +427,11 @@ module.exports = pageContent;
|
|
|
548
427
|
|
|
549
428
|
Truy cập các từ điển nội dung của bạn trong toàn bộ ứng dụng:
|
|
550
429
|
|
|
551
|
-
```tsx fileName="src/app/[locale]/page.tsx" codeFormat="typescript"
|
|
430
|
+
```tsx fileName="src/app/[locale]/page.tsx" codeFormat={["typescript", "esm"]}
|
|
552
431
|
import type { FC } from "react";
|
|
553
432
|
import { ClientComponentExample } from "@components/ClientComponentExample";
|
|
554
433
|
import { ServerComponentExample } from "@components/ServerComponentExample";
|
|
555
|
-
import { type NextPageIntlayer
|
|
434
|
+
import { type NextPageIntlayer } from "next-intlayer";
|
|
556
435
|
import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
|
|
557
436
|
|
|
558
437
|
const PageContent: FC = () => {
|
|
@@ -575,45 +454,7 @@ const Page: NextPageIntlayer = async ({ params }) => {
|
|
|
575
454
|
<PageContent />
|
|
576
455
|
<ServerComponentExample />
|
|
577
456
|
|
|
578
|
-
<
|
|
579
|
-
<ClientComponentExample />
|
|
580
|
-
</IntlayerClientProvider>
|
|
581
|
-
</IntlayerServerProvider>
|
|
582
|
-
);
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
export default Page;
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
```jsx fileName="src/app/[locale]/page.mjx" codeFormat="esm"
|
|
589
|
-
import { ClientComponentExample } from "@components/ClientComponentExample";
|
|
590
|
-
import { ServerComponentExample } from "@components/ServerComponentExample";
|
|
591
|
-
import { IntlayerClientProvider } from "next-intlayer";
|
|
592
|
-
import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
|
|
593
|
-
|
|
594
|
-
const PageContent = () => {
|
|
595
|
-
const content = useIntlayer("page");
|
|
596
|
-
|
|
597
|
-
return (
|
|
598
|
-
<>
|
|
599
|
-
<p>{content.getStarted.main}</p> {/* Nội dung chính để bắt đầu */}
|
|
600
|
-
<code>{content.getStarted.pageLink}</code>{" "}
|
|
601
|
-
{/* Liên kết trang để bắt đầu */}
|
|
602
|
-
</>
|
|
603
|
-
);
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
const Page = async ({ params }) => {
|
|
607
|
-
const { locale } = await params;
|
|
608
|
-
|
|
609
|
-
return (
|
|
610
|
-
<IntlayerServerProvider locale={locale}>
|
|
611
|
-
<PageContent />
|
|
612
|
-
<ServerComponentExample />
|
|
613
|
-
|
|
614
|
-
<IntlayerClientProvider locale={locale}>
|
|
615
|
-
<ClientComponentExample />
|
|
616
|
-
</IntlayerClientProvider>
|
|
457
|
+
<ClientComponentExample />
|
|
617
458
|
</IntlayerServerProvider>
|
|
618
459
|
);
|
|
619
460
|
};
|
|
@@ -621,39 +462,6 @@ const Page = async ({ params }) => {
|
|
|
621
462
|
export default Page;
|
|
622
463
|
```
|
|
623
464
|
|
|
624
|
-
```jsx fileName="src/app/[locale]/page.csx" codeFormat="commonjs"
|
|
625
|
-
import { ClientComponentExample } from "@components/ClientComponentExample";
|
|
626
|
-
import { ServerComponentExample } from "@components/ServerComponentExample";
|
|
627
|
-
import { IntlayerClientProvider } from "next-intlayer";
|
|
628
|
-
import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
|
|
629
|
-
|
|
630
|
-
const PageContent = () => {
|
|
631
|
-
const content = useIntlayer("page");
|
|
632
|
-
|
|
633
|
-
return (
|
|
634
|
-
<>
|
|
635
|
-
<p>{content.getStarted.main}</p>
|
|
636
|
-
<code>{content.getStarted.pageLink}</code>
|
|
637
|
-
</>
|
|
638
|
-
);
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
const Page = async ({ params }) => {
|
|
642
|
-
const { locale } = await params;
|
|
643
|
-
|
|
644
|
-
return (
|
|
645
|
-
<IntlayerServerProvider locale={locale}>
|
|
646
|
-
<PageContent />
|
|
647
|
-
<ServerComponentExample />
|
|
648
|
-
|
|
649
|
-
<IntlayerClientProvider locale={locale}>
|
|
650
|
-
<ClientComponentExample />
|
|
651
|
-
</IntlayerClientProvider>
|
|
652
|
-
</IntlayerServerProvider>
|
|
653
|
-
);
|
|
654
|
-
};
|
|
655
|
-
```
|
|
656
|
-
|
|
657
465
|
- **`IntlayerClientProvider`** được sử dụng để cung cấp locale cho các component phía client. Nó có thể được đặt trong bất kỳ component cha nào, bao gồm cả layout. Tuy nhiên, việc đặt nó trong layout được khuyến nghị vì Next.js chia sẻ mã layout giữa các trang, giúp hiệu quả hơn. Bằng cách sử dụng `IntlayerClientProvider` trong layout, bạn tránh việc khởi tạo lại cho mỗi trang, cải thiện hiệu suất và duy trì ngữ cảnh localization nhất quán trong toàn bộ ứng dụng của bạn.
|
|
658
466
|
- **`IntlayerServerProvider`** được sử dụng để cung cấp locale cho các component con phía server. Nó không thể được đặt trong layout.
|
|
659
467
|
|
|
@@ -661,7 +469,7 @@ const Page = async ({ params }) => {
|
|
|
661
469
|
|
|
662
470
|
> Layout và trang không thể chia sẻ một context server chung vì hệ thống context server dựa trên kho dữ liệu theo từng yêu cầu (qua cơ chế [React's cache](https://react.dev/reference/react/cache)), dẫn đến mỗi "context" được tạo lại cho các phân đoạn khác nhau của ứng dụng. Việc đặt provider trong một layout dùng chung sẽ phá vỡ sự cô lập này, ngăn cản việc truyền đúng các giá trị context server đến các component server của bạn.
|
|
663
471
|
|
|
664
|
-
```tsx {4,7} fileName="src/components/ClientComponentExample.tsx" codeFormat="typescript"
|
|
472
|
+
```tsx {4,7} fileName="src/components/ClientComponentExample.tsx" codeFormat={["typescript", "esm"]}
|
|
665
473
|
"use client";
|
|
666
474
|
|
|
667
475
|
import type { FC } from "react";
|
|
@@ -679,41 +487,7 @@ export const ClientComponentExample: FC = () => {
|
|
|
679
487
|
};
|
|
680
488
|
```
|
|
681
489
|
|
|
682
|
-
```
|
|
683
|
-
"use client";
|
|
684
|
-
|
|
685
|
-
import { useIntlayer } from "next-intlayer";
|
|
686
|
-
|
|
687
|
-
const ClientComponentExample = () => {
|
|
688
|
-
const content = useIntlayer("client-component-example"); // Tạo khai báo nội dung liên quan
|
|
689
|
-
|
|
690
|
-
return (
|
|
691
|
-
<div>
|
|
692
|
-
<h2>{content.title}</h2>
|
|
693
|
-
<p>{content.content}</p>
|
|
694
|
-
</div>
|
|
695
|
-
);
|
|
696
|
-
};
|
|
697
|
-
```
|
|
698
|
-
|
|
699
|
-
```jsx {3,6} fileName="src/components/ClientComponentExample.csx" codeFormat="commonjs"
|
|
700
|
-
"use client";
|
|
701
|
-
|
|
702
|
-
const { useIntlayer } = require("next-intlayer");
|
|
703
|
-
|
|
704
|
-
const ClientComponentExample = () => {
|
|
705
|
-
const content = useIntlayer("client-component-example"); // Tạo khai báo nội dung liên quan
|
|
706
|
-
|
|
707
|
-
return (
|
|
708
|
-
<div>
|
|
709
|
-
<h2>{content.title}</h2>
|
|
710
|
-
<p>{content.content}</p>
|
|
711
|
-
</div>
|
|
712
|
-
);
|
|
713
|
-
};
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
```tsx {2} fileName="src/components/ServerComponentExample.tsx" codeFormat="typescript"
|
|
490
|
+
```tsx {2} fileName="src/components/ServerComponentExample.tsx" codeFormat={["typescript", "esm"]}
|
|
717
491
|
import type { FC } from "react";
|
|
718
492
|
import { useIntlayer } from "next-intlayer/server";
|
|
719
493
|
|
|
@@ -729,36 +503,6 @@ export const ServerComponentExample: FC = () => {
|
|
|
729
503
|
};
|
|
730
504
|
```
|
|
731
505
|
|
|
732
|
-
```jsx {1} fileName="src/components/ServerComponentExample.mjx" codeFormat="esm"
|
|
733
|
-
import { useIntlayer } from "next-intlayer/server";
|
|
734
|
-
|
|
735
|
-
const ServerComponentExample = () => {
|
|
736
|
-
const content = useIntlayer("server-component-example"); // Tạo khai báo nội dung liên quan
|
|
737
|
-
|
|
738
|
-
return (
|
|
739
|
-
<div>
|
|
740
|
-
<h2>{content.title}</h2>
|
|
741
|
-
<p>{content.content}</p>
|
|
742
|
-
</div>
|
|
743
|
-
);
|
|
744
|
-
};
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
```jsx {1} fileName="src/components/ServerComponentExample.csx" codeFormat="commonjs"
|
|
748
|
-
const { useIntlayer } = require("next-intlayer/server");
|
|
749
|
-
|
|
750
|
-
const ServerComponentExample = () => {
|
|
751
|
-
const content = useIntlayer("server-component-example"); // Tạo khai báo nội dung liên quan
|
|
752
|
-
|
|
753
|
-
return (
|
|
754
|
-
<div>
|
|
755
|
-
<h2>{content.title}</h2>
|
|
756
|
-
<p>{content.content}</p>
|
|
757
|
-
</div>
|
|
758
|
-
);
|
|
759
|
-
};
|
|
760
|
-
```
|
|
761
|
-
|
|
762
506
|
> Nếu bạn muốn sử dụng nội dung của mình trong một thuộc tính `string`, như `alt`, `title`, `href`, `aria-label`, v.v., bạn phải gọi giá trị của hàm, ví dụ:
|
|
763
507
|
|
|
764
508
|
> ```jsx
|
|
@@ -771,16 +515,7 @@ const ServerComponentExample = () => {
|
|
|
771
515
|
|
|
772
516
|
Thiết lập middleware để phát hiện ngôn ngữ ưu tiên của người dùng:
|
|
773
517
|
|
|
774
|
-
```typescript fileName="src/middleware.ts" codeFormat="typescript"
|
|
775
|
-
export { intlayerMiddleware as middleware } from "next-intlayer/middleware";
|
|
776
|
-
|
|
777
|
-
export const config = {
|
|
778
|
-
matcher:
|
|
779
|
-
"/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
|
|
780
|
-
};
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
```javascript fileName="src/middleware.mjs" codeFormat="esm"
|
|
518
|
+
```typescript fileName="src/middleware.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
784
519
|
export { intlayerMiddleware as middleware } from "next-intlayer/middleware";
|
|
785
520
|
|
|
786
521
|
export const config = {
|
|
@@ -789,17 +524,6 @@ export const config = {
|
|
|
789
524
|
};
|
|
790
525
|
```
|
|
791
526
|
|
|
792
|
-
```javascript fileName="src/middleware.cjs" codeFormat="commonjs"
|
|
793
|
-
const { intlayerMiddleware } = require("next-intlayer/middleware");
|
|
794
|
-
|
|
795
|
-
const config = {
|
|
796
|
-
matcher:
|
|
797
|
-
"/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
module.exports = { middleware: intlayerMiddleware, config };
|
|
801
|
-
```
|
|
802
|
-
|
|
803
527
|
> `intlayerMiddleware` được sử dụng để phát hiện ngôn ngữ ưu tiên của người dùng và chuyển hướng họ đến URL phù hợp như được chỉ định trong [cấu hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md). Ngoài ra, nó còn cho phép lưu ngôn ngữ ưu tiên của người dùng trong cookie.
|
|
804
528
|
|
|
805
529
|
> Nếu bạn cần kết hợp nhiều middleware với nhau (ví dụ, `intlayerMiddleware` cùng với middleware xác thực hoặc middleware tùy chỉnh), Intlayer hiện cung cấp một helper gọi là `multipleMiddlewares`.
|
|
@@ -821,7 +545,7 @@ export const middleware = multipleMiddlewares([
|
|
|
821
545
|
|
|
822
546
|
Trong trường hợp bạn muốn quốc tế hóa metadata của mình, chẳng hạn như tiêu đề trang, bạn có thể sử dụng hàm `generateMetadata` do Next.js cung cấp. Bên trong, bạn có thể lấy nội dung từ hàm `getIntlayer` để dịch metadata của bạn.
|
|
823
547
|
|
|
824
|
-
```typescript fileName="src/app/[locale]/metadata.content.ts" contentDeclarationFormat="typescript"
|
|
548
|
+
```typescript fileName="src/app/[locale]/metadata.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
825
549
|
import { type Dictionary, t } from "intlayer";
|
|
826
550
|
import { Metadata } from "next";
|
|
827
551
|
|
|
@@ -846,68 +570,6 @@ const metadataContent = {
|
|
|
846
570
|
export default metadataContent;
|
|
847
571
|
```
|
|
848
572
|
|
|
849
|
-
```javascript fileName="src/app/[locale]/metadata.content.mjs" contentDeclarationFormat="esm"
|
|
850
|
-
import { t } from "intlayer";
|
|
851
|
-
|
|
852
|
-
/** @type {import('intlayer').Dictionary<import('next').Metadata>} */
|
|
853
|
-
const metadataContent = {
|
|
854
|
-
key: "page-metadata",
|
|
855
|
-
content: {
|
|
856
|
-
title: t({
|
|
857
|
-
en: "Create Next App",
|
|
858
|
-
fr: "Créer une application Next.js",
|
|
859
|
-
es: "Crear una aplicación Next.js",
|
|
860
|
-
vi: "Tạo ứng dụng Next",
|
|
861
|
-
}),
|
|
862
|
-
description: t({
|
|
863
|
-
en: "Generated by create next app",
|
|
864
|
-
fr: "Généré par create next app",
|
|
865
|
-
es: "Generado por create next app",
|
|
866
|
-
vi: "Được tạo bởi create next app",
|
|
867
|
-
}),
|
|
868
|
-
},
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
export default metadataContent;
|
|
872
|
-
```
|
|
873
|
-
|
|
874
|
-
```javascript fileName="src/app/[locale]/metadata.content.cjs" contentDeclarationFormat="commonjs"
|
|
875
|
-
const { t } = require("intlayer");
|
|
876
|
-
|
|
877
|
-
/** @type {import('intlayer').Dictionary<import('next').Metadata>} */
|
|
878
|
-
const metadataContent = {
|
|
879
|
-
key: "page-metadata",
|
|
880
|
-
content: {
|
|
881
|
-
title: t({
|
|
882
|
-
en: "Create Next App",
|
|
883
|
-
fr: "Créer une application Next.js",
|
|
884
|
-
es: "Crear una aplicación Next.js",
|
|
885
|
-
vi: "Tạo ứng dụng Next",
|
|
886
|
-
}),
|
|
887
|
-
description: t({
|
|
888
|
-
en: "Generated by create next app",
|
|
889
|
-
fr: "Généré par create next app",
|
|
890
|
-
es: "Generado por create next app",
|
|
891
|
-
vi: "Được tạo bởi create next app",
|
|
892
|
-
}),
|
|
893
|
-
},
|
|
894
|
-
};
|
|
895
|
-
|
|
896
|
-
module.exports = metadataContent;
|
|
897
|
-
fr: "Créer une application Next.js",
|
|
898
|
-
es: "Crear una aplicación Next.js",
|
|
899
|
-
}),
|
|
900
|
-
description: t({
|
|
901
|
-
en: "Generated by create next app",
|
|
902
|
-
fr: "Généré par create next app",
|
|
903
|
-
es: "Generado por create next app",
|
|
904
|
-
}),
|
|
905
|
-
},
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
module.exports = metadataContent;
|
|
909
|
-
```
|
|
910
|
-
|
|
911
573
|
```json fileName="src/app/[locale]/metadata.content.json" contentDeclarationFormat="json"
|
|
912
574
|
{
|
|
913
575
|
"key": "page-metadata",
|
|
@@ -934,7 +596,7 @@ module.exports = metadataContent;
|
|
|
934
596
|
};
|
|
935
597
|
```
|
|
936
598
|
|
|
937
|
-
````typescript fileName="src/app/[locale]/layout.tsx or src/app/[locale]/page.tsx" codeFormat="typescript"
|
|
599
|
+
````typescript fileName="src/app/[locale]/layout.tsx or src/app/[locale]/page.tsx" codeFormat={["typescript", "esm"]}
|
|
938
600
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
939
601
|
import type { Metadata } from "next";
|
|
940
602
|
import type { LocalPromiseParams } from "next-intlayer";
|
|
@@ -979,802 +641,3 @@ export const generateMetadata = async ({
|
|
|
979
641
|
|
|
980
642
|
// ... Phần còn lại của mã
|
|
981
643
|
````
|
|
982
|
-
|
|
983
|
-
````javascript fileName="src/app/[locale]/layout.mjs or src/app/[locale]/page.mjs" codeFormat="esm"
|
|
984
|
-
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
985
|
-
|
|
986
|
-
export const generateMetadata = async ({ params }) => {
|
|
987
|
-
const { locale } = await params;
|
|
988
|
-
|
|
989
|
-
const metadata = getIntlayer("page-metadata", locale);
|
|
990
|
-
|
|
991
|
-
/**
|
|
992
|
-
* Tạo một đối tượng chứa tất cả các url cho mỗi locale.
|
|
993
|
-
*
|
|
994
|
-
* Ví dụ:
|
|
995
|
-
* ```ts
|
|
996
|
-
* getMultilingualUrls('/about');
|
|
997
|
-
*
|
|
998
|
-
* // Trả về
|
|
999
|
-
* // {
|
|
1000
|
-
* // en: '/about',
|
|
1001
|
-
* // fr: '/fr/about',
|
|
1002
|
-
* // es: '/es/about'
|
|
1003
|
-
* // }
|
|
1004
|
-
* ```
|
|
1005
|
-
*/
|
|
1006
|
-
const multilingualUrls = getMultilingualUrls("/");
|
|
1007
|
-
const localizedUrl = multilingualUrls[locale];
|
|
1008
|
-
|
|
1009
|
-
return {
|
|
1010
|
-
...metadata,
|
|
1011
|
-
alternates: {
|
|
1012
|
-
canonical: localizedUrl,
|
|
1013
|
-
languages: { ...multilingualUrls, "x-default": "/" },
|
|
1014
|
-
},
|
|
1015
|
-
openGraph: {
|
|
1016
|
-
url: localizedUrl,
|
|
1017
|
-
},
|
|
1018
|
-
};
|
|
1019
|
-
};
|
|
1020
|
-
|
|
1021
|
-
// ... Phần còn lại của code
|
|
1022
|
-
````
|
|
1023
|
-
|
|
1024
|
-
````javascript fileName="src/app/[locale]/layout.cjs or src/app/[locale]/page.cjs" codeFormat="commonjs"
|
|
1025
|
-
const { getIntlayer, getMultilingualUrls } = require("intlayer");
|
|
1026
|
-
|
|
1027
|
-
const generateMetadata = async ({ params }) => {
|
|
1028
|
-
const { locale } = await params;
|
|
1029
|
-
|
|
1030
|
-
const metadata = getIntlayer("page-metadata", locale);
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Tạo một đối tượng chứa tất cả các url cho từng locale.
|
|
1034
|
-
*
|
|
1035
|
-
* Ví dụ:
|
|
1036
|
-
* ```ts
|
|
1037
|
-
* getMultilingualUrls('/about');
|
|
1038
|
-
*
|
|
1039
|
-
* // Trả về
|
|
1040
|
-
* // {
|
|
1041
|
-
* // en: '/about',
|
|
1042
|
-
* // fr: '/fr/about',
|
|
1043
|
-
* // es: '/es/about'
|
|
1044
|
-
* // }
|
|
1045
|
-
* ```
|
|
1046
|
-
*/
|
|
1047
|
-
const multilingualUrls = getMultilingualUrls("/");
|
|
1048
|
-
const localizedUrl = multilingualUrls[locale];
|
|
1049
|
-
|
|
1050
|
-
return {
|
|
1051
|
-
...metadata,
|
|
1052
|
-
alternates: {
|
|
1053
|
-
canonical: localizedUrl,
|
|
1054
|
-
languages: { ...multilingualUrls, "x-default": "/" },
|
|
1055
|
-
},
|
|
1056
|
-
openGraph: {
|
|
1057
|
-
url: localizedUrl,
|
|
1058
|
-
},
|
|
1059
|
-
};
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
module.exports = { generateMetadata };
|
|
1063
|
-
|
|
1064
|
-
// ... Phần còn lại của mã```
|
|
1065
|
-
|
|
1066
|
-
> Lưu ý rằng hàm `getIntlayer` được nhập từ `next-intlayer` trả về nội dung của bạn được bao bọc trong một `IntlayerNode`, cho phép tích hợp với trình chỉnh sửa trực quan. Ngược lại, hàm `getIntlayer` được nhập từ `intlayer` trả về nội dung của bạn trực tiếp mà không có các thuộc tính bổ sung.
|
|
1067
|
-
|
|
1068
|
-
Ngoài ra, bạn có thể sử dụng hàm `getTranslation` để khai báo metadata của mình. Tuy nhiên, việc sử dụng các tệp khai báo nội dung được khuyến nghị để tự động hóa việc dịch metadata và tách nội dung ra bên ngoài vào một thời điểm nào đó.
|
|
1069
|
-
|
|
1070
|
-
```typescript fileName="src/app/[locale]/layout.tsx or src/app/[locale]/page.tsx" codeFormat="typescript"
|
|
1071
|
-
import {
|
|
1072
|
-
type IConfigLocales,
|
|
1073
|
-
getTranslation,
|
|
1074
|
-
getMultilingualUrls,
|
|
1075
|
-
} from "intlayer";
|
|
1076
|
-
import type { Metadata } from "next";
|
|
1077
|
-
import type { LocalPromiseParams } from "next-intlayer";
|
|
1078
|
-
|
|
1079
|
-
export const generateMetadata = async ({
|
|
1080
|
-
params,
|
|
1081
|
-
}: LocalPromiseParams): Promise<Metadata> => {
|
|
1082
|
-
const { locale } = await params;
|
|
1083
|
-
const t = <T>(content: IConfigLocales<T>) => getTranslation(content, locale);
|
|
1084
|
-
|
|
1085
|
-
return {
|
|
1086
|
-
title: t<string>({
|
|
1087
|
-
en: "My title",
|
|
1088
|
-
fr: "Mon titre",
|
|
1089
|
-
es: "Mi título",
|
|
1090
|
-
}),
|
|
1091
|
-
description: t({
|
|
1092
|
-
en: "My description",
|
|
1093
|
-
fr: "Ma description",
|
|
1094
|
-
es: "Mi descripción",
|
|
1095
|
-
}),
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
// ... Phần còn lại của mã
|
|
1100
|
-
```
|
|
1101
|
-
|
|
1102
|
-
```javascript fileName="src/app/[locale]/layout.mjs or src/app/[locale]/page.mjs" codeFormat="esm"
|
|
1103
|
-
import { getTranslation, getMultilingualUrls } from "intlayer";
|
|
1104
|
-
|
|
1105
|
-
export const generateMetadata = async ({ params }) => {
|
|
1106
|
-
const { locale } = await params;
|
|
1107
|
-
const t = (content) => getTranslation(content, locale);
|
|
1108
|
-
|
|
1109
|
-
return {
|
|
1110
|
-
title: t({
|
|
1111
|
-
en: "My title",
|
|
1112
|
-
fr: "Mon titre",
|
|
1113
|
-
es: "Mi título",
|
|
1114
|
-
}),
|
|
1115
|
-
description: t({
|
|
1116
|
-
en: "My description",
|
|
1117
|
-
fr: "Ma description",
|
|
1118
|
-
es: "Mi descripción",
|
|
1119
|
-
}),
|
|
1120
|
-
};
|
|
1121
|
-
};
|
|
1122
|
-
|
|
1123
|
-
// ... Phần còn lại của mã
|
|
1124
|
-
```
|
|
1125
|
-
|
|
1126
|
-
```javascript fileName="src/app/[locale]/layout.cjs or src/app/[locale]/page.cjs" codeFormat="commonjs"
|
|
1127
|
-
const { getTranslation, getMultilingualUrls } = require("intlayer");
|
|
1128
|
-
|
|
1129
|
-
const generateMetadata = async ({ params }) => {
|
|
1130
|
-
const { locale } = await params;
|
|
1131
|
-
|
|
1132
|
-
const t = (content) => getTranslation(content, locale);
|
|
1133
|
-
|
|
1134
|
-
return {
|
|
1135
|
-
title: t({
|
|
1136
|
-
en: "My title",
|
|
1137
|
-
fr: "Mon titre",
|
|
1138
|
-
es: "Mi título",
|
|
1139
|
-
}),
|
|
1140
|
-
description: t({
|
|
1141
|
-
en: "My description",
|
|
1142
|
-
fr: "Ma description",
|
|
1143
|
-
es: "Mi descripción",
|
|
1144
|
-
}),
|
|
1145
|
-
};
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
module.exports = { generateMetadata };
|
|
1149
|
-
|
|
1150
|
-
// ... Phần còn lại của mã
|
|
1151
|
-
```
|
|
1152
|
-
|
|
1153
|
-
> Tìm hiểu thêm về tối ưu hóa metadata [trong tài liệu chính thức của Next.js](https://nextjs.org/docs/app/building-your-application/optimizing/metadata).
|
|
1154
|
-
|
|
1155
|
-
### (Tùy chọn) Bước 9: Quốc tế hóa sitemap.xml và robots.txt của bạn
|
|
1156
|
-
|
|
1157
|
-
Để quốc tế hóa `sitemap.xml` và `robots.txt`, bạn có thể sử dụng hàm `getMultilingualUrls` do Intlayer cung cấp. Hàm này cho phép bạn tạo các URL đa ngôn ngữ cho sitemap của mình.
|
|
1158
|
-
|
|
1159
|
-
```tsx fileName="src/app/sitemap.ts" codeFormat="typescript"
|
|
1160
|
-
import { getMultilingualUrls } from "intlayer";
|
|
1161
|
-
import type { MetadataRoute } from "next";
|
|
1162
|
-
|
|
1163
|
-
const sitemap = (): MetadataRoute.Sitemap => [
|
|
1164
|
-
{
|
|
1165
|
-
url: "https://example.com",
|
|
1166
|
-
alternates: {
|
|
1167
|
-
languages: {
|
|
1168
|
-
...getMultilingualUrls("https://example.com"),
|
|
1169
|
-
"x-default": "https://example.com",
|
|
1170
|
-
},
|
|
1171
|
-
},
|
|
1172
|
-
},
|
|
1173
|
-
{
|
|
1174
|
-
url: "https://example.com/login",
|
|
1175
|
-
alternates: {
|
|
1176
|
-
languages: {
|
|
1177
|
-
...getMultilingualUrls("https://example.com/login"),
|
|
1178
|
-
"x-default": "https://example.com/login",
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
url: "https://example.com/register",
|
|
1184
|
-
alternates: {
|
|
1185
|
-
languages: {
|
|
1186
|
-
...getMultilingualUrls("https://example.com/register"),
|
|
1187
|
-
"x-default": "https://example.com/register",
|
|
1188
|
-
},
|
|
1189
|
-
},
|
|
1190
|
-
},
|
|
1191
|
-
];
|
|
1192
|
-
|
|
1193
|
-
export default sitemap;
|
|
1194
|
-
```
|
|
1195
|
-
|
|
1196
|
-
```jsx fileName="src/app/sitemap.mjx" codeFormat="esm"
|
|
1197
|
-
import { getMultilingualUrls } from "intlayer";
|
|
1198
|
-
|
|
1199
|
-
const sitemap = () => [
|
|
1200
|
-
{
|
|
1201
|
-
url: "https://example.com",
|
|
1202
|
-
alternates: {
|
|
1203
|
-
languages: {
|
|
1204
|
-
...getMultilingualUrls("https://example.com"),
|
|
1205
|
-
"x-default": "https://example.com",
|
|
1206
|
-
},
|
|
1207
|
-
},
|
|
1208
|
-
},
|
|
1209
|
-
{
|
|
1210
|
-
url: "https://example.com/login",
|
|
1211
|
-
alternates: {
|
|
1212
|
-
languages: {
|
|
1213
|
-
...getMultilingualUrls("https://example.com/login"),
|
|
1214
|
-
"x-default": "https://example.com/login",
|
|
1215
|
-
},
|
|
1216
|
-
},
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
url: "https://example.com/register",
|
|
1220
|
-
alternates: {
|
|
1221
|
-
languages: {
|
|
1222
|
-
...getMultilingualUrls("https://example.com/register"),
|
|
1223
|
-
"x-default": "https://example.com/register",
|
|
1224
|
-
},
|
|
1225
|
-
},
|
|
1226
|
-
},
|
|
1227
|
-
];
|
|
1228
|
-
|
|
1229
|
-
export default sitemap;
|
|
1230
|
-
```
|
|
1231
|
-
|
|
1232
|
-
```jsx fileName="src/app/sitemap.csx" codeFormat="commonjs"
|
|
1233
|
-
const { getMultilingualUrls } = require("intlayer");
|
|
1234
|
-
|
|
1235
|
-
const sitemap = () => [
|
|
1236
|
-
{
|
|
1237
|
-
url: "https://example.com",
|
|
1238
|
-
alternates: {
|
|
1239
|
-
languages: {
|
|
1240
|
-
...getMultilingualUrls("https://example.com"),
|
|
1241
|
-
"x-default": "https://example.com",
|
|
1242
|
-
},
|
|
1243
|
-
},
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
url: "https://example.com/login",
|
|
1247
|
-
alternates: {
|
|
1248
|
-
languages: {
|
|
1249
|
-
...getMultilingualUrls("https://example.com/login"),
|
|
1250
|
-
"x-default": "https://example.com/login",
|
|
1251
|
-
},
|
|
1252
|
-
},
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
url: "https://example.com/register",
|
|
1256
|
-
alternates: {
|
|
1257
|
-
languages: {
|
|
1258
|
-
...getMultilingualUrls("https://example.com/register"),
|
|
1259
|
-
"x-default": "https://example.com/register",
|
|
1260
|
-
},
|
|
1261
|
-
},
|
|
1262
|
-
},
|
|
1263
|
-
];
|
|
1264
|
-
|
|
1265
|
-
module.exports = sitemap;
|
|
1266
|
-
```
|
|
1267
|
-
|
|
1268
|
-
```tsx fileName="src/app/robots.ts" codeFormat="typescript"
|
|
1269
|
-
import type { MetadataRoute } from "next";
|
|
1270
|
-
import { getMultilingualUrls } from "intlayer";
|
|
1271
|
-
|
|
1272
|
-
const getAllMultilingualUrls = (urls: string[]) =>
|
|
1273
|
-
urls.flatMap((url) => Object.values(getMultilingualUrls(url)) as string[]);
|
|
1274
|
-
|
|
1275
|
-
const robots = (): MetadataRoute.Robots => ({
|
|
1276
|
-
rules: {
|
|
1277
|
-
userAgent: "*",
|
|
1278
|
-
allow: ["/"],
|
|
1279
|
-
disallow: getAllMultilingualUrls(["/login", "/register"]),
|
|
1280
|
-
},
|
|
1281
|
-
host: "https://example.com",
|
|
1282
|
-
sitemap: `https://example.com/sitemap.xml`,
|
|
1283
|
-
});
|
|
1284
|
-
|
|
1285
|
-
export default robots;
|
|
1286
|
-
```
|
|
1287
|
-
|
|
1288
|
-
```jsx fileName="src/app/robots.mjx" codeFormat="esm"
|
|
1289
|
-
import { getMultilingualUrls } from "intlayer";
|
|
1290
|
-
|
|
1291
|
-
const getAllMultilingualUrls = (urls) =>
|
|
1292
|
-
urls.flatMap((url) => Object.values(getMultilingualUrls(url)));
|
|
1293
|
-
|
|
1294
|
-
const robots = () => ({
|
|
1295
|
-
rules: {
|
|
1296
|
-
userAgent: "*",
|
|
1297
|
-
allow: ["/"],
|
|
1298
|
-
disallow: getAllMultilingualUrls(["/login", "/register"]),
|
|
1299
|
-
},
|
|
1300
|
-
host: "https://example.com",
|
|
1301
|
-
sitemap: `https://example.com/sitemap.xml`,
|
|
1302
|
-
});
|
|
1303
|
-
|
|
1304
|
-
export default robots;
|
|
1305
|
-
```
|
|
1306
|
-
|
|
1307
|
-
```jsx fileName="src/app/robots.csx" codeFormat="commonjs"
|
|
1308
|
-
const { getMultilingualUrls } = require("intlayer");
|
|
1309
|
-
|
|
1310
|
-
// Lấy tất cả các URL đa ngôn ngữ từ danh sách URL đầu vào
|
|
1311
|
-
const getAllMultilingualUrls = (urls) =>
|
|
1312
|
-
urls.flatMap((url) => Object.values(getMultilingualUrls(url)));
|
|
1313
|
-
|
|
1314
|
-
const robots = () => ({
|
|
1315
|
-
rules: {
|
|
1316
|
-
userAgent: "*",
|
|
1317
|
-
allow: ["/"],
|
|
1318
|
-
disallow: getAllMultilingualUrls(["/login", "/register"]), // Chặn các trang đăng nhập và đăng ký đa ngôn ngữ
|
|
1319
|
-
},
|
|
1320
|
-
host: "https://example.com",
|
|
1321
|
-
sitemap: `https://example.com/sitemap.xml`,
|
|
1322
|
-
});
|
|
1323
|
-
|
|
1324
|
-
module.exports = robots;
|
|
1325
|
-
```
|
|
1326
|
-
|
|
1327
|
-
> Tìm hiểu thêm về tối ưu hóa sitemap [trong tài liệu chính thức của Next.js](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap). Tìm hiểu thêm về tối ưu hóa robots.txt [trong tài liệu chính thức của Next.js](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots).
|
|
1328
|
-
|
|
1329
|
-
### (Tùy chọn) Bước 10: Thay đổi ngôn ngữ nội dung của bạn
|
|
1330
|
-
|
|
1331
|
-
Để thay đổi ngôn ngữ nội dung trong Next.js, cách được khuyến nghị là sử dụng thành phần `Link` để chuyển hướng người dùng đến trang đã được địa phương hóa phù hợp. Thành phần `Link` cho phép tải trước trang, giúp tránh việc tải lại toàn bộ trang.
|
|
1332
|
-
|
|
1333
|
-
```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat="typescript"
|
|
1334
|
-
"use client";
|
|
1335
|
-
|
|
1336
|
-
import type { FC } from "react";
|
|
1337
|
-
import {
|
|
1338
|
-
Locales,
|
|
1339
|
-
getHTMLTextDir,
|
|
1340
|
-
getLocaleName,
|
|
1341
|
-
getLocalizedUrl,
|
|
1342
|
-
} from "intlayer";
|
|
1343
|
-
import { useLocale } from "next-intlayer";
|
|
1344
|
-
import Link from "next/link";
|
|
1345
|
-
|
|
1346
|
-
export const LocaleSwitcher: FC = () => {
|
|
1347
|
-
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1348
|
-
useLocale();
|
|
1349
|
-
|
|
1350
|
-
return (
|
|
1351
|
-
<div>
|
|
1352
|
-
<button popoverTarget="localePopover">{getLocaleName(locale)}</button>
|
|
1353
|
-
<div id="localePopover" popover="auto">
|
|
1354
|
-
{availableLocales.map((localeItem) => (
|
|
1355
|
-
<Link
|
|
1356
|
-
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
1357
|
-
key={localeItem}
|
|
1358
|
-
aria-current={locale === localeItem ? "page" : undefined}
|
|
1359
|
-
onClick={() => setLocale(localeItem)}
|
|
1360
|
-
replace // Sẽ đảm bảo nút "quay lại" trên trình duyệt sẽ chuyển hướng về trang trước đó
|
|
1361
|
-
>
|
|
1362
|
-
<span>
|
|
1363
|
-
{/* Ngôn ngữ - ví dụ: FR */}
|
|
1364
|
-
{localeItem}
|
|
1365
|
-
</span>
|
|
1366
|
-
<span>
|
|
1367
|
-
{/* Ngôn ngữ trong chính Locale của nó - ví dụ: Français */}
|
|
1368
|
-
{getLocaleName(localeItem, locale)}
|
|
1369
|
-
</span>
|
|
1370
|
-
<span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
|
|
1371
|
-
{/* Ngôn ngữ trong Locale hiện tại - ví dụ: Francés với locale hiện tại đặt là Locales.SPANISH */}
|
|
1372
|
-
{getLocaleName(localeItem)}
|
|
1373
|
-
</span>
|
|
1374
|
-
<span dir="ltr" lang={Locales.ENGLISH}>
|
|
1375
|
-
{/* Ngôn ngữ bằng tiếng Anh - ví dụ: French */}
|
|
1376
|
-
{getLocaleName(localeItem, Locales.ENGLISH)}
|
|
1377
|
-
</span>
|
|
1378
|
-
</Link>
|
|
1379
|
-
))}
|
|
1380
|
-
</div>
|
|
1381
|
-
</div>
|
|
1382
|
-
);
|
|
1383
|
-
};
|
|
1384
|
-
```
|
|
1385
|
-
|
|
1386
|
-
```jsx fileName="src/components/LocaleSwitcher.msx" codeFormat="esm"
|
|
1387
|
-
"use client";
|
|
1388
|
-
|
|
1389
|
-
import {
|
|
1390
|
-
Locales,
|
|
1391
|
-
getHTMLTextDir,
|
|
1392
|
-
getLocaleName,
|
|
1393
|
-
getLocalizedUrl,
|
|
1394
|
-
} from "intlayer";
|
|
1395
|
-
import { useLocale } from "next-intlayer";
|
|
1396
|
-
import Link from "next/link";
|
|
1397
|
-
|
|
1398
|
-
export const LocaleSwitcher = () => {
|
|
1399
|
-
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1400
|
-
useLocale();
|
|
1401
|
-
|
|
1402
|
-
return (
|
|
1403
|
-
<div>
|
|
1404
|
-
<button popoverTarget="localePopover">{getLocaleName(locale)}</button>
|
|
1405
|
-
<div id="localePopover" popover="auto">
|
|
1406
|
-
{availableLocales.map((localeItem) => (
|
|
1407
|
-
<Link
|
|
1408
|
-
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
1409
|
-
key={localeItem}
|
|
1410
|
-
aria-current={locale === localeItem ? "page" : undefined}
|
|
1411
|
-
onClick={() => setLocale(localeItem)}
|
|
1412
|
-
replace // Sẽ đảm bảo rằng nút "quay lại" trên trình duyệt sẽ chuyển hướng về trang trước đó
|
|
1413
|
-
>
|
|
1414
|
-
<span>
|
|
1415
|
-
{/* Mã ngôn ngữ - ví dụ: FR */}
|
|
1416
|
-
{localeItem}
|
|
1417
|
-
</span>
|
|
1418
|
-
<span>
|
|
1419
|
-
{/* Ngôn ngữ trong chính Locale của nó - ví dụ: Français */}
|
|
1420
|
-
{getLocaleName(localeItem, locale)}
|
|
1421
|
-
</span>
|
|
1422
|
-
<span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
|
|
1423
|
-
{/* Ngôn ngữ trong Locale hiện tại - ví dụ: Francés khi locale hiện tại được đặt là Locales.SPANISH */}
|
|
1424
|
-
{getLocaleName(localeItem)}
|
|
1425
|
-
</span>
|
|
1426
|
-
<span dir="ltr" lang={Locales.ENGLISH}>
|
|
1427
|
-
{/* Ngôn ngữ bằng tiếng Anh - ví dụ: French */}
|
|
1428
|
-
{getLocaleName(localeItem, Locales.ENGLISH)}
|
|
1429
|
-
</span>
|
|
1430
|
-
</Link>
|
|
1431
|
-
))}
|
|
1432
|
-
</div>
|
|
1433
|
-
</div>
|
|
1434
|
-
);
|
|
1435
|
-
};
|
|
1436
|
-
```
|
|
1437
|
-
|
|
1438
|
-
```jsx fileName="src/components/LocaleSwitcher.csx" codeFormat="commonjs"
|
|
1439
|
-
"use client";
|
|
1440
|
-
|
|
1441
|
-
const {
|
|
1442
|
-
Locales,
|
|
1443
|
-
getHTMLTextDir,
|
|
1444
|
-
getLocaleName,
|
|
1445
|
-
getLocalizedUrl,
|
|
1446
|
-
} = require("intlayer");
|
|
1447
|
-
const { useLocale } = require("next-intlayer");
|
|
1448
|
-
const Link = require("next/link");
|
|
1449
|
-
|
|
1450
|
-
export const LocaleSwitcher = () => {
|
|
1451
|
-
const { locale, pathWithoutLocale, availableLocales, setLocale } =
|
|
1452
|
-
useLocale();
|
|
1453
|
-
|
|
1454
|
-
return (
|
|
1455
|
-
<div>
|
|
1456
|
-
<button popoverTarget="localePopover">{getLocaleName(locale)}</button>
|
|
1457
|
-
<div id="localePopover" popover="auto">
|
|
1458
|
-
{availableLocales.map((localeItem) => (
|
|
1459
|
-
<Link
|
|
1460
|
-
href={getLocalizedUrl(pathWithoutLocale, localeItem)}
|
|
1461
|
-
key={localeItem}
|
|
1462
|
-
aria-current={locale === localeItem ? "page" : undefined}
|
|
1463
|
-
onClick={() => setLocale(localeItem)}
|
|
1464
|
-
replace // Sẽ đảm bảo nút "quay lại" trên trình duyệt sẽ chuyển hướng về trang trước đó
|
|
1465
|
-
>
|
|
1466
|
-
<span>
|
|
1467
|
-
{/* Locale - ví dụ: FR */}
|
|
1468
|
-
{localeItem}
|
|
1469
|
-
</span>
|
|
1470
|
-
<span>
|
|
1471
|
-
{/* Ngôn ngữ trong Locale của chính nó - ví dụ: Français */}
|
|
1472
|
-
{getLocaleName(localeItem, locale)}
|
|
1473
|
-
</span>
|
|
1474
|
-
<span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
|
|
1475
|
-
{/* Ngôn ngữ trong Locale hiện tại - ví dụ: Francés với locale hiện tại được đặt là Locales.SPANISH */}
|
|
1476
|
-
{getLocaleName(localeItem)}
|
|
1477
|
-
</span>
|
|
1478
|
-
<span dir="ltr" lang={Locales.ENGLISH}>
|
|
1479
|
-
{/* Ngôn ngữ bằng tiếng Anh - ví dụ: French */}
|
|
1480
|
-
{getLocaleName(localeItem, Locales.ENGLISH)}
|
|
1481
|
-
</span>
|
|
1482
|
-
</Link>
|
|
1483
|
-
))}
|
|
1484
|
-
</div>
|
|
1485
|
-
</div>
|
|
1486
|
-
);
|
|
1487
|
-
};
|
|
1488
|
-
```
|
|
1489
|
-
|
|
1490
|
-
> Một cách thay thế là sử dụng hàm `setLocale` được cung cấp bởi hook `useLocale`. Hàm này sẽ không cho phép prefetch trang. Xem thêm chi tiết trong [tài liệu hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/next-intlayer/useLocale.md).
|
|
1491
|
-
|
|
1492
|
-
> Bạn cũng có thể đặt một hàm trong tùy chọn `onLocaleChange` để kích hoạt một hàm tùy chỉnh khi locale thay đổi.
|
|
1493
|
-
|
|
1494
|
-
```tsx fileName="src/components/LocaleSwitcher.tsx"
|
|
1495
|
-
"use client";
|
|
1496
|
-
|
|
1497
|
-
import { useRouter } from "next/navigation";
|
|
1498
|
-
import { useLocale } from "next-intlayer";
|
|
1499
|
-
import { getLocalizedUrl } from "intlayer";
|
|
1500
|
-
|
|
1501
|
-
// ... Phần còn lại của mã
|
|
1502
|
-
|
|
1503
|
-
const router = useRouter();
|
|
1504
|
-
const { setLocale } = useLocale({
|
|
1505
|
-
onLocaleChange: (locale) => {
|
|
1506
|
-
router.push(getLocalizedUrl(pathWithoutLocale, locale));
|
|
1507
|
-
},
|
|
1508
|
-
});
|
|
1509
|
-
|
|
1510
|
-
return (
|
|
1511
|
-
<button onClick={() => setLocale(Locales.FRENCH)}>Chuyển sang tiếng Pháp</button>
|
|
1512
|
-
);
|
|
1513
|
-
```
|
|
1514
|
-
|
|
1515
|
-
> Tham khảo tài liệu:
|
|
1516
|
-
>
|
|
1517
|
-
> - [`useLocale` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/next-intlayer/useLocale.md)
|
|
1518
|
-
> - [`getLocaleName` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/intlayer/getLocaleName.md)
|
|
1519
|
-
> - [`getLocalizedUrl` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/intlayer/getLocalizedUrl.md)
|
|
1520
|
-
> - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/intlayer/getHTMLTextDir.md)
|
|
1521
|
-
> - [`hrefLang` attribute](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
|
|
1522
|
-
> - [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
|
|
1523
|
-
> - [`dir` attribute`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
|
|
1524
|
-
> - [`aria-current` attribute`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
|
|
1525
|
-
|
|
1526
|
-
### (Tùy chọn) Bước 11: Tạo một Thành phần Link Đa ngôn ngữ
|
|
1527
|
-
|
|
1528
|
-
Để đảm bảo rằng điều hướng của ứng dụng của bạn tôn trọng ngôn ngữ hiện tại, bạn có thể tạo một component `Link` tùy chỉnh. Component này tự động thêm tiền tố ngôn ngữ hiện tại vào các URL nội bộ, ví dụ, khi một người dùng nói tiếng Pháp nhấp vào liên kết đến trang "About", họ sẽ được chuyển hướng đến `/fr/about` thay vì `/about`.
|
|
1529
|
-
|
|
1530
|
-
Hành vi này hữu ích vì một số lý do sau:
|
|
1531
|
-
|
|
1532
|
-
- **SEO và Trải nghiệm người dùng**: URL có địa phương hóa giúp các công cụ tìm kiếm lập chỉ mục chính xác các trang theo ngôn ngữ và cung cấp nội dung cho người dùng theo ngôn ngữ ưa thích của họ.
|
|
1533
|
-
- **Tính nhất quán**: Bằng cách sử dụng liên kết có địa phương hóa trong toàn bộ ứng dụng, bạn đảm bảo rằng điều hướng luôn nằm trong ngôn ngữ hiện tại, tránh việc chuyển đổi ngôn ngữ không mong muốn.
|
|
1534
|
-
- **Dễ bảo trì**: Tập trung logic địa phương hóa trong một component duy nhất giúp đơn giản hóa việc quản lý URL, làm cho codebase của bạn dễ bảo trì và mở rộng khi ứng dụng phát triển.
|
|
1535
|
-
|
|
1536
|
-
Dưới đây là triển khai của component `Link` được địa phương hóa bằng TypeScript:
|
|
1537
|
-
|
|
1538
|
-
```tsx fileName="src/components/Link.tsx" codeFormat="typescript"
|
|
1539
|
-
"use client";
|
|
1540
|
-
|
|
1541
|
-
import { getLocalizedUrl } from "intlayer";
|
|
1542
|
-
import NextLink, { type LinkProps as NextLinkProps } from "next/link";
|
|
1543
|
-
import { useLocale } from "next-intlayer";
|
|
1544
|
-
import type { PropsWithChildren, FC } from "react";
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* Hàm tiện ích để kiểm tra xem một URL có phải là liên kết bên ngoài hay không.
|
|
1548
|
-
* Nếu URL bắt đầu bằng http:// hoặc https:// thì được xem là liên kết bên ngoài.
|
|
1549
|
-
*/
|
|
1550
|
-
export const checkIsExternalLink = (href?: string): boolean =>
|
|
1551
|
-
/^https?:\/\//.test(href ?? "");
|
|
1552
|
-
|
|
1553
|
-
/**
|
|
1554
|
-
* Một component Link tùy chỉnh điều chỉnh thuộc tính href dựa trên locale hiện tại.
|
|
1555
|
-
* Đối với các liên kết nội bộ, nó sử dụng `getLocalizedUrl` để thêm tiền tố locale vào URL (ví dụ: /fr/about).
|
|
1556
|
-
* Điều này đảm bảo việc điều hướng luôn nằm trong cùng ngữ cảnh locale.
|
|
1557
|
-
*/
|
|
1558
|
-
export const Link: FC<PropsWithChildren<NextLinkProps>> = ({
|
|
1559
|
-
href,
|
|
1560
|
-
children,
|
|
1561
|
-
...props
|
|
1562
|
-
}) => {
|
|
1563
|
-
const { locale } = useLocale();
|
|
1564
|
-
const isExternalLink = checkIsExternalLink(href.toString());
|
|
1565
|
-
|
|
1566
|
-
// Nếu liên kết là nội bộ và href hợp lệ được cung cấp, lấy URL đã được địa phương hóa.
|
|
1567
|
-
const hrefI18n: NextLinkProps["href"] =
|
|
1568
|
-
href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
|
|
1569
|
-
|
|
1570
|
-
return (
|
|
1571
|
-
<NextLink href={hrefI18n} {...props}>
|
|
1572
|
-
{children}
|
|
1573
|
-
</NextLink>
|
|
1574
|
-
);
|
|
1575
|
-
};
|
|
1576
|
-
```
|
|
1577
|
-
|
|
1578
|
-
```jsx fileName="src/components/Link.mjx" codeFormat="esm"
|
|
1579
|
-
"use client";
|
|
1580
|
-
|
|
1581
|
-
import { getLocalizedUrl } from "intlayer";
|
|
1582
|
-
import NextLink from "next/link";
|
|
1583
|
-
import { useLocale } from "next-intlayer";
|
|
1584
|
-
|
|
1585
|
-
/**
|
|
1586
|
-
* Hàm tiện ích để kiểm tra xem một URL có phải là liên kết bên ngoài hay không.
|
|
1587
|
-
* Nếu URL bắt đầu bằng http:// hoặc https://, nó được coi là liên kết bên ngoài.
|
|
1588
|
-
*/
|
|
1589
|
-
export const checkIsExternalLink = (href) => /^https?:\/\//.test(href ?? "");
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* Một component Link tùy chỉnh điều chỉnh thuộc tính href dựa trên locale hiện tại.
|
|
1593
|
-
* Đối với các liên kết nội bộ, nó sử dụng `getLocalizedUrl` để thêm tiền tố locale vào URL (ví dụ: /fr/about).
|
|
1594
|
-
* Điều này đảm bảo việc điều hướng luôn nằm trong cùng ngữ cảnh locale.
|
|
1595
|
-
*/
|
|
1596
|
-
export const Link = ({ href, children, ...props }) => {
|
|
1597
|
-
const { locale } = useLocale();
|
|
1598
|
-
const isExternalLink = checkIsExternalLink(href.toString());
|
|
1599
|
-
|
|
1600
|
-
// Nếu liên kết là nội bộ và href hợp lệ được cung cấp, lấy URL đã được địa phương hóa.
|
|
1601
|
-
const hrefI18n =
|
|
1602
|
-
href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
|
|
1603
|
-
|
|
1604
|
-
return (
|
|
1605
|
-
<NextLink href={hrefI18n} {...props}>
|
|
1606
|
-
{children}
|
|
1607
|
-
</NextLink>
|
|
1608
|
-
);
|
|
1609
|
-
};
|
|
1610
|
-
```
|
|
1611
|
-
|
|
1612
|
-
```jsx fileName="src/components/Link.csx" codeFormat="commonjs"
|
|
1613
|
-
"use client";
|
|
1614
|
-
|
|
1615
|
-
const { getLocalizedUrl } = require("intlayer");
|
|
1616
|
-
const NextLink = require("next/link");
|
|
1617
|
-
const { useLocale } = require("next-intlayer");
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* Hàm tiện ích để kiểm tra xem một URL có phải là liên kết ngoài hay không.
|
|
1621
|
-
* Nếu URL bắt đầu bằng http:// hoặc https://, nó được coi là liên kết ngoài.
|
|
1622
|
-
*/
|
|
1623
|
-
const checkIsExternalLink = (href) => /^https?:\/\//.test(href ?? "");
|
|
1624
|
-
|
|
1625
|
-
/**
|
|
1626
|
-
* Một component Link tùy chỉnh điều chỉnh thuộc tính href dựa trên locale hiện tại.
|
|
1627
|
-
* Đối với các liên kết nội bộ, nó sử dụng `getLocalizedUrl` để thêm tiền tố locale vào URL (ví dụ: /fr/about).
|
|
1628
|
-
* Điều này đảm bảo rằng việc điều hướng luôn giữ trong cùng ngữ cảnh locale.
|
|
1629
|
-
*/
|
|
1630
|
-
const Link = ({ href, children, ...props }) => {
|
|
1631
|
-
const { locale } = useLocale();
|
|
1632
|
-
const isExternalLink = checkIsExternalLink(href.toString());
|
|
1633
|
-
|
|
1634
|
-
// Nếu liên kết là nội bộ và href hợp lệ được cung cấp, lấy URL đã được địa phương hóa.
|
|
1635
|
-
const hrefI18n =
|
|
1636
|
-
href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
|
|
1637
|
-
|
|
1638
|
-
return (
|
|
1639
|
-
<NextLink href={hrefI18n} {...props}>
|
|
1640
|
-
{children}
|
|
1641
|
-
</NextLink>
|
|
1642
|
-
);
|
|
1643
|
-
};
|
|
1644
|
-
```
|
|
1645
|
-
|
|
1646
|
-
#### Cách Hoạt Động
|
|
1647
|
-
|
|
1648
|
-
- **Phát hiện Liên kết Ngoài**:
|
|
1649
|
-
Hàm trợ giúp `checkIsExternalLink` xác định xem một URL có phải là liên kết bên ngoài hay không. Các liên kết bên ngoài được giữ nguyên vì chúng không cần được địa phương hóa.
|
|
1650
|
-
|
|
1651
|
-
- **Lấy Ngôn Ngữ Hiện Tại**:
|
|
1652
|
-
Hook `useLocale` cung cấp ngôn ngữ hiện tại (ví dụ: `fr` cho tiếng Pháp).
|
|
1653
|
-
|
|
1654
|
-
- **Địa Phương Hóa URL**:
|
|
1655
|
-
Đối với các liên kết nội bộ (tức là không phải liên kết bên ngoài), `getLocalizedUrl` được sử dụng để tự động thêm tiền tố ngôn ngữ vào URL. Điều này có nghĩa là nếu người dùng của bạn đang ở ngôn ngữ tiếng Pháp, việc truyền `/about` làm `href` sẽ chuyển thành `/fr/about`.
|
|
1656
|
-
|
|
1657
|
-
- **Trả Về Liên Kết**:
|
|
1658
|
-
Component trả về một phần tử `<a>` với URL đã được địa phương hóa, đảm bảo rằng việc điều hướng phù hợp với ngôn ngữ hiện tại.
|
|
1659
|
-
|
|
1660
|
-
Bằng cách tích hợp component `Link` này trong toàn bộ ứng dụng của bạn, bạn duy trì trải nghiệm người dùng nhất quán và nhận biết ngôn ngữ đồng thời tận dụng được lợi ích về SEO và khả năng sử dụng được cải thiện.
|
|
1661
|
-
|
|
1662
|
-
### (Tùy chọn) Bước 12: Lấy locale hiện tại trong Server Actions
|
|
1663
|
-
|
|
1664
|
-
Nếu bạn cần locale đang hoạt động bên trong một Server Action (ví dụ: để địa phương hóa email hoặc chạy logic nhận biết locale), hãy gọi `getLocale` từ `next-intlayer/server`:
|
|
1665
|
-
|
|
1666
|
-
```tsx fileName="src/app/actions/getLocale.ts" codeFormat="typescript"
|
|
1667
|
-
"use server";
|
|
1668
|
-
|
|
1669
|
-
import { getLocale } from "next-intlayer/server";
|
|
1670
|
-
|
|
1671
|
-
export const myServerAction = async () => {
|
|
1672
|
-
const locale = await getLocale();
|
|
1673
|
-
|
|
1674
|
-
// Thực hiện một số thao tác với locale
|
|
1675
|
-
};
|
|
1676
|
-
```
|
|
1677
|
-
|
|
1678
|
-
> Hàm `getLocale` tuân theo chiến lược phân tầng để xác định locale của người dùng:
|
|
1679
|
-
>
|
|
1680
|
-
> 1. Đầu tiên, nó kiểm tra các header của yêu cầu để tìm giá trị locale có thể đã được thiết lập bởi middleware
|
|
1681
|
-
> 2. Nếu không tìm thấy locale trong header, nó sẽ tìm locale được lưu trong cookie
|
|
1682
|
-
> 3. Nếu không tìm thấy cookie, nó sẽ cố gắng phát hiện ngôn ngữ ưu tiên của người dùng từ cài đặt trình duyệt của họ
|
|
1683
|
-
> 4. Cuối cùng, nó sẽ sử dụng locale mặc định được cấu hình trong ứng dụng
|
|
1684
|
-
>
|
|
1685
|
-
> Điều này đảm bảo locale phù hợp nhất được chọn dựa trên ngữ cảnh có sẵn.
|
|
1686
|
-
|
|
1687
|
-
### (Tùy chọn) Bước 13: Tối ưu kích thước bundle của bạn
|
|
1688
|
-
|
|
1689
|
-
Khi sử dụng `next-intlayer`, các từ điển được bao gồm trong bundle cho mỗi trang theo mặc định. Để tối ưu kích thước bundle, Intlayer cung cấp một plugin SWC tùy chọn thay thế thông minh các lệnh gọi `useIntlayer` bằng cách sử dụng macro. Điều này đảm bảo các từ điển chỉ được bao gồm trong bundle của những trang thực sự sử dụng chúng.
|
|
1690
|
-
|
|
1691
|
-
Để kích hoạt tối ưu này, hãy cài đặt gói `@intlayer/swc`. Khi đã cài đặt, `next-intlayer` sẽ tự động phát hiện và sử dụng plugin:
|
|
1692
|
-
|
|
1693
|
-
```bash packageManager="npm"
|
|
1694
|
-
npm install @intlayer/swc --save-dev
|
|
1695
|
-
```
|
|
1696
|
-
|
|
1697
|
-
```bash packageManager="pnpm"
|
|
1698
|
-
pnpm add @intlayer/swc --save-dev
|
|
1699
|
-
```
|
|
1700
|
-
|
|
1701
|
-
```bash packageManager="yarn"
|
|
1702
|
-
yarn add @intlayer/swc --save-dev
|
|
1703
|
-
```
|
|
1704
|
-
|
|
1705
|
-
```bash packageManager="bun"
|
|
1706
|
-
bun add @intlayer/swc --dev
|
|
1707
|
-
```
|
|
1708
|
-
|
|
1709
|
-
> Lưu ý: Tối ưu này chỉ khả dụng cho Next.js 13 trở lên.
|
|
1710
|
-
|
|
1711
|
-
> Lưu ý: Gói này không được cài đặt mặc định vì các plugin SWC vẫn đang trong giai đoạn thử nghiệm trên Next.js. Điều này có thể thay đổi trong tương lai.
|
|
1712
|
-
|
|
1713
|
-
> Lưu ý: Nếu bạn đặt tùy chọn là `importMode: 'dynamic'` hoặc `importMode: 'fetch'` (in the `dictionary` configuration), nó sẽ dựa vào Suspense, vì vậy bạn sẽ phải bao bọc các lần gọi `useIntlayer` của mình trong một vùng `Suspense`. Điều đó có nghĩa là bạn sẽ không thể sử dụng `useIntlayer` trực tiếp ở cấp cao nhất của thành phần Page / Layout.
|
|
1714
|
-
|
|
1715
|
-
### Giám sát thay đổi từ điển trên Turbopack
|
|
1716
|
-
|
|
1717
|
-
Khi sử dụng Turbopack làm máy chủ phát triển với lệnh `next dev --turbopack`, các thay đổi từ điển sẽ không được phát hiện tự động theo mặc định.
|
|
1718
|
-
|
|
1719
|
-
Hạn chế này xảy ra vì Turbopack không thể chạy các plugin webpack song song để theo dõi các thay đổi trong các tệp nội dung của bạn. Để khắc phục điều này, bạn sẽ cần sử dụng lệnh `intlayer watch` để chạy đồng thời cả máy chủ phát triển và trình theo dõi build của Intlayer.
|
|
1720
|
-
|
|
1721
|
-
```json5 fileName="package.json"
|
|
1722
|
-
{
|
|
1723
|
-
// ... Cấu hình package.json hiện có của bạn
|
|
1724
|
-
"scripts": {
|
|
1725
|
-
// ... Cấu hình scripts hiện có của bạn
|
|
1726
|
-
"dev": "intlayer watch --with 'next dev --turbopack'",
|
|
1727
|
-
},
|
|
1728
|
-
}
|
|
1729
|
-
```
|
|
1730
|
-
|
|
1731
|
-
### Cấu hình TypeScript
|
|
1732
|
-
|
|
1733
|
-
Intlayer sử dụng module augmentation để tận dụng các lợi ích của TypeScript và làm cho codebase của bạn mạnh mẽ hơn.
|
|
1734
|
-
|
|
1735
|
-

|
|
1736
|
-
|
|
1737
|
-

|
|
1738
|
-
|
|
1739
|
-
Đảm bảo cấu hình TypeScript của bạn bao gồm các kiểu được tự động tạo.
|
|
1740
|
-
|
|
1741
|
-
```json5 fileName="tsconfig.json"
|
|
1742
|
-
{
|
|
1743
|
-
// ... Các cấu hình TypeScript hiện có của bạn
|
|
1744
|
-
"include": [
|
|
1745
|
-
// ... Các cấu hình TypeScript hiện có của bạn
|
|
1746
|
-
".intlayer/**/*.ts", // Bao gồm các kiểu được tự động tạo
|
|
1747
|
-
],
|
|
1748
|
-
}
|
|
1749
|
-
```
|
|
1750
|
-
|
|
1751
|
-
### Cấu hình Git
|
|
1752
|
-
|
|
1753
|
-
Khuyến nghị bỏ qua các tệp được tạo bởi Intlayer. Điều này giúp bạn tránh việc commit chúng vào kho Git của mình.
|
|
1754
|
-
|
|
1755
|
-
Để làm điều này, bạn có thể thêm các hướng dẫn sau vào tệp `.gitignore` của bạn:
|
|
1756
|
-
|
|
1757
|
-
```plaintext fileName=".gitignore"
|
|
1758
|
-
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
1759
|
-
.intlayer
|
|
1760
|
-
```
|
|
1761
|
-
|
|
1762
|
-
### Tiện ích mở rộng VS Code
|
|
1763
|
-
|
|
1764
|
-
Để cải thiện trải nghiệm phát triển với Intlayer, bạn có thể cài đặt **Tiện ích mở rộng Intlayer cho VS Code** chính thức.
|
|
1765
|
-
|
|
1766
|
-
[Cài đặt từ VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
|
|
1767
|
-
|
|
1768
|
-
Tiện ích mở rộng này cung cấp:
|
|
1769
|
-
|
|
1770
|
-
- **Tự động hoàn thành** cho các khóa dịch.
|
|
1771
|
-
- **Phát hiện lỗi theo thời gian thực** cho các bản dịch bị thiếu.
|
|
1772
|
-
- **Xem trước nội dung dịch ngay trong dòng**.
|
|
1773
|
-
- **Hành động nhanh** để dễ dàng tạo và cập nhật các bản dịch.
|
|
1774
|
-
|
|
1775
|
-
Để biết thêm chi tiết về cách sử dụng tiện ích mở rộng, hãy tham khảo [Tài liệu Tiện ích mở rộng Intlayer cho VS Code](https://intlayer.org/doc/vs-code-extension).
|
|
1776
|
-
|
|
1777
|
-
### Đi xa hơn
|
|
1778
|
-
|
|
1779
|
-
Để đi xa hơn, bạn có thể triển khai [trình soạn thảo trực quan](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_visual_editor.md) hoặc tách nội dung của bạn ra bên ngoài bằng cách sử dụng [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md).
|
|
1780
|
-
````
|