@intlayer/docs 9.1.3 → 9.3.0
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/index.md +1 -1
- package/blog/ar/rag_powered_documentation_assistant.md +7 -0
- package/blog/de/index.md +1 -1
- package/blog/de/rag_powered_documentation_assistant.md +6 -0
- package/blog/en/index.md +1 -1
- package/blog/en-GB/index.md +1 -1
- package/blog/en-GB/rag_powered_documentation_assistant.md +6 -0
- package/blog/es/index.md +1 -1
- package/blog/es/rag_powered_documentation_assistant.md +7 -0
- package/blog/fr/i18n_meaning.md +7 -1
- package/blog/fr/index.md +1 -1
- package/blog/fr/list_i18n_technologies/frameworks/angular.md +5 -1
- package/blog/fr/rag_powered_documentation_assistant.md +6 -0
- package/blog/hi/index.md +1 -1
- package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +119 -42
- package/blog/hi/rag_powered_documentation_assistant.md +7 -0
- package/blog/id/index.md +1 -1
- package/blog/id/rag_powered_documentation_assistant.md +6 -0
- package/blog/it/index.md +1 -1
- package/blog/it/rag_powered_documentation_assistant.md +6 -0
- package/blog/ja/index.md +1 -1
- package/blog/ja/rag_powered_documentation_assistant.md +7 -0
- package/blog/ko/index.md +1 -1
- package/blog/ko/list_i18n_technologies/frameworks/react.md +7 -7
- package/blog/ko/rag_powered_documentation_assistant.md +6 -0
- package/blog/pl/index.md +1 -1
- package/blog/pl/rag_powered_documentation_assistant.md +6 -0
- package/blog/pt/index.md +1 -1
- package/blog/pt/rag_powered_documentation_assistant.md +6 -0
- package/blog/ru/index.md +1 -1
- package/blog/ru/rag_powered_documentation_assistant.md +7 -0
- package/blog/tr/intlayer_with_react-intl.md +3 -1
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +175 -42
- package/blog/tr/rag_powered_documentation_assistant.md +6 -0
- package/blog/uk/index.md +1 -1
- package/blog/uk/rag_powered_documentation_assistant.md +6 -0
- package/blog/vi/index.md +1 -1
- package/blog/vi/rag_powered_documentation_assistant.md +6 -0
- package/blog/zh/index.md +1 -1
- package/blog/zh/intlayer_with_i18next.md +87 -28
- package/blog/zh/intlayer_with_next-i18next.md +86 -29
- package/blog/zh/intlayer_with_next-intl.md +88 -28
- package/blog/zh/intlayer_with_react-i18next.md +87 -28
- package/blog/zh/intlayer_with_react-intl.md +88 -27
- package/blog/zh/intlayer_with_vue-i18n.md +117 -8
- package/blog/zh/rag_powered_documentation_assistant.md +6 -0
- package/dist/cjs/common.cjs +24 -1
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +58 -31
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +265 -218
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +48 -21
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +33 -6
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/common.mjs +24 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +58 -31
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +265 -218
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +48 -21
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +33 -6
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/docs/ar/analytics.md +222 -0
- package/docs/ar/autoFill.md +28 -9
- package/docs/ar/bundle_optimization.md +58 -25
- package/docs/ar/configuration.md +25 -8
- package/docs/ar/dictionary/file.md +3 -1
- package/docs/ar/dictionary/nesting.md +47 -30
- package/docs/ar/formatters.md +148 -193
- package/docs/ar/intlayer_CMS.md +152 -0
- package/docs/ar/intlayer_with_angular_21.md +9 -9
- package/docs/ar/intlayer_with_nextjs_14.md +1 -28
- package/docs/ar/intlayer_with_nextjs_15.md +1 -33
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +40 -83
- package/docs/ar/intlayer_with_solid_start.md +1078 -0
- package/docs/ar/intlayer_with_vite+vue.md +1 -3
- package/docs/ar/live-sync.md +4 -0
- package/docs/ar/packages/intlayer/getLocalizedUrl.md +26 -24
- package/docs/ar/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/ar/packages/react-intlayer/useDictionary.md +4 -21
- package/docs/ar/packages/react-intlayer/useIntlayer.md +2 -2
- package/docs/ar/packages/vite-intlayer/exports.md +15 -0
- package/docs/ar/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/ar/packages/vite-intlayer/intlayerPrune.md +70 -3
- package/docs/ar/releases/v9.md +0 -37
- package/docs/ar/self_hosting.md +46 -49
- package/docs/bn/bundle_optimization.md +58 -25
- package/docs/bn/configuration.md +25 -8
- package/docs/bn/intlayer_with_angular_21.md +9 -9
- package/docs/cs/bundle_optimization.md +58 -25
- package/docs/cs/configuration.md +25 -8
- package/docs/cs/intlayer_with_angular_21.md +9 -9
- package/docs/de/analytics.md +222 -0
- package/docs/de/autoFill.md +28 -9
- package/docs/de/bundle_optimization.md +58 -25
- package/docs/de/configuration.md +25 -8
- package/docs/de/dictionary/file.md +3 -1
- package/docs/de/dictionary/nesting.md +47 -31
- package/docs/de/formatters.md +208 -334
- package/docs/de/intlayer_CMS.md +66 -15
- package/docs/de/intlayer_with_angular_21.md +9 -9
- package/docs/de/intlayer_with_nestjs.md +11 -7
- package/docs/de/intlayer_with_nextjs_14.md +1 -28
- package/docs/de/intlayer_with_nextjs_15.md +1 -33
- package/docs/de/intlayer_with_solid_start.md +1078 -0
- package/docs/de/intlayer_with_vite+vue.md +1 -3
- package/docs/de/live-sync.md +4 -0
- package/docs/de/packages/intlayer/getLocalizedUrl.md +33 -25
- package/docs/de/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/de/packages/react-intlayer/useDictionary.md +2 -5
- package/docs/de/packages/vite-intlayer/exports.md +15 -0
- package/docs/de/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/de/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/de/releases/v9.md +0 -15
- package/docs/de/self_hosting.md +46 -50
- package/docs/en/bundle_optimization.md +51 -23
- package/docs/en/cli/doc-review.md +13 -2
- package/docs/en/configuration.md +24 -15
- package/docs/en/intlayer_with_angular_21.md +9 -9
- package/docs/en/intlayer_with_solid_start.md +1091 -0
- package/docs/en/intlayer_with_vite+solid.md +12 -0
- package/docs/en/live-sync.md +4 -0
- package/docs/en-GB/analytics.md +222 -0
- package/docs/en-GB/autoFill.md +26 -7
- package/docs/en-GB/bundle_optimization.md +58 -25
- package/docs/en-GB/configuration.md +25 -8
- package/docs/en-GB/dictionary/file.md +2 -0
- package/docs/en-GB/dictionary/nesting.md +64 -205
- package/docs/en-GB/formatters.md +146 -181
- package/docs/en-GB/intlayer_CMS.md +152 -0
- package/docs/en-GB/intlayer_with_angular_21.md +9 -9
- package/docs/en-GB/intlayer_with_nestjs.md +6 -2
- package/docs/en-GB/intlayer_with_nextjs_14.md +0 -27
- package/docs/en-GB/intlayer_with_nextjs_15.md +1 -33
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +40 -82
- package/docs/en-GB/intlayer_with_solid_start.md +1078 -0
- package/docs/en-GB/intlayer_with_vite+vue.md +1 -3
- package/docs/en-GB/live-sync.md +4 -0
- package/docs/en-GB/packages/intlayer/getLocalizedUrl.md +30 -22
- package/docs/en-GB/packages/intlayer/getMultilingualUrls.md +16 -48
- package/docs/en-GB/packages/vite-intlayer/exports.md +15 -0
- package/docs/en-GB/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/en-GB/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/en-GB/self_hosting.md +60 -49
- package/docs/es/analytics.md +222 -0
- package/docs/es/autoFill.md +28 -9
- package/docs/es/bundle_optimization.md +58 -25
- package/docs/es/configuration.md +24 -7
- package/docs/es/dictionary/file.md +3 -1
- package/docs/es/dictionary/nesting.md +47 -30
- package/docs/es/formatters.md +114 -168
- package/docs/es/intlayer_CMS.md +35 -10
- package/docs/es/intlayer_with_angular_21.md +9 -9
- package/docs/es/intlayer_with_nextjs_14.md +1 -28
- package/docs/es/intlayer_with_nextjs_15.md +1 -33
- package/docs/es/intlayer_with_solid_start.md +1078 -0
- package/docs/es/live-sync.md +4 -0
- package/docs/es/packages/intlayer/getLocalizedUrl.md +31 -23
- package/docs/es/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/es/packages/vite-intlayer/exports.md +15 -0
- package/docs/es/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/es/packages/vite-intlayer/intlayerPrune.md +69 -2
- package/docs/es/releases/v9.md +0 -15
- package/docs/es/self_hosting.md +46 -49
- package/docs/fr/analytics.md +222 -0
- package/docs/fr/autoFill.md +27 -8
- package/docs/fr/bundle_optimization.md +58 -25
- package/docs/fr/configuration.md +25 -8
- package/docs/fr/dictionary/file.md +2 -0
- package/docs/fr/dictionary/nesting.md +37 -184
- package/docs/fr/formatters.md +95 -236
- package/docs/fr/intlayer_CMS.md +66 -15
- package/docs/fr/intlayer_with_angular_21.md +9 -9
- package/docs/fr/intlayer_with_nextjs_14.md +1 -28
- package/docs/fr/intlayer_with_nextjs_15.md +1 -33
- package/docs/fr/intlayer_with_solid_start.md +1078 -0
- package/docs/fr/live-sync.md +4 -0
- package/docs/fr/packages/intlayer/getLocalizedUrl.md +37 -27
- package/docs/fr/packages/intlayer/getMultilingualUrls.md +18 -20
- package/docs/fr/packages/vite-intlayer/exports.md +15 -0
- package/docs/fr/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/fr/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/fr/releases/v9.md +0 -15
- package/docs/fr/self_hosting.md +46 -49
- package/docs/hi/analytics.md +222 -0
- package/docs/hi/autoFill.md +28 -9
- package/docs/hi/bundle_optimization.md +58 -25
- package/docs/hi/configuration.md +25 -8
- package/docs/hi/dictionary/file.md +3 -1
- package/docs/hi/dictionary/nesting.md +47 -30
- package/docs/hi/formatters.md +233 -334
- package/docs/hi/how_works_intlayer.md +3 -1
- package/docs/hi/intlayer_CMS.md +152 -0
- package/docs/hi/intlayer_with_angular_21.md +9 -9
- package/docs/hi/intlayer_with_nestjs.md +11 -7
- package/docs/hi/intlayer_with_nextjs_14.md +1 -28
- package/docs/hi/intlayer_with_nextjs_15.md +1 -33
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +40 -83
- package/docs/hi/intlayer_with_solid_start.md +1077 -0
- package/docs/hi/intlayer_with_vite+preact.md +56 -49
- package/docs/hi/intlayer_with_vite+react.md +48 -41
- package/docs/hi/intlayer_with_vite+solid.md +32 -41
- package/docs/hi/intlayer_with_vite+vue.md +49 -44
- package/docs/hi/live-sync.md +4 -0
- package/docs/hi/packages/intlayer/getLocalizedUrl.md +26 -24
- package/docs/hi/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/hi/packages/next-intlayer/t.md +33 -1
- package/docs/hi/packages/react-intlayer/useDictionary.md +4 -21
- package/docs/hi/packages/vite-intlayer/exports.md +15 -0
- package/docs/hi/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/hi/packages/vite-intlayer/intlayerPrune.md +78 -5
- package/docs/hi/plugins/sync-json.md +9 -9
- package/docs/hi/releases/v9.md +0 -15
- package/docs/hi/self_hosting.md +38 -51
- package/docs/id/analytics.md +223 -0
- package/docs/id/bundle_optimization.md +58 -25
- package/docs/id/configuration.md +25 -8
- package/docs/id/dictionary/nesting.md +37 -184
- package/docs/id/formatters.md +208 -305
- package/docs/id/intlayer_CMS.md +164 -0
- package/docs/id/intlayer_with_angular_21.md +9 -9
- package/docs/id/intlayer_with_nextjs_14.md +1 -26
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +70 -63
- package/docs/id/intlayer_with_solid_start.md +1078 -0
- package/docs/id/live-sync.md +4 -0
- package/docs/id/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/id/packages/react-intlayer/useIntlayer.md +2 -2
- package/docs/id/packages/vite-intlayer/exports.md +15 -0
- package/docs/id/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/id/packages/vite-intlayer/intlayerPrune.md +78 -5
- package/docs/id/releases/v9.md +12 -0
- package/docs/id/self_hosting.md +61 -50
- package/docs/it/analytics.md +222 -0
- package/docs/it/autoFill.md +27 -8
- package/docs/it/bundle_optimization.md +58 -25
- package/docs/it/configuration.md +25 -8
- package/docs/it/dictionary/file.md +3 -1
- package/docs/it/dictionary/nesting.md +47 -30
- package/docs/it/formatters.md +114 -168
- package/docs/it/intlayer_CMS.md +66 -15
- package/docs/it/intlayer_with_angular_21.md +9 -9
- package/docs/it/intlayer_with_nestjs.md +11 -7
- package/docs/it/intlayer_with_nextjs_14.md +1 -28
- package/docs/it/intlayer_with_nextjs_15.md +1 -33
- package/docs/it/intlayer_with_solid_start.md +1078 -0
- package/docs/it/intlayer_with_vite+vue.md +1 -3
- package/docs/it/live-sync.md +4 -0
- package/docs/it/packages/intlayer/getLocalizedUrl.md +34 -26
- package/docs/it/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/it/packages/react-intlayer/useDictionary.md +4 -21
- package/docs/it/packages/vite-intlayer/exports.md +15 -0
- package/docs/it/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/it/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/it/releases/v9.md +0 -15
- package/docs/it/self_hosting.md +60 -49
- package/docs/ja/analytics.md +222 -0
- package/docs/ja/autoFill.md +28 -9
- package/docs/ja/bundle_optimization.md +58 -25
- package/docs/ja/configuration.md +25 -8
- package/docs/ja/dictionary/content_file.md +15 -7
- package/docs/ja/dictionary/file.md +3 -1
- package/docs/ja/dictionary/nesting.md +47 -30
- package/docs/ja/formatters.md +133 -187
- package/docs/ja/intlayer_visual_editor.md +3 -1
- package/docs/ja/intlayer_with_angular_21.md +6 -6
- package/docs/ja/intlayer_with_nestjs.md +2 -12
- package/docs/ja/intlayer_with_nextjs_14.md +1 -28
- package/docs/ja/intlayer_with_nextjs_15.md +1 -33
- package/docs/ja/intlayer_with_react_router_v7.md +456 -20
- package/docs/ja/intlayer_with_solid_start.md +1078 -0
- package/docs/ja/intlayer_with_vite+preact.md +73 -41
- package/docs/ja/intlayer_with_vite+vue.md +1 -3
- package/docs/ja/live-sync.md +4 -0
- package/docs/ja/mcp_server.md +3 -9
- package/docs/ja/packages/intlayer/getLocalizedUrl.md +26 -24
- package/docs/ja/packages/intlayer/getMultilingualUrls.md +3 -17
- package/docs/ja/packages/vite-intlayer/exports.md +15 -0
- package/docs/ja/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/ja/packages/vite-intlayer/intlayerPrune.md +79 -6
- package/docs/ja/releases/v9.md +12 -0
- package/docs/ja/self_hosting.md +46 -50
- package/docs/ko/analytics.md +222 -0
- package/docs/ko/autoFill.md +28 -9
- package/docs/ko/bundle_optimization.md +58 -25
- package/docs/ko/configuration.md +25 -8
- package/docs/ko/dictionary/file.md +3 -1
- package/docs/ko/dictionary/nesting.md +47 -30
- package/docs/ko/formatters.md +133 -187
- package/docs/ko/intlayer_with_angular_21.md +9 -9
- package/docs/ko/intlayer_with_lynx+react.md +133 -39
- package/docs/ko/intlayer_with_nextjs_14.md +1 -28
- package/docs/ko/intlayer_with_nextjs_15.md +1 -33
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +40 -188
- package/docs/ko/intlayer_with_solid_start.md +1078 -0
- package/docs/ko/intlayer_with_vite+preact.md +57 -23
- package/docs/ko/intlayer_with_vite+vue.md +1 -3
- package/docs/ko/live-sync.md +4 -0
- package/docs/ko/packages/intlayer/getLocalizedUrl.md +26 -24
- package/docs/ko/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/ko/packages/vite-intlayer/exports.md +15 -0
- package/docs/ko/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/ko/packages/vite-intlayer/intlayerPrune.md +79 -6
- package/docs/ko/releases/v9.md +12 -0
- package/docs/ko/self_hosting.md +60 -49
- package/docs/nl/bundle_optimization.md +58 -25
- package/docs/nl/configuration.md +25 -8
- package/docs/nl/intlayer_with_angular_21.md +9 -9
- package/docs/pl/analytics.md +220 -0
- package/docs/pl/bundle_optimization.md +58 -25
- package/docs/pl/configuration.md +25 -8
- package/docs/pl/dictionary/nesting.md +47 -30
- package/docs/pl/formatters.md +208 -305
- package/docs/pl/intlayer_CMS.md +152 -0
- package/docs/pl/intlayer_with_angular_21.md +9 -9
- package/docs/pl/intlayer_with_nextjs_14.md +1 -26
- package/docs/pl/intlayer_with_solid_start.md +1078 -0
- package/docs/pl/live-sync.md +4 -0
- package/docs/pl/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/pl/packages/react-intlayer/useDictionary.md +2 -19
- package/docs/pl/packages/vite-intlayer/exports.md +15 -0
- package/docs/pl/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/pl/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/pl/releases/v9.md +0 -15
- package/docs/pl/self_hosting.md +60 -49
- package/docs/pt/analytics.md +222 -0
- package/docs/pt/bundle_optimization.md +58 -24
- package/docs/pt/configuration.md +25 -8
- package/docs/pt/dictionary/file.md +3 -1
- package/docs/pt/dictionary/nesting.md +47 -30
- package/docs/pt/formatters.md +112 -168
- package/docs/pt/intlayer_CMS.md +66 -15
- package/docs/pt/intlayer_with_angular_21.md +9 -9
- package/docs/pt/intlayer_with_astro_lit.md +26 -1
- package/docs/pt/intlayer_with_nextjs_14.md +1 -28
- package/docs/pt/intlayer_with_nextjs_15.md +1 -33
- package/docs/pt/intlayer_with_solid_start.md +1078 -0
- package/docs/pt/intlayer_with_vite+vue.md +1 -3
- package/docs/pt/live-sync.md +4 -0
- package/docs/pt/packages/intlayer/getLocalizedUrl.md +34 -26
- package/docs/pt/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/pt/packages/vite-intlayer/exports.md +15 -0
- package/docs/pt/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/pt/packages/vite-intlayer/intlayerPrune.md +78 -6
- package/docs/pt/releases/v9.md +0 -15
- package/docs/pt/self_hosting.md +60 -49
- package/docs/ru/analytics.md +222 -0
- package/docs/ru/autoFill.md +27 -8
- package/docs/ru/bundle_optimization.md +58 -25
- package/docs/ru/configuration.md +25 -8
- package/docs/ru/dictionary/file.md +3 -1
- package/docs/ru/dictionary/nesting.md +64 -205
- package/docs/ru/formatters.md +108 -128
- package/docs/ru/intlayer_with_angular_21.md +9 -9
- package/docs/ru/intlayer_with_nextjs_14.md +1 -28
- package/docs/ru/intlayer_with_nextjs_15.md +1 -33
- package/docs/ru/intlayer_with_solid_start.md +1078 -0
- package/docs/ru/intlayer_with_vite+vue.md +1 -3
- package/docs/ru/live-sync.md +4 -0
- package/docs/ru/packages/intlayer/getLocalizedUrl.md +34 -26
- package/docs/ru/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/ru/packages/react-intlayer/useDictionary.md +4 -21
- package/docs/ru/packages/vite-intlayer/exports.md +15 -0
- package/docs/ru/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/ru/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/ru/releases/v9.md +0 -15
- package/docs/ru/self_hosting.md +60 -49
- package/docs/tr/analytics.md +222 -0
- package/docs/tr/autoFill.md +28 -9
- package/docs/tr/bundle_optimization.md +58 -25
- package/docs/tr/configuration.md +25 -8
- package/docs/tr/dictionary/file.md +2 -0
- package/docs/tr/dictionary/nesting.md +47 -30
- package/docs/tr/formatters.md +144 -190
- package/docs/tr/intlayer_CMS.md +152 -0
- package/docs/tr/intlayer_with_angular_21.md +9 -9
- package/docs/tr/intlayer_with_nestjs.md +2 -12
- package/docs/tr/intlayer_with_nextjs_15.md +1 -33
- package/docs/tr/intlayer_with_solid_start.md +1078 -0
- package/docs/tr/intlayer_with_vite+vue.md +1 -3
- package/docs/tr/live-sync.md +4 -0
- package/docs/tr/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/tr/packages/vite-intlayer/exports.md +15 -0
- package/docs/tr/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/tr/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/tr/self_hosting.md +47 -50
- package/docs/uk/analytics.md +222 -0
- package/docs/uk/bundle_optimization.md +58 -25
- package/docs/uk/configuration.md +25 -8
- package/docs/uk/dictionary/nesting.md +47 -30
- package/docs/uk/formatters.md +128 -185
- package/docs/uk/intlayer_CMS.md +152 -0
- package/docs/uk/intlayer_with_angular_21.md +9 -9
- package/docs/uk/intlayer_with_nextjs_14.md +1 -26
- package/docs/uk/intlayer_with_solid_start.md +1078 -0
- package/docs/uk/live-sync.md +4 -0
- package/docs/uk/packages/react-intlayer/useDictionary.md +2 -19
- package/docs/uk/packages/vite-intlayer/exports.md +15 -0
- package/docs/uk/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/uk/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/uk/releases/v9.md +0 -15
- package/docs/uk/self_hosting.md +60 -50
- package/docs/ur/bundle_optimization.md +58 -25
- package/docs/ur/configuration.md +25 -8
- package/docs/ur/intlayer_with_angular_21.md +9 -9
- package/docs/vi/analytics.md +222 -0
- package/docs/vi/bundle_optimization.md +58 -25
- package/docs/vi/configuration.md +24 -8
- package/docs/vi/dictionary/nesting.md +37 -184
- package/docs/vi/formatters.md +208 -309
- package/docs/vi/intlayer_CMS.md +164 -0
- package/docs/vi/intlayer_with_angular_21.md +9 -9
- package/docs/vi/intlayer_with_nextjs_14.md +0 -25
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +70 -63
- package/docs/vi/intlayer_with_solid_start.md +1078 -0
- package/docs/vi/live-sync.md +4 -0
- package/docs/vi/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/vi/packages/react-intlayer/useIntlayer.md +2 -2
- package/docs/vi/packages/vite-intlayer/exports.md +15 -0
- package/docs/vi/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/vi/packages/vite-intlayer/intlayerPrune.md +77 -4
- package/docs/vi/plugins/sync-json.md +6 -6
- package/docs/vi/releases/v9.md +12 -0
- package/docs/vi/self_hosting.md +61 -50
- package/docs/zh/CI_CD.md +4 -0
- package/docs/zh/analytics.md +222 -0
- package/docs/zh/autoFill.md +28 -9
- package/docs/zh/bundle_optimization.md +58 -25
- package/docs/zh/configuration.md +24 -8
- package/docs/zh/dictionary/file.md +2 -0
- package/docs/zh/dictionary/nesting.md +47 -30
- package/docs/zh/formatters.md +140 -188
- package/docs/zh/intlayer_CMS.md +164 -0
- package/docs/zh/intlayer_with_analog.md +193 -3
- package/docs/zh/intlayer_with_angular_19.md +272 -3
- package/docs/zh/intlayer_with_angular_21.md +7 -7
- package/docs/zh/intlayer_with_create_react_app.md +348 -26
- package/docs/zh/intlayer_with_lynx+react.md +263 -4
- package/docs/zh/intlayer_with_nextjs_14.md +1 -28
- package/docs/zh/intlayer_with_nextjs_15.md +1 -33
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +558 -1
- package/docs/zh/intlayer_with_nuxt.md +182 -7
- package/docs/zh/intlayer_with_react_router_v7.md +183 -25
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +306 -42
- package/docs/zh/intlayer_with_solid_start.md +1077 -0
- package/docs/zh/intlayer_with_storybook.md +260 -3
- package/docs/zh/intlayer_with_svelte_kit.md +428 -48
- package/docs/zh/intlayer_with_tanstack+solid.md +713 -13
- package/docs/zh/intlayer_with_tanstack.md +731 -20
- package/docs/zh/intlayer_with_vanilla.md +314 -4
- package/docs/zh/intlayer_with_vite+lit.md +465 -4
- package/docs/zh/intlayer_with_vite+preact.md +422 -116
- package/docs/zh/intlayer_with_vite+react.md +324 -45
- package/docs/zh/intlayer_with_vite+react_compiler.md +228 -13
- package/docs/zh/intlayer_with_vite+solid.md +462 -32
- package/docs/zh/intlayer_with_vite+vanilla.md +497 -4
- package/docs/zh/live-sync.md +4 -0
- package/docs/zh/mcp_server.md +3 -9
- package/docs/zh/packages/intlayer/getLocalizedUrl.md +26 -24
- package/docs/zh/packages/intlayer/getMultilingualUrls.md +4 -18
- package/docs/zh/packages/vite-intlayer/exports.md +29 -0
- package/docs/zh/packages/vite-intlayer/intlayer.md +121 -6
- package/docs/zh/packages/vite-intlayer/intlayerPrune.md +79 -6
- package/docs/zh/releases/v9.md +12 -0
- package/docs/zh/self_hosting.md +60 -50
- package/docs/zh-TW/bundle_optimization.md +58 -25
- package/docs/zh-TW/intlayer_with_angular_21.md +7 -7
- package/package.json +7 -7
- package/src/common.ts +39 -2
- package/src/generated/blog.entry.ts +66 -34
- package/src/generated/docs.entry.ts +273 -221
- package/src/generated/frequentQuestions.entry.ts +56 -24
- package/src/generated/legal.entry.ts +41 -9
|
@@ -64,6 +64,53 @@ export default firstDictionary;
|
|
|
64
64
|
}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### Referencing mit Nest
|
|
68
|
+
|
|
69
|
+
Erstellen Sie nun ein weiteres Content-Modul, das die `nest`-Funktion verwendet, um auf den obigen Inhalt zu verweisen. Sie können auf den gesamten Inhalt oder auf einen bestimmten verschachtelten Wert verweisen:
|
|
70
|
+
|
|
71
|
+
```typescript fileName="secondDictionary.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
72
|
+
import { nest, type Dictionary } from "intlayer";
|
|
73
|
+
|
|
74
|
+
const myNestingContent = {
|
|
75
|
+
key: "key_of_my_second_dictionary",
|
|
76
|
+
content: {
|
|
77
|
+
// Referenziert das gesamte Dictionary:
|
|
78
|
+
fullNestedContent: nest("key_of_my_first_dictionary"),
|
|
79
|
+
// Referenziert einen bestimmten verschachtelten Wert:
|
|
80
|
+
partialNestedContent: nest(
|
|
81
|
+
"key_of_my_first_dictionary",
|
|
82
|
+
"subContent.contentNumber"
|
|
83
|
+
),
|
|
84
|
+
},
|
|
85
|
+
} satisfies Dictionary;
|
|
86
|
+
|
|
87
|
+
export default myNestingContent;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```json fileName="secondDictionary.content.json" contentDeclarationFormat="json"
|
|
91
|
+
{
|
|
92
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
93
|
+
"key": "key_of_my_second_dictionary",
|
|
94
|
+
"content": {
|
|
95
|
+
"fullNestedContent": {
|
|
96
|
+
"nodeType": "nested",
|
|
97
|
+
"nested": {
|
|
98
|
+
"dictionaryKey": "key_of_my_first_dictionary"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"partialNestedContent": {
|
|
102
|
+
"nodeType": "nested",
|
|
103
|
+
"nested": {
|
|
104
|
+
"dictionaryKey": "key_of_my_first_dictionary",
|
|
105
|
+
"path": "subContent.contentNumber"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Als zweiter Parameter können Sie einen Pfad zu einem verschachtelten Wert innerhalb dieses Inhalts angeben. Wenn kein Pfad angegeben wird, wird der gesamte Inhalt des referenzierten Dictionaries zurückgegeben.
|
|
113
|
+
|
|
67
114
|
## Einrichtung der Verschachtelung
|
|
68
115
|
|
|
69
116
|
<Tabs group="framework">
|
|
@@ -258,37 +305,6 @@ document.getElementById("nested")!.textContent = content.partialNestedContent;
|
|
|
258
305
|
</Tab>
|
|
259
306
|
</Tabs>
|
|
260
307
|
|
|
261
|
-
## Verwendung der Verschachtelung mit React Intlayer
|
|
262
|
-
|
|
263
|
-
Um verschachtelte Inhalte in einer React-Komponente zu verwenden, nutzen Sie den `useIntlayer`-Hook aus dem Paket `react-intlayer`. Dieser Hook ruft den richtigen Inhalt basierend auf dem angegebenen Schlüssel ab. Hier ist ein Beispiel, wie Sie ihn verwenden können:
|
|
264
|
-
|
|
265
|
-
```tsx fileName="**/*.tsx" codeFormat={["typescript", "esm"]}
|
|
266
|
-
import type { FC } from "react";
|
|
267
|
-
import { useIntlayer } from "react-intlayer";
|
|
268
|
-
|
|
269
|
-
const NestComponent: FC = () => {
|
|
270
|
-
const { fullNestedContent, partialNestedContent } = useIntlayer(
|
|
271
|
-
"key_of_my_second_dictionary"
|
|
272
|
-
);
|
|
273
|
-
|
|
274
|
-
return (
|
|
275
|
-
<div>
|
|
276
|
-
<p>
|
|
277
|
-
Vollständiger verschachtelter Inhalt:{" "}
|
|
278
|
-
{JSON.stringify(fullNestedContent)}
|
|
279
|
-
{/* Ausgabe: {"content": "content", "subContent": {"contentNumber": 0, "contentString": "string"}} */}
|
|
280
|
-
</p>
|
|
281
|
-
<p>
|
|
282
|
-
Teilweise verschachtelter Wert: {partialNestedContent}
|
|
283
|
-
{/* Ausgabe: 0 */}
|
|
284
|
-
</p>
|
|
285
|
-
</div>
|
|
286
|
-
);
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export default NestComponent;
|
|
290
|
-
```
|
|
291
|
-
|
|
292
308
|
## Zusätzliche Ressourcen
|
|
293
309
|
|
|
294
310
|
Für detailliertere Informationen zur Konfiguration und Nutzung lesen Sie die folgenden Ressourcen:
|
package/docs/de/formatters.md
CHANGED
|
@@ -141,45 +141,40 @@ const MyComponent = () => {
|
|
|
141
141
|
};
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
### `useIntl` Hook
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
Der `useIntl` Hook bietet direkten Zugriff auf ein locale-gebundenes `Intl` Objekt. Dies ist nützlich, wenn Sie die vollständige `Intl` API benötigen (z. B. `DisplayNames`, `Collator`, `PluralRules`) mit automatischer Locale-Injektion.
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
```tsx
|
|
149
|
+
import { useIntl } from "react-intlayer/format";
|
|
149
150
|
|
|
150
|
-
|
|
151
|
+
const MyComponent = () => {
|
|
152
|
+
const intl = useIntl(); // nutzt die Kontext-Locale
|
|
151
153
|
|
|
152
|
-
|
|
154
|
+
// Standard Intl API, aber Locale wird automatisch injiziert, wenn undefined
|
|
155
|
+
const formatted = new intl.NumberFormat(undefined, {
|
|
156
|
+
style: "currency",
|
|
157
|
+
currency: "USD",
|
|
158
|
+
}).format(123.45);
|
|
153
159
|
|
|
154
|
-
|
|
160
|
+
// Sie können die Locale bei Bedarf trotzdem überschreiben
|
|
161
|
+
const date = new intl.DateTimeFormat("fr-FR").format(new Date());
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
|
|
163
|
+
// Zugriff auf weitere Intl Features
|
|
164
|
+
const displayNames = new intl.DisplayNames(undefined, { type: "language" });
|
|
165
|
+
const languageName = displayNames.of("fr"); // "French" (oder lokalisiert)
|
|
158
166
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const displayNames = new Intl.DisplayNames("fr", { type: "language" });
|
|
168
|
-
displayNames.of("en"); // "anglais"
|
|
169
|
-
|
|
170
|
-
// Sortierung mit Collator
|
|
171
|
-
const collator = new Intl.Collator("fr", { sensitivity: "base" });
|
|
172
|
-
collator.compare("é", "e"); // 0 (gleich)
|
|
173
|
-
|
|
174
|
-
// Pluralregeln
|
|
175
|
-
const pluralRules = new Intl.PluralRules("fr");
|
|
176
|
-
pluralRules.select(1); // "one"
|
|
177
|
-
pluralRules.select(2); // "other"
|
|
167
|
+
return (
|
|
168
|
+
<div>
|
|
169
|
+
<p>{formatted}</p>
|
|
170
|
+
<p>{date}</p>
|
|
171
|
+
<p>{languageName}</p>
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
178
175
|
```
|
|
179
176
|
|
|
180
|
-
##
|
|
181
|
-
|
|
182
|
-
Neben den Formatierer-Helfern können Sie den zwischengespeicherten Intl-Wrapper auch direkt für andere Intl-Funktionen verwenden:
|
|
177
|
+
## Vue Formatters
|
|
183
178
|
|
|
184
179
|
### `Intl.DisplayNames`
|
|
185
180
|
|
|
@@ -285,6 +280,189 @@ pluralRules.select(3); // "few"
|
|
|
285
280
|
pluralRules.select(11); // "many"
|
|
286
281
|
```
|
|
287
282
|
|
|
283
|
+
### Formatter-Funktionen
|
|
284
|
+
|
|
285
|
+
#### `number(value, options?)`
|
|
286
|
+
|
|
287
|
+
Formatiert einen numerischen Wert mit lokalisierter Gruppierung und Dezimalstellen.
|
|
288
|
+
|
|
289
|
+
- **value**: `number | string`
|
|
290
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
291
|
+
|
|
292
|
+
```ts
|
|
293
|
+
number(123456.789); // "123,456.789" (in en-US)
|
|
294
|
+
number("1000000", { locale: "fr" }); // "1 000 000"
|
|
295
|
+
number(1234.5, { minimumFractionDigits: 2 }); // "1,234.50"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### `percentage(value, options?)`
|
|
299
|
+
|
|
300
|
+
Formatiert eine Zahl als Prozentsatz-String. Werte größer als 1 werden normalisiert (z. B. `25` → `25%`, `0.25` → `25%`).
|
|
301
|
+
|
|
302
|
+
- **value**: `number | string`
|
|
303
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
percentage(0.25); // "25%"
|
|
307
|
+
percentage(25); // "25%"
|
|
308
|
+
percentage(0.237, { minimumFractionDigits: 1 }); // "23.7%"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
#### `currency(value, options?)`
|
|
312
|
+
|
|
313
|
+
Formatiert einen Wert als lokalisierte Währung. Standardmäßig `USD`.
|
|
314
|
+
|
|
315
|
+
- **value**: `number | string`
|
|
316
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
317
|
+
- Common: `currency`, `currencyDisplay` (`"symbol" | "code" | "name"`)
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
currency(1234.5, { currency: "EUR" }); // "€1,234.50"
|
|
321
|
+
currency("5000", { locale: "fr", currency: "CAD", currencyDisplay: "code" }); // "5 000,00 CAD"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### `date(date, optionsOrPreset?)`
|
|
325
|
+
|
|
326
|
+
Formatiert einen Datums-/Zeitwert.
|
|
327
|
+
|
|
328
|
+
- **date**: `Date | string | number`
|
|
329
|
+
- **optionsOrPreset**: `Intl.DateTimeFormatOptions & { locale?: LocalesValues }` oder Voreinstellung: `"short" | "long" | "dateOnly" | "timeOnly" | "full"`
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
date(new Date(), "short"); // z. B. "08/02/25, 14:30"
|
|
333
|
+
date("2025-08-02T14:30:00Z", { locale: "fr", month: "long", day: "numeric" }); // "2 août"
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### `relativeTime(from, to?, options?)`
|
|
337
|
+
|
|
338
|
+
Formatiert relative Zeit zwischen zwei Zeitpunkten.
|
|
339
|
+
|
|
340
|
+
- **from**: `Date | string | number`
|
|
341
|
+
- **to**: `Date | string | number` (Standardwert: `new Date()`)
|
|
342
|
+
- **options**: `{ locale?, unit?, numeric?, style? }`
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
const now = new Date();
|
|
346
|
+
const in3Days = new Date(now.getTime() + 3 * 864e5);
|
|
347
|
+
relativeTime(now, in3Days, { unit: "day" }); // "in 3 days"
|
|
348
|
+
|
|
349
|
+
const twoHoursAgo = new Date(now.getTime() - 2 * 3600e3);
|
|
350
|
+
relativeTime(now, twoHoursAgo, { unit: "hour", numeric: "auto" }); // "2 hours ago"
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
#### `units(value, options?)`
|
|
354
|
+
|
|
355
|
+
Formatiert einen numerischen Wert mit einer Einheit.
|
|
356
|
+
|
|
357
|
+
- **value**: `number | string`
|
|
358
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
359
|
+
- Common: `unit` (z. B. `"kilometer"`, `"byte"`), `unitDisplay` (`"short" | "narrow" | "long"`)
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
units(5, { unit: "kilometer", unitDisplay: "long", locale: "en-GB" }); // "5 kilometers"
|
|
363
|
+
units(1024, { unit: "byte", unitDisplay: "narrow" }); // "1,024B"
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
#### `compact(value, options?)`
|
|
367
|
+
|
|
368
|
+
Formatiert eine Nummer mit kompakter Notation.
|
|
369
|
+
|
|
370
|
+
- **value**: `number | string`
|
|
371
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
compact(1200); // "1.2K"
|
|
375
|
+
compact("1000000", { locale: "fr", compactDisplay: "long" }); // "1 million"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
#### `list(values, options?)`
|
|
379
|
+
|
|
380
|
+
Formatiert ein Array in eine lokalisierte Listzeichenkette.
|
|
381
|
+
|
|
382
|
+
- **values**: `(string | number)[]`
|
|
383
|
+
- **options**: `Intl.ListFormatOptions & { locale?: LocalesValues }`
|
|
384
|
+
- Häufig: `type` (`"conjunction" | "disjunction" | "unit"`), `style` (`"long" | "short" | "narrow"`)
|
|
385
|
+
|
|
386
|
+
```ts
|
|
387
|
+
list(["apple", "banana", "orange"]); // "apple, banana, and orange"
|
|
388
|
+
list(["red", "green", "blue"], { locale: "fr", type: "disjunction" }); // "rouge, vert ou bleu"
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
## Cached Intl
|
|
392
|
+
|
|
393
|
+
Das von `intlayer` exportierte `Intl` ist ein gecachter Wrapper um das globale `Intl`. Es speichert Formatter-Instanzen (`NumberFormat`, `DateTimeFormat`, usw.) im Cache, um zu vermeiden, dass diese wiederholt erstellt werden, was die Performance verbessert.
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
import { Intl } from "intlayer";
|
|
397
|
+
|
|
398
|
+
// Zahlenformatierung
|
|
399
|
+
const numberFormat = new Intl.NumberFormat("en-GB", {
|
|
400
|
+
style: "currency",
|
|
401
|
+
currency: "GBP",
|
|
402
|
+
});
|
|
403
|
+
numberFormat.format(1234.5); // "£1,234.50"
|
|
404
|
+
|
|
405
|
+
// Anzeigenamen für Sprachen, Regionen usw.
|
|
406
|
+
const displayNames = new Intl.DisplayNames("fr", { type: "language" });
|
|
407
|
+
displayNames.of("en"); // "anglais"
|
|
408
|
+
|
|
409
|
+
// Sortierung (Collation)
|
|
410
|
+
const collator = new Intl.Collator("fr", { sensitivity: "base" });
|
|
411
|
+
collator.compare("é", "e"); // 0 (equal)
|
|
412
|
+
|
|
413
|
+
// Pluralregeln
|
|
414
|
+
const pluralRules = new Intl.PluralRules("fr");
|
|
415
|
+
pluralRules.select(1); // "one"
|
|
416
|
+
pluralRules.select(2); // "other"
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Zusätzliche Intl-Funktionen
|
|
420
|
+
|
|
421
|
+
#### `Intl.DisplayNames`
|
|
422
|
+
|
|
423
|
+
Für lokalisierte Namen von Sprachen, Regionen, Währungen und Schriften:
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
import { Intl } from "intlayer";
|
|
427
|
+
|
|
428
|
+
const languageNames = new Intl.DisplayNames("en", { type: "language" });
|
|
429
|
+
languageNames.of("fr"); // "French"
|
|
430
|
+
|
|
431
|
+
const regionNames = new Intl.DisplayNames("fr", { type: "region" });
|
|
432
|
+
regionNames.of("US"); // "États-Unis"
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
#### `Intl.Collator`
|
|
436
|
+
|
|
437
|
+
Für gebietsschemaabhängigen Stringvergleich und Sortierung:
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
import { Intl } from "intlayer";
|
|
441
|
+
|
|
442
|
+
const collator = new Intl.Collator("de", {
|
|
443
|
+
sensitivity: "base",
|
|
444
|
+
numeric: true,
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
const words = ["äpfel", "zebra", "100", "20"];
|
|
448
|
+
words.sort(collator.compare); // ["20", "100", "äpfel", "zebra"]
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
#### `Intl.PluralRules`
|
|
452
|
+
|
|
453
|
+
Zur Bestimmung von Pluralformen in verschiedenen Locales:
|
|
454
|
+
|
|
455
|
+
```ts
|
|
456
|
+
import { Intl } from "intlayer";
|
|
457
|
+
|
|
458
|
+
const pluralRules = new Intl.PluralRules("ar");
|
|
459
|
+
pluralRules.select(0); // "zero"
|
|
460
|
+
pluralRules.select(1); // "one"
|
|
461
|
+
pluralRules.select(2); // "two"
|
|
462
|
+
pluralRules.select(3); // "few"
|
|
463
|
+
pluralRules.select(11); // "many"
|
|
464
|
+
```
|
|
465
|
+
|
|
288
466
|
## Locale-Dienstprogramme
|
|
289
467
|
|
|
290
468
|
### `getLocaleName(displayLocale, targetLocale?)`
|
|
@@ -423,21 +601,6 @@ const content = getTranslation(
|
|
|
423
601
|
- **locale**: Ziel-Sprache (Standard ist die konfigurierte Standardsprache)
|
|
424
602
|
- **fallback**: Ob auf die Standardsprache zurückgegriffen werden soll (Standard ist true)
|
|
425
603
|
|
|
426
|
-
### `getIntlayer(dictionaryKey, locale?, plugins?)`
|
|
427
|
-
|
|
428
|
-
Ruft Inhalte aus einem Wörterbuch anhand eines Schlüssels ab und transformiert sie:
|
|
429
|
-
|
|
430
|
-
```ts
|
|
431
|
-
import { getIntlayer } from "intlayer";
|
|
432
|
-
|
|
433
|
-
const content = getIntlayer("common", "fr");
|
|
434
|
-
const nestedContent = getIntlayer("common", "fr", customPlugins);
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
- **dictionaryKey**: Der Schlüssel des abzurufenden Wörterbuchs
|
|
438
|
-
- **locale**: Optionale Locale (Standard ist die konfigurierte Standard-Locale)
|
|
439
|
-
- **plugins**: Optionale Liste von benutzerdefinierten Transformations-Plugins
|
|
440
|
-
|
|
441
604
|
### `getIntlayerAsync(dictionaryKey, locale?, plugins?)`
|
|
442
605
|
|
|
443
606
|
Ruft asynchron Inhalte aus einem entfernten Wörterbuch ab:
|
|
@@ -452,297 +615,8 @@ const content = await getIntlayerAsync("common", "fr");
|
|
|
452
615
|
- **locale**: Optionale Locale (Standard ist die konfigurierte Standard-Locale)
|
|
453
616
|
- **plugins**: Optionale Liste von benutzerdefinierten Transformations-Plugins
|
|
454
617
|
|
|
455
|
-
## Formatierer
|
|
456
|
-
|
|
457
|
-
Alle nachfolgenden Hilfsfunktionen werden aus `intlayer` exportiert.
|
|
458
|
-
|
|
459
|
-
### `number(value, options?)`
|
|
460
|
-
|
|
461
|
-
Formatiert einen numerischen Wert unter Verwendung von lokalisierungsspezifischer Gruppierung und Dezimalstellen.
|
|
462
|
-
|
|
463
|
-
- **value**: `number | string`
|
|
464
|
-
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
465
|
-
|
|
466
|
-
Beispiele:
|
|
467
|
-
|
|
468
|
-
```ts
|
|
469
|
-
import { number } from "intlayer";
|
|
470
|
-
|
|
471
|
-
number(123456.789); // "123,456.789" (in en-US)
|
|
472
|
-
number("1000000", { locale: "fr" }); // "1 000 000"
|
|
473
|
-
number(1234.5, { minimumFractionDigits: 2 }); // "1,234.50"
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
### `percentage(value, options?)`
|
|
477
|
-
|
|
478
|
-
Formatiert eine Zahl als Prozentwert-String.
|
|
479
|
-
|
|
480
|
-
Verhalten: Werte größer als 1 werden als ganze Prozentsätze interpretiert und normalisiert (z.B. `25` → `25%`, `0.25` → `25%`).
|
|
481
|
-
|
|
482
|
-
- **value**: `number | string`
|
|
483
|
-
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
484
|
-
|
|
485
|
-
Beispiele:
|
|
486
|
-
|
|
487
|
-
```ts
|
|
488
|
-
import { percentage } from "intlayer";
|
|
489
|
-
|
|
490
|
-
percentage(0.25); // "25%"
|
|
491
|
-
percentage(25); // "25%"
|
|
492
|
-
percentage(0.237, { minimumFractionDigits: 1 }); // "23,7%"
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
### `currency(value, options?)`
|
|
496
|
-
|
|
497
|
-
Formatiert einen Wert als lokalisierte Währung. Standardmäßig `USD` mit zwei Nachkommastellen.
|
|
498
|
-
|
|
499
|
-
- **value**: `number | string`
|
|
500
|
-
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
501
|
-
- Häufige Felder: `currency` (z.B. `"EUR"`), `currencyDisplay` (`"symbol" | "code" | "name"`)
|
|
502
|
-
|
|
503
|
-
Beispiele:
|
|
504
|
-
|
|
505
|
-
```ts
|
|
506
|
-
import { currency } from "intlayer";
|
|
507
|
-
|
|
508
|
-
currency(1234.5, { currency: "EUR" }); // "€1.234,50"
|
|
509
|
-
currency("5000", { locale: "fr", currency: "CAD", currencyDisplay: "code" }); // "5 000,00 CAD"
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
### `date(date, optionsOrPreset?)`
|
|
513
|
-
|
|
514
|
-
Formatiert einen Datum-/Uhrzeitwert mit `Intl.DateTimeFormat`.
|
|
515
|
-
|
|
516
|
-
- **date**: `Date | string | number`
|
|
517
|
-
- **optionsOrPreset**: `Intl.DateTimeFormatOptions & { locale?: LocalesValues }` oder eines der Presets:
|
|
518
|
-
- Presets: `"short" | "long" | "dateOnly" | "timeOnly" | "full"`
|
|
519
|
-
|
|
520
|
-
Beispiele:
|
|
521
|
-
|
|
522
|
-
```ts
|
|
523
|
-
import { date } from "intlayer";
|
|
524
|
-
|
|
525
|
-
date(new Date(), "short"); // z.B. "08.02.25, 14:30"
|
|
526
|
-
date("2025-08-02T14:30:00Z", { locale: "fr", month: "long", day: "numeric" }); // "2 août"
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
### `relativeTime(from, to = new Date(), options?)`
|
|
530
|
-
|
|
531
|
-
Formatiert relative Zeit zwischen zwei Zeitpunkten mit `Intl.RelativeTimeFormat`.
|
|
532
|
-
|
|
533
|
-
- Übergebe "now" als erstes Argument und das Ziel als zweites, um eine natürliche Formulierung zu erhalten.
|
|
534
|
-
- **from**: `Date | string | number`
|
|
535
|
-
- **to**: `Date | string | number` (Standard ist `new Date()`)
|
|
536
|
-
- **options**: `{ locale?: LocalesValues; unit?: Intl.RelativeTimeFormatUnit; numeric?: Intl.RelativeTimeFormatNumeric; style?: Intl.RelativeTimeFormatStyle }`
|
|
537
|
-
- Standardmäßig ist `unit` `"second"`.
|
|
538
|
-
|
|
539
|
-
Beispiele:
|
|
540
|
-
|
|
541
|
-
```ts
|
|
542
|
-
import { relativeTime } from "intlayer";
|
|
543
|
-
|
|
544
|
-
const now = new Date();
|
|
545
|
-
const in3Days = new Date(now.getTime() + 3 * 864e5);
|
|
546
|
-
relativeTime(now, in3Days, { unit: "day" }); // "in 3 Tagen"
|
|
547
|
-
|
|
548
|
-
const twoHoursAgo = new Date(now.getTime() - 2 * 3600e3);
|
|
549
|
-
relativeTime(now, twoHoursAgo, { unit: "hour", numeric: "auto" }); // "vor 2 Stunden"
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
### `units(value, options?)`
|
|
553
|
-
|
|
554
|
-
Formatiert einen numerischen Wert als lokalisierten Einheiten-String mit `Intl.NumberFormat` und `style: 'unit'`.
|
|
555
|
-
|
|
556
|
-
- **value**: `number | string`
|
|
557
|
-
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
558
|
-
- Gemeinsame Felder: `unit` (z.B. `"kilometer"`, `"byte"`), `unitDisplay` (`"short" | "narrow" | "long"`)
|
|
559
|
-
- Standardwerte: `unit: 'day'`, `unitDisplay: 'short'`, `useGrouping: false`
|
|
560
|
-
|
|
561
|
-
Beispiele:
|
|
562
|
-
|
|
563
|
-
```ts
|
|
564
|
-
import { units } from "intlayer";
|
|
565
|
-
|
|
566
|
-
units(5, { unit: "kilometer", unitDisplay: "long", locale: "en-GB" }); // "5 kilometers"
|
|
567
|
-
units(1024, { unit: "byte", unitDisplay: "narrow" }); // "1,024B" (abhängig von der Locale)
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
### `compact(value, options?)`
|
|
571
|
-
|
|
572
|
-
Formatiert eine Zahl mit kompakter Notation (z.B. `1.2K`, `1M`).
|
|
573
|
-
|
|
574
|
-
- **value**: `number | string`
|
|
575
|
-
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }` (verwendet intern `notation: 'compact'`)
|
|
576
|
-
|
|
577
|
-
Beispiele:
|
|
578
|
-
|
|
579
|
-
```ts
|
|
580
|
-
import { compact } from "intlayer";
|
|
581
|
-
|
|
582
|
-
compact(1200); // "1.2K"
|
|
583
|
-
compact("1000000", { locale: "fr", compactDisplay: "long" }); // "1 million"
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
### `list(values, options?)`
|
|
587
|
-
|
|
588
|
-
Formatiert ein Array von Werten zu einem lokalisierten Listenstring unter Verwendung von `Intl.ListFormat`.
|
|
589
|
-
|
|
590
|
-
- **values**: `(string | number)[]`
|
|
591
|
-
- **options**: `Intl.ListFormatOptions & { locale?: LocalesValues }`
|
|
592
|
-
- Gemeinsame Felder: `type` (`"conjunction" | "disjunction" | "unit"`), `style` (`"long" | "short" | "narrow"`)
|
|
593
|
-
- Standardwerte: `type: 'conjunction'`, `style: 'long'`
|
|
594
|
-
|
|
595
|
-
Beispiele:
|
|
596
|
-
|
|
597
|
-
```ts
|
|
598
|
-
import { list } from "intlayer";
|
|
599
|
-
|
|
600
|
-
list(["apple", "banana", "orange"]); // "apple, banana, and orange"
|
|
601
|
-
list(["red", "green", "blue"], { locale: "fr", type: "disjunction" }); // "rouge, vert ou bleu"
|
|
602
|
-
list([1, 2, 3], { type: "unit" }); // "1, 2, 3"
|
|
603
|
-
```
|
|
604
|
-
|
|
605
618
|
## Hinweise
|
|
606
619
|
|
|
607
620
|
- Alle Hilfsfunktionen akzeptieren Eingaben vom Typ `string`; diese werden intern in Zahlen oder Daten umgewandelt.
|
|
608
621
|
- Die Locale wird standardmäßig auf Ihre konfigurierte `internationalization.defaultLocale` gesetzt, falls keine Locale angegeben wird.
|
|
609
622
|
- Diese Hilfsfunktionen sind dünne Wrapper; für erweiterte Formatierungen können die Standard-`Intl`-Optionen direkt verwendet werden.
|
|
610
|
-
|
|
611
|
-
## Einstiegspunkte und Re-Exports (`@index.ts`)
|
|
612
|
-
|
|
613
|
-
Die Formatierer befinden sich im Core-Paket und werden aus höherstufigen Paketen erneut exportiert, um Importe über verschiedene Laufzeitumgebungen hinweg ergonomisch zu gestalten:
|
|
614
|
-
|
|
615
|
-
Beispiele:
|
|
616
|
-
|
|
617
|
-
```ts
|
|
618
|
-
// App-Code (empfohlen)
|
|
619
|
-
import {
|
|
620
|
-
number,
|
|
621
|
-
currency,
|
|
622
|
-
date,
|
|
623
|
-
relativeTime,
|
|
624
|
-
units,
|
|
625
|
-
compact,
|
|
626
|
-
list,
|
|
627
|
-
Intl,
|
|
628
|
-
getLocaleName,
|
|
629
|
-
getLocaleLang,
|
|
630
|
-
getLocaleFromPath,
|
|
631
|
-
getPathWithoutLocale,
|
|
632
|
-
getLocalizedUrl,
|
|
633
|
-
getHTMLTextDir,
|
|
634
|
-
getContent,
|
|
635
|
-
getTranslation,
|
|
636
|
-
getIntlayer,
|
|
637
|
-
getIntlayerAsync,
|
|
638
|
-
} from "intlayer";
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
### React
|
|
642
|
-
|
|
643
|
-
Client-Komponenten:
|
|
644
|
-
|
|
645
|
-
```tsx
|
|
646
|
-
import {
|
|
647
|
-
useNumber,
|
|
648
|
-
useCurrency,
|
|
649
|
-
useDate,
|
|
650
|
-
usePercentage,
|
|
651
|
-
useCompact,
|
|
652
|
-
useList,
|
|
653
|
-
useRelativeTime,
|
|
654
|
-
useUnit,
|
|
655
|
-
} from "react-intlayer/format";
|
|
656
|
-
// oder in Next.js-Anwendungen
|
|
657
|
-
import {
|
|
658
|
-
useNumber,
|
|
659
|
-
useCurrency,
|
|
660
|
-
useDate,
|
|
661
|
-
usePercentage,
|
|
662
|
-
useCompact,
|
|
663
|
-
useList,
|
|
664
|
-
useRelativeTime,
|
|
665
|
-
useUnit,
|
|
666
|
-
} from "next-intlayer/client/format";
|
|
667
|
-
|
|
668
|
-
const MyComponent = () => {
|
|
669
|
-
const number = useNumber();
|
|
670
|
-
const currency = useCurrency();
|
|
671
|
-
const date = useDate();
|
|
672
|
-
const percentage = usePercentage();
|
|
673
|
-
const compact = useCompact();
|
|
674
|
-
const list = useList();
|
|
675
|
-
const relativeTime = useRelativeTime();
|
|
676
|
-
const unit = useUnit();
|
|
677
|
-
|
|
678
|
-
return (
|
|
679
|
-
<div>
|
|
680
|
-
<p>{number(123456.789)}</p>
|
|
681
|
-
<p>{currency(1234.5, { currency: "EUR" })}</p>
|
|
682
|
-
<p>{date(new Date(), "short")}</p>
|
|
683
|
-
<p>{percentage(0.25)}</p>
|
|
684
|
-
<p>{compact(1200)}</p>
|
|
685
|
-
<p>{list(["apple", "banana", "orange"])}</p>
|
|
686
|
-
<p>{relativeTime(new Date(), new Date() + 1000)}</p>
|
|
687
|
-
<p>{unit(123456.789, { unit: "kilometer" })}</p>
|
|
688
|
-
</div>
|
|
689
|
-
);
|
|
690
|
-
};
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
Server-Komponenten (oder React Server-Laufzeit):
|
|
694
|
-
|
|
695
|
-
```ts
|
|
696
|
-
import {
|
|
697
|
-
useNumber,
|
|
698
|
-
useCurrency,
|
|
699
|
-
useDate,
|
|
700
|
-
usePercentage,
|
|
701
|
-
useCompact,
|
|
702
|
-
useList,
|
|
703
|
-
useRelativeTime,
|
|
704
|
-
useUnit,
|
|
705
|
-
} from "react-intlayer/server/format";
|
|
706
|
-
// oder in Next.js-Anwendungen
|
|
707
|
-
import {
|
|
708
|
-
useNumber,
|
|
709
|
-
useCurrency,
|
|
710
|
-
useDate,
|
|
711
|
-
usePercentage,
|
|
712
|
-
useCompact,
|
|
713
|
-
useList,
|
|
714
|
-
useRelativeTime,
|
|
715
|
-
useUnit,
|
|
716
|
-
} from "next-intlayer/server/format";
|
|
717
|
-
```
|
|
718
|
-
|
|
719
|
-
> Diese Hooks berücksichtigen die Locale vom `IntlayerProvider` oder `IntlayerServerProvider`
|
|
720
|
-
|
|
721
|
-
### `getIntlayer(dictionaryKey, locale?, plugins?)`
|
|
722
|
-
|
|
723
|
-
Ruft Inhalte aus einem Dictionary ab und transformiert sie:
|
|
724
|
-
|
|
725
|
-
```ts
|
|
726
|
-
import { getIntlayer } from "intlayer";
|
|
727
|
-
|
|
728
|
-
const content = getIntlayer("common", "fr");
|
|
729
|
-
```
|
|
730
|
-
|
|
731
|
-
### Vue
|
|
732
|
-
|
|
733
|
-
Client-Komponenten:
|
|
734
|
-
|
|
735
|
-
```ts
|
|
736
|
-
import {
|
|
737
|
-
useNumber,
|
|
738
|
-
useCurrency,
|
|
739
|
-
useDate,
|
|
740
|
-
usePercentage,
|
|
741
|
-
useCompact,
|
|
742
|
-
useList,
|
|
743
|
-
useRelativeTime,
|
|
744
|
-
useUnit,
|
|
745
|
-
} from "vue-intlayer/format";
|
|
746
|
-
```
|
|
747
|
-
|
|
748
|
-
> Diese Composables berücksichtigen die Locale vom injizierten `IntlayerProvider`
|