@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
|
@@ -32,7 +32,10 @@ try {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Reads a document, preferring the requested locale and falling back to English.
|
|
37
|
+
*/
|
|
38
|
+
const readLocaleFile = async (
|
|
36
39
|
relativeAfterLocale: string,
|
|
37
40
|
locale: LocalesValues
|
|
38
41
|
): Promise<string> => {
|
|
@@ -41,32 +44,61 @@ const readLocale = (
|
|
|
41
44
|
`./frequent_questions/${locale}/${relativeAfterLocale}`
|
|
42
45
|
);
|
|
43
46
|
if (existsSync(target1)) {
|
|
44
|
-
return readFile(target1, 'utf8');
|
|
47
|
+
return await readFile(target1, 'utf8');
|
|
45
48
|
}
|
|
46
49
|
const target2 = join(
|
|
47
50
|
baseDir,
|
|
48
51
|
`./frequent_questions/en/${relativeAfterLocale}`
|
|
49
52
|
);
|
|
50
53
|
if (existsSync(target2)) {
|
|
51
|
-
return readFile(target2, 'utf8');
|
|
54
|
+
return await readFile(target2, 'utf8');
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`
|
|
57
|
-
)
|
|
57
|
+
throw new Error(
|
|
58
|
+
`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`
|
|
58
59
|
);
|
|
59
60
|
};
|
|
60
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Builds a lazy, awaitable handle over a document.
|
|
64
|
+
*
|
|
65
|
+
* The entry map below holds one handle per document *per locale*, so reading
|
|
66
|
+
* eagerly would pull every markdown file of every locale into memory as soon as
|
|
67
|
+
* this module is imported — hundreds of megabytes, duplicated in every
|
|
68
|
+
* prerender worker, for the handful of documents a page actually renders.
|
|
69
|
+
*
|
|
70
|
+
* The returned value is a thenable rather than a promise: consumers only ever
|
|
71
|
+
* `await` it, and `await` triggers `then`, so the file is read on first use and
|
|
72
|
+
* the resulting promise is cached for subsequent reads.
|
|
73
|
+
*/
|
|
74
|
+
const readLocale = (
|
|
75
|
+
relativeAfterLocale: string,
|
|
76
|
+
locale: LocalesValues
|
|
77
|
+
): Promise<string> => {
|
|
78
|
+
let pendingRead: Promise<string> | undefined;
|
|
79
|
+
|
|
80
|
+
const read = (): Promise<string> => {
|
|
81
|
+
pendingRead ??= readLocaleFile(relativeAfterLocale, locale);
|
|
82
|
+
return pendingRead;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
// biome-ignore lint/suspicious/noThenProperty: the thenable is intentional — `await` is what triggers the lazy read.
|
|
87
|
+
then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),
|
|
88
|
+
catch: (onRejected) => read().catch(onRejected),
|
|
89
|
+
finally: (onFinally) => read().finally(onFinally),
|
|
90
|
+
} as Promise<string>;
|
|
91
|
+
};
|
|
92
|
+
|
|
61
93
|
export const frequentQuestionsEntry = {
|
|
62
94
|
'./frequent_questions/en/SSR_Next_no_[locale].md': {
|
|
63
95
|
en: readLocale('SSR_Next_no_[locale].md', 'en'),
|
|
96
|
+
es: readLocale('SSR_Next_no_[locale].md', 'es'),
|
|
64
97
|
ru: readLocale('SSR_Next_no_[locale].md', 'ru'),
|
|
65
98
|
ja: readLocale('SSR_Next_no_[locale].md', 'ja'),
|
|
66
99
|
fr: readLocale('SSR_Next_no_[locale].md', 'fr'),
|
|
67
100
|
ko: readLocale('SSR_Next_no_[locale].md', 'ko'),
|
|
68
101
|
zh: readLocale('SSR_Next_no_[locale].md', 'zh'),
|
|
69
|
-
es: readLocale('SSR_Next_no_[locale].md', 'es'),
|
|
70
102
|
de: readLocale('SSR_Next_no_[locale].md', 'de'),
|
|
71
103
|
ar: readLocale('SSR_Next_no_[locale].md', 'ar'),
|
|
72
104
|
it: readLocale('SSR_Next_no_[locale].md', 'it'),
|
|
@@ -81,12 +113,12 @@ export const frequentQuestionsEntry = {
|
|
|
81
113
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
82
114
|
'./frequent_questions/en/array_as_content_declaration.md': {
|
|
83
115
|
en: readLocale('array_as_content_declaration.md', 'en'),
|
|
116
|
+
es: readLocale('array_as_content_declaration.md', 'es'),
|
|
84
117
|
ru: readLocale('array_as_content_declaration.md', 'ru'),
|
|
85
118
|
ja: readLocale('array_as_content_declaration.md', 'ja'),
|
|
86
119
|
fr: readLocale('array_as_content_declaration.md', 'fr'),
|
|
87
120
|
ko: readLocale('array_as_content_declaration.md', 'ko'),
|
|
88
121
|
zh: readLocale('array_as_content_declaration.md', 'zh'),
|
|
89
|
-
es: readLocale('array_as_content_declaration.md', 'es'),
|
|
90
122
|
de: readLocale('array_as_content_declaration.md', 'de'),
|
|
91
123
|
ar: readLocale('array_as_content_declaration.md', 'ar'),
|
|
92
124
|
it: readLocale('array_as_content_declaration.md', 'it'),
|
|
@@ -101,12 +133,12 @@ export const frequentQuestionsEntry = {
|
|
|
101
133
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
102
134
|
'./frequent_questions/en/build_dictionaries.md': {
|
|
103
135
|
en: readLocale('build_dictionaries.md', 'en'),
|
|
136
|
+
es: readLocale('build_dictionaries.md', 'es'),
|
|
104
137
|
ru: readLocale('build_dictionaries.md', 'ru'),
|
|
105
138
|
ja: readLocale('build_dictionaries.md', 'ja'),
|
|
106
139
|
fr: readLocale('build_dictionaries.md', 'fr'),
|
|
107
140
|
ko: readLocale('build_dictionaries.md', 'ko'),
|
|
108
141
|
zh: readLocale('build_dictionaries.md', 'zh'),
|
|
109
|
-
es: readLocale('build_dictionaries.md', 'es'),
|
|
110
142
|
de: readLocale('build_dictionaries.md', 'de'),
|
|
111
143
|
ar: readLocale('build_dictionaries.md', 'ar'),
|
|
112
144
|
it: readLocale('build_dictionaries.md', 'it'),
|
|
@@ -121,12 +153,12 @@ export const frequentQuestionsEntry = {
|
|
|
121
153
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
122
154
|
'./frequent_questions/en/build_error_CI_CD.md': {
|
|
123
155
|
en: readLocale('build_error_CI_CD.md', 'en'),
|
|
156
|
+
es: readLocale('build_error_CI_CD.md', 'es'),
|
|
124
157
|
ru: readLocale('build_error_CI_CD.md', 'ru'),
|
|
125
158
|
ja: readLocale('build_error_CI_CD.md', 'ja'),
|
|
126
159
|
fr: readLocale('build_error_CI_CD.md', 'fr'),
|
|
127
160
|
ko: readLocale('build_error_CI_CD.md', 'ko'),
|
|
128
161
|
zh: readLocale('build_error_CI_CD.md', 'zh'),
|
|
129
|
-
es: readLocale('build_error_CI_CD.md', 'es'),
|
|
130
162
|
de: readLocale('build_error_CI_CD.md', 'de'),
|
|
131
163
|
ar: readLocale('build_error_CI_CD.md', 'ar'),
|
|
132
164
|
it: readLocale('build_error_CI_CD.md', 'it'),
|
|
@@ -141,12 +173,12 @@ export const frequentQuestionsEntry = {
|
|
|
141
173
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
142
174
|
'./frequent_questions/en/bun_set_up.md': {
|
|
143
175
|
en: readLocale('bun_set_up.md', 'en'),
|
|
176
|
+
es: readLocale('bun_set_up.md', 'es'),
|
|
144
177
|
ru: readLocale('bun_set_up.md', 'ru'),
|
|
145
178
|
ja: readLocale('bun_set_up.md', 'ja'),
|
|
146
179
|
fr: readLocale('bun_set_up.md', 'fr'),
|
|
147
180
|
ko: readLocale('bun_set_up.md', 'ko'),
|
|
148
181
|
zh: readLocale('bun_set_up.md', 'zh'),
|
|
149
|
-
es: readLocale('bun_set_up.md', 'es'),
|
|
150
182
|
de: readLocale('bun_set_up.md', 'de'),
|
|
151
183
|
ar: readLocale('bun_set_up.md', 'ar'),
|
|
152
184
|
it: readLocale('bun_set_up.md', 'it'),
|
|
@@ -161,12 +193,12 @@ export const frequentQuestionsEntry = {
|
|
|
161
193
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
162
194
|
'./frequent_questions/en/customized_locale_list.md': {
|
|
163
195
|
en: readLocale('customized_locale_list.md', 'en'),
|
|
196
|
+
es: readLocale('customized_locale_list.md', 'es'),
|
|
164
197
|
ru: readLocale('customized_locale_list.md', 'ru'),
|
|
165
198
|
ja: readLocale('customized_locale_list.md', 'ja'),
|
|
166
199
|
fr: readLocale('customized_locale_list.md', 'fr'),
|
|
167
200
|
ko: readLocale('customized_locale_list.md', 'ko'),
|
|
168
201
|
zh: readLocale('customized_locale_list.md', 'zh'),
|
|
169
|
-
es: readLocale('customized_locale_list.md', 'es'),
|
|
170
202
|
de: readLocale('customized_locale_list.md', 'de'),
|
|
171
203
|
ar: readLocale('customized_locale_list.md', 'ar'),
|
|
172
204
|
it: readLocale('customized_locale_list.md', 'it'),
|
|
@@ -181,12 +213,12 @@ export const frequentQuestionsEntry = {
|
|
|
181
213
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
182
214
|
'./frequent_questions/en/domain_routing.md': {
|
|
183
215
|
en: readLocale('domain_routing.md', 'en'),
|
|
216
|
+
es: readLocale('domain_routing.md', 'es'),
|
|
184
217
|
ru: readLocale('domain_routing.md', 'ru'),
|
|
185
218
|
ja: readLocale('domain_routing.md', 'ja'),
|
|
186
219
|
fr: readLocale('domain_routing.md', 'fr'),
|
|
187
220
|
ko: readLocale('domain_routing.md', 'ko'),
|
|
188
221
|
zh: readLocale('domain_routing.md', 'zh'),
|
|
189
|
-
es: readLocale('domain_routing.md', 'es'),
|
|
190
222
|
de: readLocale('domain_routing.md', 'de'),
|
|
191
223
|
ar: readLocale('domain_routing.md', 'ar'),
|
|
192
224
|
it: readLocale('domain_routing.md', 'it'),
|
|
@@ -201,12 +233,12 @@ export const frequentQuestionsEntry = {
|
|
|
201
233
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
202
234
|
'./frequent_questions/en/error-vite-env-only.md': {
|
|
203
235
|
en: readLocale('error-vite-env-only.md', 'en'),
|
|
236
|
+
es: readLocale('error-vite-env-only.md', 'es'),
|
|
204
237
|
ru: readLocale('error-vite-env-only.md', 'ru'),
|
|
205
238
|
ja: readLocale('error-vite-env-only.md', 'ja'),
|
|
206
239
|
fr: readLocale('error-vite-env-only.md', 'fr'),
|
|
207
240
|
ko: readLocale('error-vite-env-only.md', 'ko'),
|
|
208
241
|
zh: readLocale('error-vite-env-only.md', 'zh'),
|
|
209
|
-
es: readLocale('error-vite-env-only.md', 'es'),
|
|
210
242
|
de: readLocale('error-vite-env-only.md', 'de'),
|
|
211
243
|
ar: readLocale('error-vite-env-only.md', 'ar'),
|
|
212
244
|
it: readLocale('error-vite-env-only.md', 'it'),
|
|
@@ -221,12 +253,12 @@ export const frequentQuestionsEntry = {
|
|
|
221
253
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
222
254
|
'./frequent_questions/en/esbuild_error.md': {
|
|
223
255
|
en: readLocale('esbuild_error.md', 'en'),
|
|
256
|
+
es: readLocale('esbuild_error.md', 'es'),
|
|
224
257
|
ru: readLocale('esbuild_error.md', 'ru'),
|
|
225
258
|
ja: readLocale('esbuild_error.md', 'ja'),
|
|
226
259
|
fr: readLocale('esbuild_error.md', 'fr'),
|
|
227
260
|
ko: readLocale('esbuild_error.md', 'ko'),
|
|
228
261
|
zh: readLocale('esbuild_error.md', 'zh'),
|
|
229
|
-
es: readLocale('esbuild_error.md', 'es'),
|
|
230
262
|
de: readLocale('esbuild_error.md', 'de'),
|
|
231
263
|
ar: readLocale('esbuild_error.md', 'ar'),
|
|
232
264
|
it: readLocale('esbuild_error.md', 'it'),
|
|
@@ -241,12 +273,12 @@ export const frequentQuestionsEntry = {
|
|
|
241
273
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
242
274
|
'./frequent_questions/en/get_locale_cookie.md': {
|
|
243
275
|
en: readLocale('get_locale_cookie.md', 'en'),
|
|
276
|
+
es: readLocale('get_locale_cookie.md', 'es'),
|
|
244
277
|
ru: readLocale('get_locale_cookie.md', 'ru'),
|
|
245
278
|
ja: readLocale('get_locale_cookie.md', 'ja'),
|
|
246
279
|
fr: readLocale('get_locale_cookie.md', 'fr'),
|
|
247
280
|
ko: readLocale('get_locale_cookie.md', 'ko'),
|
|
248
281
|
zh: readLocale('get_locale_cookie.md', 'zh'),
|
|
249
|
-
es: readLocale('get_locale_cookie.md', 'es'),
|
|
250
282
|
de: readLocale('get_locale_cookie.md', 'de'),
|
|
251
283
|
ar: readLocale('get_locale_cookie.md', 'ar'),
|
|
252
284
|
it: readLocale('get_locale_cookie.md', 'it'),
|
|
@@ -261,12 +293,12 @@ export const frequentQuestionsEntry = {
|
|
|
261
293
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
262
294
|
'./frequent_questions/en/intlayerNode.md': {
|
|
263
295
|
en: readLocale('intlayerNode.md', 'en'),
|
|
296
|
+
es: readLocale('intlayerNode.md', 'es'),
|
|
264
297
|
ru: readLocale('intlayerNode.md', 'ru'),
|
|
265
298
|
ja: readLocale('intlayerNode.md', 'ja'),
|
|
266
299
|
fr: readLocale('intlayerNode.md', 'fr'),
|
|
267
300
|
ko: readLocale('intlayerNode.md', 'ko'),
|
|
268
301
|
zh: readLocale('intlayerNode.md', 'zh'),
|
|
269
|
-
es: readLocale('intlayerNode.md', 'es'),
|
|
270
302
|
de: readLocale('intlayerNode.md', 'de'),
|
|
271
303
|
ar: readLocale('intlayerNode.md', 'ar'),
|
|
272
304
|
it: readLocale('intlayerNode.md', 'it'),
|
|
@@ -281,12 +313,12 @@ export const frequentQuestionsEntry = {
|
|
|
281
313
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
282
314
|
'./frequent_questions/en/intlayer_command_undefined.md': {
|
|
283
315
|
en: readLocale('intlayer_command_undefined.md', 'en'),
|
|
316
|
+
es: readLocale('intlayer_command_undefined.md', 'es'),
|
|
284
317
|
ru: readLocale('intlayer_command_undefined.md', 'ru'),
|
|
285
318
|
ja: readLocale('intlayer_command_undefined.md', 'ja'),
|
|
286
319
|
fr: readLocale('intlayer_command_undefined.md', 'fr'),
|
|
287
320
|
ko: readLocale('intlayer_command_undefined.md', 'ko'),
|
|
288
321
|
zh: readLocale('intlayer_command_undefined.md', 'zh'),
|
|
289
|
-
es: readLocale('intlayer_command_undefined.md', 'es'),
|
|
290
322
|
de: readLocale('intlayer_command_undefined.md', 'de'),
|
|
291
323
|
ar: readLocale('intlayer_command_undefined.md', 'ar'),
|
|
292
324
|
it: readLocale('intlayer_command_undefined.md', 'it'),
|
|
@@ -301,12 +333,12 @@ export const frequentQuestionsEntry = {
|
|
|
301
333
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
302
334
|
'./frequent_questions/en/locale_incorect_in_url.md': {
|
|
303
335
|
en: readLocale('locale_incorect_in_url.md', 'en'),
|
|
336
|
+
es: readLocale('locale_incorect_in_url.md', 'es'),
|
|
304
337
|
ru: readLocale('locale_incorect_in_url.md', 'ru'),
|
|
305
338
|
ja: readLocale('locale_incorect_in_url.md', 'ja'),
|
|
306
339
|
fr: readLocale('locale_incorect_in_url.md', 'fr'),
|
|
307
340
|
ko: readLocale('locale_incorect_in_url.md', 'ko'),
|
|
308
341
|
zh: readLocale('locale_incorect_in_url.md', 'zh'),
|
|
309
|
-
es: readLocale('locale_incorect_in_url.md', 'es'),
|
|
310
342
|
de: readLocale('locale_incorect_in_url.md', 'de'),
|
|
311
343
|
ar: readLocale('locale_incorect_in_url.md', 'ar'),
|
|
312
344
|
it: readLocale('locale_incorect_in_url.md', 'it'),
|
|
@@ -321,12 +353,12 @@ export const frequentQuestionsEntry = {
|
|
|
321
353
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
322
354
|
'./frequent_questions/en/package_version_error.md': {
|
|
323
355
|
en: readLocale('package_version_error.md', 'en'),
|
|
356
|
+
es: readLocale('package_version_error.md', 'es'),
|
|
324
357
|
ru: readLocale('package_version_error.md', 'ru'),
|
|
325
358
|
ja: readLocale('package_version_error.md', 'ja'),
|
|
326
359
|
fr: readLocale('package_version_error.md', 'fr'),
|
|
327
360
|
ko: readLocale('package_version_error.md', 'ko'),
|
|
328
361
|
zh: readLocale('package_version_error.md', 'zh'),
|
|
329
|
-
es: readLocale('package_version_error.md', 'es'),
|
|
330
362
|
de: readLocale('package_version_error.md', 'de'),
|
|
331
363
|
ar: readLocale('package_version_error.md', 'ar'),
|
|
332
364
|
it: readLocale('package_version_error.md', 'it'),
|
|
@@ -341,12 +373,12 @@ export const frequentQuestionsEntry = {
|
|
|
341
373
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
342
374
|
'./frequent_questions/en/static_rendering.md': {
|
|
343
375
|
en: readLocale('static_rendering.md', 'en'),
|
|
376
|
+
es: readLocale('static_rendering.md', 'es'),
|
|
344
377
|
ru: readLocale('static_rendering.md', 'ru'),
|
|
345
378
|
ja: readLocale('static_rendering.md', 'ja'),
|
|
346
379
|
fr: readLocale('static_rendering.md', 'fr'),
|
|
347
380
|
ko: readLocale('static_rendering.md', 'ko'),
|
|
348
381
|
zh: readLocale('static_rendering.md', 'zh'),
|
|
349
|
-
es: readLocale('static_rendering.md', 'es'),
|
|
350
382
|
de: readLocale('static_rendering.md', 'de'),
|
|
351
383
|
ar: readLocale('static_rendering.md', 'ar'),
|
|
352
384
|
it: readLocale('static_rendering.md', 'it'),
|
|
@@ -361,12 +393,12 @@ export const frequentQuestionsEntry = {
|
|
|
361
393
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
362
394
|
'./frequent_questions/en/translated_path_url.md': {
|
|
363
395
|
en: readLocale('translated_path_url.md', 'en'),
|
|
396
|
+
es: readLocale('translated_path_url.md', 'es'),
|
|
364
397
|
ru: readLocale('translated_path_url.md', 'ru'),
|
|
365
398
|
ja: readLocale('translated_path_url.md', 'ja'),
|
|
366
399
|
fr: readLocale('translated_path_url.md', 'fr'),
|
|
367
400
|
ko: readLocale('translated_path_url.md', 'ko'),
|
|
368
401
|
zh: readLocale('translated_path_url.md', 'zh'),
|
|
369
|
-
es: readLocale('translated_path_url.md', 'es'),
|
|
370
402
|
de: readLocale('translated_path_url.md', 'de'),
|
|
371
403
|
ar: readLocale('translated_path_url.md', 'ar'),
|
|
372
404
|
it: readLocale('translated_path_url.md', 'it'),
|
|
@@ -381,12 +413,12 @@ export const frequentQuestionsEntry = {
|
|
|
381
413
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
382
414
|
'./frequent_questions/en/unknown_command.md': {
|
|
383
415
|
en: readLocale('unknown_command.md', 'en'),
|
|
416
|
+
es: readLocale('unknown_command.md', 'es'),
|
|
384
417
|
ru: readLocale('unknown_command.md', 'ru'),
|
|
385
418
|
ja: readLocale('unknown_command.md', 'ja'),
|
|
386
419
|
fr: readLocale('unknown_command.md', 'fr'),
|
|
387
420
|
ko: readLocale('unknown_command.md', 'ko'),
|
|
388
421
|
zh: readLocale('unknown_command.md', 'zh'),
|
|
389
|
-
es: readLocale('unknown_command.md', 'es'),
|
|
390
422
|
de: readLocale('unknown_command.md', 'de'),
|
|
391
423
|
ar: readLocale('unknown_command.md', 'ar'),
|
|
392
424
|
it: readLocale('unknown_command.md', 'it'),
|
|
@@ -32,35 +32,67 @@ try {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Reads a document, preferring the requested locale and falling back to English.
|
|
37
|
+
*/
|
|
38
|
+
const readLocaleFile = async (
|
|
36
39
|
relativeAfterLocale: string,
|
|
37
40
|
locale: LocalesValues
|
|
38
41
|
): Promise<string> => {
|
|
39
42
|
const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);
|
|
40
43
|
if (existsSync(target1)) {
|
|
41
|
-
return readFile(target1, 'utf8');
|
|
44
|
+
return await readFile(target1, 'utf8');
|
|
42
45
|
}
|
|
43
46
|
const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);
|
|
44
47
|
if (existsSync(target2)) {
|
|
45
|
-
return readFile(target2, 'utf8');
|
|
48
|
+
return await readFile(target2, 'utf8');
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`
|
|
51
|
-
)
|
|
51
|
+
throw new Error(
|
|
52
|
+
`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`
|
|
52
53
|
);
|
|
53
54
|
};
|
|
54
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Builds a lazy, awaitable handle over a document.
|
|
58
|
+
*
|
|
59
|
+
* The entry map below holds one handle per document *per locale*, so reading
|
|
60
|
+
* eagerly would pull every markdown file of every locale into memory as soon as
|
|
61
|
+
* this module is imported — hundreds of megabytes, duplicated in every
|
|
62
|
+
* prerender worker, for the handful of documents a page actually renders.
|
|
63
|
+
*
|
|
64
|
+
* The returned value is a thenable rather than a promise: consumers only ever
|
|
65
|
+
* `await` it, and `await` triggers `then`, so the file is read on first use and
|
|
66
|
+
* the resulting promise is cached for subsequent reads.
|
|
67
|
+
*/
|
|
68
|
+
const readLocale = (
|
|
69
|
+
relativeAfterLocale: string,
|
|
70
|
+
locale: LocalesValues
|
|
71
|
+
): Promise<string> => {
|
|
72
|
+
let pendingRead: Promise<string> | undefined;
|
|
73
|
+
|
|
74
|
+
const read = (): Promise<string> => {
|
|
75
|
+
pendingRead ??= readLocaleFile(relativeAfterLocale, locale);
|
|
76
|
+
return pendingRead;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
// biome-ignore lint/suspicious/noThenProperty: the thenable is intentional — `await` is what triggers the lazy read.
|
|
81
|
+
then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),
|
|
82
|
+
catch: (onRejected) => read().catch(onRejected),
|
|
83
|
+
finally: (onFinally) => read().finally(onFinally),
|
|
84
|
+
} as Promise<string>;
|
|
85
|
+
};
|
|
86
|
+
|
|
55
87
|
export const legalEntry = {
|
|
56
88
|
'./legal/en/privacy_notice.md': {
|
|
57
89
|
en: readLocale('privacy_notice.md', 'en'),
|
|
90
|
+
es: readLocale('privacy_notice.md', 'es'),
|
|
58
91
|
ru: readLocale('privacy_notice.md', 'ru'),
|
|
59
92
|
ja: readLocale('privacy_notice.md', 'ja'),
|
|
60
93
|
fr: readLocale('privacy_notice.md', 'fr'),
|
|
61
94
|
ko: readLocale('privacy_notice.md', 'ko'),
|
|
62
95
|
zh: readLocale('privacy_notice.md', 'zh'),
|
|
63
|
-
es: readLocale('privacy_notice.md', 'es'),
|
|
64
96
|
de: readLocale('privacy_notice.md', 'de'),
|
|
65
97
|
ar: readLocale('privacy_notice.md', 'ar'),
|
|
66
98
|
it: readLocale('privacy_notice.md', 'it'),
|
|
@@ -75,12 +107,12 @@ export const legalEntry = {
|
|
|
75
107
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
76
108
|
'./legal/en/terms_of_service.md': {
|
|
77
109
|
en: readLocale('terms_of_service.md', 'en'),
|
|
110
|
+
es: readLocale('terms_of_service.md', 'es'),
|
|
78
111
|
ru: readLocale('terms_of_service.md', 'ru'),
|
|
79
112
|
ja: readLocale('terms_of_service.md', 'ja'),
|
|
80
113
|
fr: readLocale('terms_of_service.md', 'fr'),
|
|
81
114
|
ko: readLocale('terms_of_service.md', 'ko'),
|
|
82
115
|
zh: readLocale('terms_of_service.md', 'zh'),
|
|
83
|
-
es: readLocale('terms_of_service.md', 'es'),
|
|
84
116
|
de: readLocale('terms_of_service.md', 'de'),
|
|
85
117
|
ar: readLocale('terms_of_service.md', 'ar'),
|
|
86
118
|
it: readLocale('terms_of_service.md', 'it'),
|