@intlayer/docs 7.2.2 → 7.3.0-canary.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/README.md +2 -0
- package/blog/ar/compiler_vs_declarative_i18n.md +138 -0
- package/blog/ar/intlayer_with_next-i18next.md +0 -1
- package/blog/ar/intlayer_with_vue-i18n.md +0 -1
- package/blog/de/compiler_vs_declarative_i18n.md +138 -0
- package/blog/de/intlayer_with_next-i18next.md +0 -1
- package/blog/de/intlayer_with_vue-i18n.md +0 -1
- package/blog/en/compiler_vs_declarative_i18n.md +138 -0
- package/blog/en/i18n_using_next-i18next.md +1 -1
- package/blog/en/i18n_using_next-intl.md +1 -1
- package/blog/en/intlayer_with_i18next.md +1 -1
- package/blog/en/intlayer_with_next-i18next.md +1 -2
- package/blog/en/intlayer_with_next-intl.md +1 -1
- package/blog/en/intlayer_with_react-i18next.md +1 -1
- package/blog/en/intlayer_with_react-intl.md +1 -1
- package/blog/en/intlayer_with_vue-i18n.md +1 -2
- package/blog/en-GB/compiler_vs_declarative_i18n.md +138 -0
- package/blog/en-GB/intlayer_with_next-i18next.md +0 -1
- package/blog/en-GB/intlayer_with_vue-i18n.md +0 -1
- package/blog/es/compiler_vs_declarative_i18n.md +138 -0
- package/blog/es/intlayer_with_next-i18next.md +0 -1
- package/blog/es/intlayer_with_vue-i18n.md +0 -1
- package/blog/fr/compiler_vs_declarative_i18n.md +138 -0
- package/blog/fr/intlayer_with_next-i18next.md +0 -1
- package/blog/fr/intlayer_with_vue-i18n.md +0 -1
- package/blog/hi/compiler_vs_declarative_i18n.md +138 -0
- package/blog/hi/intlayer_with_next-i18next.md +0 -1
- package/blog/hi/intlayer_with_vue-i18n.md +0 -1
- package/blog/id/compiler_vs_declarative_i18n.md +138 -0
- package/blog/id/intlayer_with_next-i18next.md +0 -1
- package/blog/id/intlayer_with_vue-i18n.md +0 -1
- package/blog/it/compiler_vs_declarative_i18n.md +138 -0
- package/blog/it/intlayer_with_next-i18next.md +0 -1
- package/blog/it/intlayer_with_vue-i18n.md +0 -1
- package/blog/ja/compiler_vs_declarative_i18n.md +138 -0
- package/blog/ja/intlayer_with_next-i18next.md +0 -1
- package/blog/ja/intlayer_with_vue-i18n.md +0 -1
- package/blog/ko/compiler_vs_declarative_i18n.md +138 -0
- package/blog/ko/intlayer_with_next-i18next.md +0 -1
- package/blog/ko/intlayer_with_vue-i18n.md +0 -1
- package/blog/pl/compiler_vs_declarative_i18n.md +138 -0
- package/blog/pl/intlayer_with_next-i18next.md +0 -1
- package/blog/pl/intlayer_with_vue-i18n.md +0 -1
- package/blog/pt/compiler_vs_declarative_i18n.md +138 -0
- package/blog/pt/intlayer_with_next-i18next.md +0 -1
- package/blog/pt/intlayer_with_vue-i18n.md +0 -1
- package/blog/ru/compiler_vs_declarative_i18n.md +138 -0
- package/blog/ru/intlayer_with_next-i18next.md +0 -1
- package/blog/ru/intlayer_with_vue-i18n.md +0 -1
- package/blog/tr/compiler_vs_declarative_i18n.md +138 -0
- package/blog/tr/intlayer_with_next-i18next.md +0 -1
- package/blog/tr/intlayer_with_vue-i18n.md +0 -1
- package/blog/vi/compiler_vs_declarative_i18n.md +138 -0
- package/blog/vi/intlayer_with_next-i18next.md +0 -1
- package/blog/vi/intlayer_with_vue-i18n.md +0 -1
- package/blog/zh/compiler_vs_declarative_i18n.md +138 -0
- package/blog/zh/intlayer_with_next-i18next.md +0 -1
- package/blog/zh/intlayer_with_vue-i18n.md +0 -1
- package/dist/cjs/generated/blog.entry.cjs +19 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +323 -19
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +19 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +323 -19
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +17 -1
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/cli/build.md +64 -0
- package/docs/ar/cli/configuration.md +63 -0
- package/docs/ar/cli/debug.md +46 -0
- package/docs/ar/cli/doc-review.md +43 -0
- package/docs/ar/cli/doc-translate.md +132 -0
- package/docs/ar/cli/editor.md +28 -0
- package/docs/ar/cli/fill.md +130 -0
- package/docs/ar/cli/index.md +163 -0
- package/docs/ar/cli/list.md +53 -0
- package/docs/ar/cli/live.md +41 -0
- package/docs/ar/cli/pull.md +78 -0
- package/docs/ar/cli/push.md +98 -0
- package/docs/ar/cli/sdk.md +67 -0
- package/docs/ar/cli/test.md +76 -0
- package/docs/ar/cli/transform.md +65 -0
- package/docs/ar/cli/version.md +24 -0
- package/docs/ar/cli/watch.md +37 -0
- package/docs/ar/intlayer_with_svelte_kit.md +3 -2
- package/docs/ar/packages/intlayer/getPrefix.md +210 -0
- package/docs/de/cli/build.md +64 -0
- package/docs/de/cli/configuration.md +63 -0
- package/docs/de/cli/debug.md +46 -0
- package/docs/de/cli/doc-review.md +43 -0
- package/docs/de/cli/doc-translate.md +132 -0
- package/docs/de/cli/editor.md +28 -0
- package/docs/de/cli/fill.md +130 -0
- package/docs/de/cli/index.md +163 -0
- package/docs/de/cli/list.md +53 -0
- package/docs/de/cli/live.md +41 -0
- package/docs/de/cli/pull.md +78 -0
- package/docs/de/cli/push.md +98 -0
- package/docs/de/cli/sdk.md +67 -0
- package/docs/de/cli/test.md +76 -0
- package/docs/de/cli/transform.md +65 -0
- package/docs/de/cli/version.md +24 -0
- package/docs/de/cli/watch.md +37 -0
- package/docs/de/intlayer_with_svelte_kit.md +3 -2
- package/docs/de/packages/intlayer/getPrefix.md +213 -0
- package/docs/en/CI_CD.md +2 -2
- package/docs/en/autoFill.md +24 -2
- package/docs/en/cli/build.md +64 -0
- package/docs/en/cli/configuration.md +63 -0
- package/docs/en/cli/debug.md +46 -0
- package/docs/en/cli/doc-review.md +43 -0
- package/docs/en/cli/doc-translate.md +132 -0
- package/docs/en/cli/editor.md +28 -0
- package/docs/en/cli/fill.md +130 -0
- package/docs/en/cli/index.md +163 -0
- package/docs/en/cli/list.md +53 -0
- package/docs/en/cli/live.md +41 -0
- package/docs/en/cli/pull.md +78 -0
- package/docs/en/cli/push.md +98 -0
- package/docs/en/cli/sdk.md +67 -0
- package/docs/en/cli/test.md +76 -0
- package/docs/en/cli/transform.md +65 -0
- package/docs/en/cli/version.md +24 -0
- package/docs/en/cli/watch.md +37 -0
- package/docs/en/dictionary/condition.md +1 -1
- package/docs/en/dictionary/enumeration.md +1 -1
- package/docs/en/dictionary/file.md +1 -1
- package/docs/en/dictionary/gender.md +1 -1
- package/docs/en/dictionary/insertion.md +1 -1
- package/docs/en/dictionary/markdown.md +1 -1
- package/docs/en/dictionary/nesting.md +1 -1
- package/docs/en/index.md +1 -1
- package/docs/en/intlayer_with_angular.md +1 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_create_react_app.md +1 -1
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_next-i18next.md +1 -1
- package/docs/en/intlayer_with_next-intl.md +1 -1
- package/docs/en/intlayer_with_nextjs_14.md +1 -1
- package/docs/en/intlayer_with_nextjs_15.md +1 -1
- package/docs/en/intlayer_with_nextjs_16.md +1 -1
- package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en/intlayer_with_nuxt.md +1 -1
- package/docs/en/intlayer_with_react_native+expo.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +1 -1
- package/docs/en/intlayer_with_svelte_kit.md +3 -2
- package/docs/en/intlayer_with_tanstack.md +1 -1
- package/docs/en/intlayer_with_vite+preact.md +1 -1
- package/docs/en/intlayer_with_vite+react.md +1 -1
- package/docs/en/intlayer_with_vite+solid.md +1 -1
- package/docs/en/intlayer_with_vite+svelte.md +1 -1
- package/docs/en/intlayer_with_vite+vue.md +1 -1
- package/docs/en/introduction.md +1 -1
- package/docs/en/mcp_server.md +1 -2
- package/docs/en/per_locale_file.md +1 -1
- package/docs/en/plugins/sync-json.md +1 -1
- package/docs/en/releases/v6.md +2 -2
- package/docs/en/roadmap.md +1 -1
- package/docs/en-GB/cli/build.md +64 -0
- package/docs/en-GB/cli/configuration.md +63 -0
- package/docs/en-GB/cli/debug.md +46 -0
- package/docs/en-GB/cli/doc-review.md +43 -0
- package/docs/en-GB/cli/doc-translate.md +132 -0
- package/docs/en-GB/cli/editor.md +28 -0
- package/docs/en-GB/cli/fill.md +130 -0
- package/docs/en-GB/cli/index.md +163 -0
- package/docs/en-GB/cli/list.md +53 -0
- package/docs/en-GB/cli/live.md +41 -0
- package/docs/en-GB/cli/pull.md +78 -0
- package/docs/en-GB/cli/push.md +98 -0
- package/docs/en-GB/cli/sdk.md +67 -0
- package/docs/en-GB/cli/test.md +100 -0
- package/docs/en-GB/cli/transform.md +65 -0
- package/docs/en-GB/cli/version.md +24 -0
- package/docs/en-GB/cli/watch.md +37 -0
- package/docs/en-GB/dictionary/condition.md +1 -1
- package/docs/en-GB/dictionary/markdown.md +1 -1
- package/docs/en-GB/dictionary/nesting.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
- package/docs/en-GB/intlayer_with_svelte_kit.md +3 -2
- package/docs/en-GB/packages/intlayer/getPrefix.md +213 -0
- package/docs/es/cli/build.md +64 -0
- package/docs/es/cli/configuration.md +63 -0
- package/docs/es/cli/debug.md +46 -0
- package/docs/es/cli/doc-review.md +43 -0
- package/docs/es/cli/doc-translate.md +132 -0
- package/docs/es/cli/editor.md +28 -0
- package/docs/es/cli/fill.md +130 -0
- package/docs/es/cli/index.md +163 -0
- package/docs/es/cli/list.md +53 -0
- package/docs/es/cli/live.md +41 -0
- package/docs/es/cli/pull.md +78 -0
- package/docs/es/cli/push.md +98 -0
- package/docs/es/cli/sdk.md +67 -0
- package/docs/es/cli/test.md +76 -0
- package/docs/es/cli/transform.md +65 -0
- package/docs/es/cli/version.md +24 -0
- package/docs/es/cli/watch.md +37 -0
- package/docs/es/intlayer_with_svelte_kit.md +3 -2
- package/docs/es/packages/intlayer/getPrefix.md +213 -0
- package/docs/fr/cli/build.md +64 -0
- package/docs/fr/cli/configuration.md +63 -0
- package/docs/fr/cli/debug.md +46 -0
- package/docs/fr/cli/doc-review.md +43 -0
- package/docs/fr/cli/doc-translate.md +132 -0
- package/docs/fr/cli/editor.md +28 -0
- package/docs/fr/cli/fill.md +130 -0
- package/docs/fr/cli/index.md +163 -0
- package/docs/fr/cli/list.md +53 -0
- package/docs/fr/cli/live.md +41 -0
- package/docs/fr/cli/pull.md +78 -0
- package/docs/fr/cli/push.md +98 -0
- package/docs/fr/cli/sdk.md +67 -0
- package/docs/fr/cli/test.md +76 -0
- package/docs/fr/cli/transform.md +65 -0
- package/docs/fr/cli/version.md +24 -0
- package/docs/fr/cli/watch.md +37 -0
- package/docs/fr/intlayer_with_svelte_kit.md +3 -2
- package/docs/fr/packages/intlayer/getPrefix.md +213 -0
- package/docs/hi/cli/build.md +64 -0
- package/docs/hi/cli/configuration.md +63 -0
- package/docs/hi/cli/debug.md +46 -0
- package/docs/hi/cli/doc-review.md +43 -0
- package/docs/hi/cli/doc-translate.md +132 -0
- package/docs/hi/cli/editor.md +28 -0
- package/docs/hi/cli/fill.md +130 -0
- package/docs/hi/cli/index.md +163 -0
- package/docs/hi/cli/list.md +53 -0
- package/docs/hi/cli/live.md +41 -0
- package/docs/hi/cli/pull.md +78 -0
- package/docs/hi/cli/push.md +98 -0
- package/docs/hi/cli/sdk.md +67 -0
- package/docs/hi/cli/test.md +76 -0
- package/docs/hi/cli/transform.md +65 -0
- package/docs/hi/cli/version.md +24 -0
- package/docs/hi/cli/watch.md +37 -0
- package/docs/hi/intlayer_with_svelte_kit.md +3 -2
- package/docs/hi/intlayer_with_tanstack.md +1 -1
- package/docs/hi/intlayer_with_vite+solid.md +1 -1
- package/docs/hi/packages/intlayer/getPrefix.md +217 -0
- package/docs/id/cli/build.md +64 -0
- package/docs/id/cli/configuration.md +62 -0
- package/docs/id/cli/debug.md +46 -0
- package/docs/id/cli/doc-review.md +43 -0
- package/docs/id/cli/doc-translate.md +132 -0
- package/docs/id/cli/editor.md +28 -0
- package/docs/id/cli/fill.md +130 -0
- package/docs/id/cli/index.md +163 -0
- package/docs/id/cli/list.md +53 -0
- package/docs/id/cli/live.md +41 -0
- package/docs/id/cli/pull.md +78 -0
- package/docs/id/cli/push.md +98 -0
- package/docs/id/cli/sdk.md +67 -0
- package/docs/id/cli/test.md +76 -0
- package/docs/id/cli/transform.md +65 -0
- package/docs/id/cli/version.md +24 -0
- package/docs/id/cli/watch.md +37 -0
- package/docs/id/intlayer_with_svelte_kit.md +3 -2
- package/docs/id/packages/intlayer/getPrefix.md +210 -0
- package/docs/it/cli/build.md +64 -0
- package/docs/it/cli/configuration.md +63 -0
- package/docs/it/cli/debug.md +46 -0
- package/docs/it/cli/doc-review.md +43 -0
- package/docs/it/cli/doc-translate.md +132 -0
- package/docs/it/cli/editor.md +28 -0
- package/docs/it/cli/fill.md +130 -0
- package/docs/it/cli/index.md +158 -0
- package/docs/it/cli/list.md +53 -0
- package/docs/it/cli/live.md +41 -0
- package/docs/it/cli/pull.md +78 -0
- package/docs/it/cli/push.md +98 -0
- package/docs/it/cli/sdk.md +67 -0
- package/docs/it/cli/test.md +76 -0
- package/docs/it/cli/transform.md +65 -0
- package/docs/it/cli/version.md +24 -0
- package/docs/it/cli/watch.md +39 -0
- package/docs/it/intlayer_with_svelte_kit.md +3 -2
- package/docs/it/packages/intlayer/getPrefix.md +211 -0
- package/docs/ja/cli/build.md +78 -0
- package/docs/ja/cli/configuration.md +63 -0
- package/docs/ja/cli/debug.md +46 -0
- package/docs/ja/cli/doc-review.md +43 -0
- package/docs/ja/cli/doc-translate.md +132 -0
- package/docs/ja/cli/editor.md +28 -0
- package/docs/ja/cli/fill.md +130 -0
- package/docs/ja/cli/index.md +163 -0
- package/docs/ja/cli/list.md +53 -0
- package/docs/ja/cli/live.md +41 -0
- package/docs/ja/cli/pull.md +78 -0
- package/docs/ja/cli/push.md +113 -0
- package/docs/ja/cli/sdk.md +67 -0
- package/docs/ja/cli/test.md +76 -0
- package/docs/ja/cli/transform.md +65 -0
- package/docs/ja/cli/version.md +24 -0
- package/docs/ja/cli/watch.md +37 -0
- package/docs/ja/intlayer_with_svelte_kit.md +3 -2
- package/docs/ja/packages/intlayer/getPrefix.md +212 -0
- package/docs/ko/cli/build.md +64 -0
- package/docs/ko/cli/configuration.md +63 -0
- package/docs/ko/cli/debug.md +46 -0
- package/docs/ko/cli/doc-review.md +43 -0
- package/docs/ko/cli/doc-translate.md +132 -0
- package/docs/ko/cli/editor.md +28 -0
- package/docs/ko/cli/fill.md +130 -0
- package/docs/ko/cli/index.md +163 -0
- package/docs/ko/cli/list.md +53 -0
- package/docs/ko/cli/live.md +41 -0
- package/docs/ko/cli/pull.md +78 -0
- package/docs/ko/cli/push.md +113 -0
- package/docs/ko/cli/sdk.md +67 -0
- package/docs/ko/cli/test.md +76 -0
- package/docs/ko/cli/transform.md +65 -0
- package/docs/ko/cli/version.md +24 -0
- package/docs/ko/cli/watch.md +37 -0
- package/docs/ko/intlayer_with_svelte_kit.md +3 -2
- package/docs/ko/packages/intlayer/getPrefix.md +213 -0
- package/docs/pl/cli/build.md +64 -0
- package/docs/pl/cli/configuration.md +63 -0
- package/docs/pl/cli/debug.md +46 -0
- package/docs/pl/cli/doc-review.md +43 -0
- package/docs/pl/cli/doc-translate.md +132 -0
- package/docs/pl/cli/editor.md +28 -0
- package/docs/pl/cli/fill.md +130 -0
- package/docs/pl/cli/index.md +163 -0
- package/docs/pl/cli/list.md +53 -0
- package/docs/pl/cli/live.md +41 -0
- package/docs/pl/cli/pull.md +78 -0
- package/docs/pl/cli/push.md +98 -0
- package/docs/pl/cli/sdk.md +67 -0
- package/docs/pl/cli/test.md +76 -0
- package/docs/pl/cli/transform.md +65 -0
- package/docs/pl/cli/version.md +24 -0
- package/docs/pl/cli/watch.md +39 -0
- package/docs/pl/intlayer_with_svelte_kit.md +3 -2
- package/docs/pl/packages/intlayer/getPrefix.md +217 -0
- package/docs/pt/cli/build.md +64 -0
- package/docs/pt/cli/configuration.md +63 -0
- package/docs/pt/cli/debug.md +46 -0
- package/docs/pt/cli/doc-review.md +43 -0
- package/docs/pt/cli/doc-translate.md +132 -0
- package/docs/pt/cli/editor.md +28 -0
- package/docs/pt/cli/fill.md +130 -0
- package/docs/pt/cli/index.md +163 -0
- package/docs/pt/cli/list.md +53 -0
- package/docs/pt/cli/live.md +41 -0
- package/docs/pt/cli/pull.md +78 -0
- package/docs/pt/cli/push.md +98 -0
- package/docs/pt/cli/sdk.md +67 -0
- package/docs/pt/cli/test.md +76 -0
- package/docs/pt/cli/transform.md +65 -0
- package/docs/pt/cli/version.md +24 -0
- package/docs/pt/cli/watch.md +39 -0
- package/docs/pt/intlayer_with_svelte_kit.md +3 -2
- package/docs/pt/packages/intlayer/getPrefix.md +217 -0
- package/docs/ru/cli/build.md +64 -0
- package/docs/ru/cli/configuration.md +63 -0
- package/docs/ru/cli/debug.md +46 -0
- package/docs/ru/cli/doc-review.md +43 -0
- package/docs/ru/cli/doc-translate.md +132 -0
- package/docs/ru/cli/editor.md +28 -0
- package/docs/ru/cli/fill.md +130 -0
- package/docs/ru/cli/index.md +163 -0
- package/docs/ru/cli/list.md +53 -0
- package/docs/ru/cli/live.md +41 -0
- package/docs/ru/cli/pull.md +78 -0
- package/docs/ru/cli/push.md +98 -0
- package/docs/ru/cli/sdk.md +67 -0
- package/docs/ru/cli/test.md +76 -0
- package/docs/ru/cli/transform.md +65 -0
- package/docs/ru/cli/version.md +24 -0
- package/docs/ru/cli/watch.md +39 -0
- package/docs/ru/intlayer_with_svelte_kit.md +3 -2
- package/docs/ru/packages/intlayer/getPrefix.md +213 -0
- package/docs/tr/CI_CD.md +2 -2
- package/docs/tr/cli/build.md +64 -0
- package/docs/tr/cli/configuration.md +63 -0
- package/docs/tr/cli/debug.md +46 -0
- package/docs/tr/cli/doc-review.md +43 -0
- package/docs/tr/cli/doc-translate.md +132 -0
- package/docs/tr/cli/editor.md +28 -0
- package/docs/tr/cli/fill.md +130 -0
- package/docs/tr/cli/index.md +163 -0
- package/docs/tr/cli/list.md +53 -0
- package/docs/tr/cli/live.md +41 -0
- package/docs/tr/cli/pull.md +78 -0
- package/docs/tr/cli/push.md +98 -0
- package/docs/tr/cli/sdk.md +67 -0
- package/docs/tr/cli/test.md +76 -0
- package/docs/tr/cli/transform.md +65 -0
- package/docs/tr/cli/version.md +24 -0
- package/docs/tr/cli/watch.md +39 -0
- package/docs/tr/dictionary/condition.md +1 -1
- package/docs/tr/dictionary/enumeration.md +1 -1
- package/docs/tr/dictionary/file.md +1 -1
- package/docs/tr/dictionary/gender.md +1 -1
- package/docs/tr/dictionary/insertion.md +1 -1
- package/docs/tr/dictionary/markdown.md +1 -1
- package/docs/tr/dictionary/nesting.md +1 -1
- package/docs/tr/index.md +1 -1
- package/docs/tr/intlayer_with_angular.md +1 -1
- package/docs/tr/intlayer_with_create_react_app.md +1 -1
- package/docs/tr/intlayer_with_lynx+react.md +1 -1
- package/docs/tr/intlayer_with_nextjs_15.md +1 -1
- package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/tr/intlayer_with_nuxt.md +1 -1
- package/docs/tr/intlayer_with_react_native+expo.md +1 -1
- package/docs/tr/intlayer_with_svelte_kit.md +3 -2
- package/docs/tr/intlayer_with_vite+preact.md +1 -1
- package/docs/tr/intlayer_with_vite+react.md +1 -1
- package/docs/tr/intlayer_with_vite+solid.md +1 -1
- package/docs/tr/intlayer_with_vite+vue.md +1 -1
- package/docs/tr/introduction.md +1 -1
- package/docs/tr/mcp_server.md +1 -1
- package/docs/tr/packages/intlayer/getPrefix.md +213 -0
- package/docs/tr/per_locale_file.md +1 -1
- package/docs/tr/roadmap.md +1 -1
- package/docs/vi/cli/build.md +64 -0
- package/docs/vi/cli/configuration.md +63 -0
- package/docs/vi/cli/debug.md +46 -0
- package/docs/vi/cli/doc-review.md +43 -0
- package/docs/vi/cli/doc-translate.md +132 -0
- package/docs/vi/cli/editor.md +28 -0
- package/docs/vi/cli/fill.md +130 -0
- package/docs/vi/cli/index.md +163 -0
- package/docs/vi/cli/list.md +53 -0
- package/docs/vi/cli/live.md +41 -0
- package/docs/vi/cli/pull.md +78 -0
- package/docs/vi/cli/push.md +98 -0
- package/docs/vi/cli/sdk.md +67 -0
- package/docs/vi/cli/test.md +76 -0
- package/docs/vi/cli/transform.md +65 -0
- package/docs/vi/cli/version.md +24 -0
- package/docs/vi/cli/watch.md +37 -0
- package/docs/vi/intlayer_with_svelte_kit.md +3 -2
- package/docs/vi/packages/intlayer/getPrefix.md +213 -0
- package/docs/zh/cli/build.md +64 -0
- package/docs/zh/cli/configuration.md +63 -0
- package/docs/zh/cli/debug.md +46 -0
- package/docs/zh/cli/doc-review.md +43 -0
- package/docs/zh/cli/doc-translate.md +132 -0
- package/docs/zh/cli/editor.md +28 -0
- package/docs/zh/cli/fill.md +130 -0
- package/docs/zh/cli/index.md +168 -0
- package/docs/zh/cli/list.md +53 -0
- package/docs/zh/cli/live.md +41 -0
- package/docs/zh/cli/pull.md +78 -0
- package/docs/zh/cli/push.md +113 -0
- package/docs/zh/cli/sdk.md +67 -0
- package/docs/zh/cli/test.md +76 -0
- package/docs/zh/cli/transform.md +65 -0
- package/docs/zh/cli/version.md +24 -0
- package/docs/zh/cli/watch.md +37 -0
- package/docs/zh/intlayer_with_svelte_kit.md +3 -2
- package/docs/zh/packages/intlayer/getPrefix.md +213 -0
- package/package.json +7 -7
- package/src/generated/blog.entry.ts +19 -0
- package/src/generated/docs.entry.ts +323 -19
- package/docs/ar/intlayer_cli.md +0 -578
- package/docs/de/intlayer_cli.md +0 -579
- package/docs/en/intlayer_cli.md +0 -857
- package/docs/en-GB/intlayer_cli.md +0 -579
- package/docs/es/intlayer_cli.md +0 -578
- package/docs/fr/intlayer_cli.md +0 -578
- package/docs/hi/intlayer_cli.md +0 -580
- package/docs/id/intlayer_cli.md +0 -850
- package/docs/it/intlayer_cli.md +0 -574
- package/docs/ja/intlayer_cli.md +0 -580
- package/docs/ko/intlayer_cli.md +0 -578
- package/docs/pl/intlayer_cli.md +0 -857
- package/docs/pt/intlayer_cli.md +0 -579
- package/docs/ru/intlayer_cli.md +0 -849
- package/docs/tr/intlayer_cli.md +0 -578
- package/docs/vi/intlayer_cli.md +0 -850
- package/docs/zh/intlayer_cli.md +0 -577
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: Push Dizionari
|
|
5
|
+
description: Scopri come inviare i tuoi dizionari all'editor e CMS di Intlayer.
|
|
6
|
+
keywords:
|
|
7
|
+
- Push
|
|
8
|
+
- Dizionari
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Editor
|
|
12
|
+
- CMS
|
|
13
|
+
slugs:
|
|
14
|
+
- doc
|
|
15
|
+
- concept
|
|
16
|
+
- cli
|
|
17
|
+
- push
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Push Dizionari
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx intlayer dictionary push
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Se l'[editor di Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_visual_editor.md) è installato, puoi anche inviare i dizionari all'editor. Questo comando permette di rendere i dizionari disponibili all'[editor](https://intlayer.org/dashboard). In questo modo, puoi condividere i tuoi dizionari con il tuo team e modificare i contenuti senza dover modificare il codice della tua applicazione.
|
|
27
|
+
|
|
28
|
+
## Alias:
|
|
29
|
+
|
|
30
|
+
- `npx intlayer dictionaries push`
|
|
31
|
+
- `npx intlayer dictionary push`
|
|
32
|
+
- `npx intlayer dic push`
|
|
33
|
+
|
|
34
|
+
## Argomenti:
|
|
35
|
+
|
|
36
|
+
**Opzioni del dizionario:**
|
|
37
|
+
|
|
38
|
+
- **`-d`, `--dictionaries`**: ID dei dizionari da inviare. Se non specificato, verranno inviati tutti i dizionari.
|
|
39
|
+
|
|
40
|
+
> Esempio: `npx intlayer dictionary push -d my-dictionary-id my-other-dictionary-id`
|
|
41
|
+
|
|
42
|
+
- **`--dictionary`**: ID dei dizionari da inviare (alias di --dictionaries).
|
|
43
|
+
|
|
44
|
+
> Esempio: `npx intlayer dictionary push --dictionary my-dictionary-id my-other-dictionary-id`
|
|
45
|
+
|
|
46
|
+
**Opzioni di configurazione:**
|
|
47
|
+
|
|
48
|
+
- **`--base-dir`**: Specifica la directory base del progetto. Per recuperare la configurazione di intlayer, il comando cercherà il file `intlayer.config.{ts,js,json,cjs,mjs}` nella directory base.
|
|
49
|
+
|
|
50
|
+
> Esempio: `npx intlayer dictionary push --env-file .env.production.local`
|
|
51
|
+
|
|
52
|
+
- **`--no-cache`**: Disabilita la cache.
|
|
53
|
+
|
|
54
|
+
> Esempio: `npx intlayer build --no-cache`
|
|
55
|
+
|
|
56
|
+
**Opzioni per le variabili d'ambiente:**
|
|
57
|
+
|
|
58
|
+
- **`--env`**: Specifica l'ambiente (es. `development`, `production`). Utile nel caso in cui si utilizzino variabili d'ambiente nel file di configurazione di intlayer.
|
|
59
|
+
- **`--env-file`**: Fornisce un file di ambiente personalizzato da cui caricare le variabili. Utile nel caso in cui si utilizzino variabili d'ambiente nel file di configurazione di intlayer.
|
|
60
|
+
|
|
61
|
+
> Esempio: `npx intlayer dictionary push --env-file .env.production.local`
|
|
62
|
+
|
|
63
|
+
> Esempio: `npx intlayer dictionary push --env production`
|
|
64
|
+
|
|
65
|
+
**Opzioni di output:**
|
|
66
|
+
|
|
67
|
+
- **`-r`, `--delete-locale-dictionary`**: Salta la domanda che chiede di eliminare le directory delle localizzazioni una volta che i dizionari sono stati inviati, e le rimuove. Per impostazione predefinita, se il dizionario è definito localmente, sovrascriverà il contenuto dei dizionari remoti.
|
|
68
|
+
|
|
69
|
+
> Esempio: `npx intlayer dictionary push -r`
|
|
70
|
+
|
|
71
|
+
> Esempio: `npx intlayer dictionary push --delete-locale-dictionary`
|
|
72
|
+
|
|
73
|
+
- **`-k`, `--keep-locale-dictionary`**: Salta la domanda che chiede di eliminare le directory delle localizzazioni una volta che i dizionari sono stati inviati, e le mantiene. Per impostazione predefinita, se il dizionario è definito localmente, sovrascriverà il contenuto dei dizionari remoti.
|
|
74
|
+
|
|
75
|
+
> Esempio: `npx intlayer dictionary push -k`
|
|
76
|
+
|
|
77
|
+
> Esempio: `npx intlayer dictionary push --keep-locale-dictionary`
|
|
78
|
+
|
|
79
|
+
**Opzioni di preparazione:**
|
|
80
|
+
|
|
81
|
+
- **`--build`**: Costruisce i dizionari prima di inviarli per assicurarsi che il contenuto sia aggiornato. True forza la build, false la salta, undefined permette di usare la cache della build.
|
|
82
|
+
|
|
83
|
+
**Opzioni di log:**
|
|
84
|
+
|
|
85
|
+
- **`--verbose`**: Abilita il logging dettagliato per il debug. (default a true usando la CLI)
|
|
86
|
+
|
|
87
|
+
**Opzioni Git:**
|
|
88
|
+
|
|
89
|
+
- **`--git-diff`**: Esegue solo sui dizionari che includono modifiche dalla base (default `origin/main`) al ramo corrente (default: `HEAD`).
|
|
90
|
+
- **`--git-diff-base`**: Specifica il riferimento base per il git diff (default `origin/main`).
|
|
91
|
+
- **`--git-diff-current`**: Specifica il riferimento corrente per il git diff (default: `HEAD`).
|
|
92
|
+
- **`--uncommitted`**: Include le modifiche non committate.
|
|
93
|
+
- **`--unpushed`**: Include le modifiche non pushate.
|
|
94
|
+
- **`--untracked`**: Include i file non tracciati.
|
|
95
|
+
|
|
96
|
+
> Esempio: `npx intlayer dictionary push --git-diff --git-diff-base origin/main --git-diff-current HEAD`
|
|
97
|
+
|
|
98
|
+
> Esempio: `npx intlayer dictionary push --uncommitted --unpushed --untracked`
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: SDK CLI
|
|
5
|
+
description: Scopri come utilizzare l'SDK CLI di Intlayer nel tuo codice.
|
|
6
|
+
keywords:
|
|
7
|
+
- SDK
|
|
8
|
+
- CLI
|
|
9
|
+
- Intlayer
|
|
10
|
+
- Programmatico
|
|
11
|
+
slugs:
|
|
12
|
+
- doc
|
|
13
|
+
- concept
|
|
14
|
+
- cli
|
|
15
|
+
- sdk
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# SDK CLI
|
|
19
|
+
|
|
20
|
+
L'SDK CLI è una libreria che ti permette di utilizzare la CLI di Intlayer nel tuo codice.
|
|
21
|
+
|
|
22
|
+
```bash packageManager="npm"
|
|
23
|
+
npm install @intlayer/cli --save-dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash packageManager="yarn"
|
|
27
|
+
yarn add @intlayer/cli --save-dev
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```bash packageManager="pnpm"
|
|
31
|
+
pnpm add @intlayer/cli --save-dev
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Esempio di utilizzo:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import {
|
|
38
|
+
push,
|
|
39
|
+
pull,
|
|
40
|
+
fill,
|
|
41
|
+
build,
|
|
42
|
+
listContentDeclaration,
|
|
43
|
+
testMissingTranslations,
|
|
44
|
+
docTranslate,
|
|
45
|
+
docReview,
|
|
46
|
+
transform,
|
|
47
|
+
} from "@intlayer/cli";
|
|
48
|
+
|
|
49
|
+
push();
|
|
50
|
+
// ...
|
|
51
|
+
pull();
|
|
52
|
+
// ...
|
|
53
|
+
fill();
|
|
54
|
+
// ...
|
|
55
|
+
build();
|
|
56
|
+
// ...
|
|
57
|
+
listContentDeclaration();
|
|
58
|
+
// ...
|
|
59
|
+
testMissingTranslations();
|
|
60
|
+
// ...
|
|
61
|
+
docTranslate();
|
|
62
|
+
// ...
|
|
63
|
+
docReview();
|
|
64
|
+
// ...
|
|
65
|
+
transform();
|
|
66
|
+
// ...
|
|
67
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: Test delle traduzioni mancanti
|
|
5
|
+
description: Scopri come testare e identificare le traduzioni mancanti nei tuoi dizionari.
|
|
6
|
+
keywords:
|
|
7
|
+
- Test
|
|
8
|
+
- Traduzioni Mancanti
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
slugs:
|
|
12
|
+
- doc
|
|
13
|
+
- concept
|
|
14
|
+
- cli
|
|
15
|
+
- test
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Test delle traduzioni mancanti
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx intlayer content test
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Alias:
|
|
25
|
+
|
|
26
|
+
- `npx intlayer test`
|
|
27
|
+
|
|
28
|
+
Questo comando analizza i tuoi file di dichiarazione dei contenuti per identificare le traduzioni mancanti in tutte le localizzazioni configurate. Fornisce un report completo che mostra quali chiavi di traduzione mancano per quali localizzazioni, aiutandoti a mantenere la coerenza nei tuoi contenuti multilingue.
|
|
29
|
+
|
|
30
|
+
## Esempio di output:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm intlayer content test
|
|
34
|
+
Traduzioni mancanti:
|
|
35
|
+
- home-page - tr - src/components/HomePage/homePage.content.ts
|
|
36
|
+
- server-component - es, tr - src/components/ServerComponent/serverComponent.content.ts
|
|
37
|
+
- client-component - pl, tr - src/components/ClientComponent/clientComponent.content.ts
|
|
38
|
+
Locali: en, ru, ja, fr, ko, zh, es, de, ar, it, en-GB, pt, hi, tr, pl
|
|
39
|
+
Locali richieste: en
|
|
40
|
+
Locali mancanti: pl, tr, es
|
|
41
|
+
Locali richieste mancanti: -
|
|
42
|
+
Totale locali mancanti: 3
|
|
43
|
+
Totale locali richieste mancanti: 0
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Argomenti:
|
|
47
|
+
|
|
48
|
+
**Opzioni di configurazione:**
|
|
49
|
+
|
|
50
|
+
- **`--env`**: Specifica l'ambiente (es. `development`, `production`).
|
|
51
|
+
- **`--env-file [envFile]`**: Fornisce un file ambiente personalizzato da cui caricare le variabili.
|
|
52
|
+
- **`--base-dir`**: Specifica la directory base per il progetto.
|
|
53
|
+
|
|
54
|
+
> Esempio: `npx intlayer content test --base-dir ./src --env-file .env.production.local`
|
|
55
|
+
|
|
56
|
+
- **`--no-cache`**: Disabilita la cache.
|
|
57
|
+
|
|
58
|
+
> Esempio: `npx intlayer build --no-cache`
|
|
59
|
+
|
|
60
|
+
**Opzioni di preparazione:**
|
|
61
|
+
|
|
62
|
+
- **`--build`**: Costruisce i dizionari prima del push per assicurarsi che il contenuto sia aggiornato. True forza la build, false la salta, undefined permette di usare la cache della build.
|
|
63
|
+
|
|
64
|
+
**Opzioni di log:**
|
|
65
|
+
|
|
66
|
+
- **`--verbose`**: Abilita il logging dettagliato per il debug. (default a true usando la CLI)
|
|
67
|
+
|
|
68
|
+
> Esempio: `npx intlayer content test --verbose`
|
|
69
|
+
|
|
70
|
+
## Esempio:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx intlayer content test --verbose
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
L'output ti aiuta a identificare rapidamente quali traduzioni devono essere completate per garantire che la tua applicazione funzioni correttamente in tutte le localizzazioni configurate.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: Trasformare Componenti
|
|
5
|
+
description: Scopri come trasformare componenti esistenti per utilizzare Intlayer.
|
|
6
|
+
keywords:
|
|
7
|
+
- Trasformare
|
|
8
|
+
- Componenti
|
|
9
|
+
- Migrazione
|
|
10
|
+
- CLI
|
|
11
|
+
- Intlayer
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- concept
|
|
15
|
+
- cli
|
|
16
|
+
- transform
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Trasformare componenti
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx intlayer transform
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Questo comando analizza i tuoi file di codice per aiutarti a migrare componenti esistenti all'uso di Intlayer. Supporta la selezione interattiva dei file o il targeting di file specifici.
|
|
26
|
+
|
|
27
|
+
## Alias:
|
|
28
|
+
|
|
29
|
+
- `npx intlayer trans`
|
|
30
|
+
|
|
31
|
+
## Argomenti:
|
|
32
|
+
|
|
33
|
+
**Opzioni di selezione file:**
|
|
34
|
+
|
|
35
|
+
- **`-f, --file [files...]`**: Elenco di file specifici da trasformare. Se non fornito, la CLI cercherà i file corrispondenti (`**/*.{tsx,jsx,vue,svelte,ts,js}`) e ti chiederà di selezionare quali trasformare.
|
|
36
|
+
|
|
37
|
+
> Esempio: `npx intlayer transform -f src/components/MyComponent.tsx`
|
|
38
|
+
|
|
39
|
+
**Opzioni di output:**
|
|
40
|
+
|
|
41
|
+
- **`-o, --output-content-declarations [outputContentDeclarations]`**: Directory in cui salvare i file di dichiarazione dei contenuti generati.
|
|
42
|
+
|
|
43
|
+
> Esempio: `npx intlayer transform -o src/content`
|
|
44
|
+
|
|
45
|
+
- **`--code-only`**: Trasforma solo il codice del componente (non scrivere la dichiarazione dei contenuti).
|
|
46
|
+
|
|
47
|
+
> Esempio: `npx intlayer transform --code-only`
|
|
48
|
+
|
|
49
|
+
- **`--declaration-only`**: Genera solo la dichiarazione dei contenuti (non riscrivere il componente).
|
|
50
|
+
|
|
51
|
+
> Esempio: `npx intlayer transform --declaration-only`
|
|
52
|
+
|
|
53
|
+
**Opzioni di configurazione:**
|
|
54
|
+
|
|
55
|
+
- **`--base-dir`**: Specifica la directory base per il progetto.
|
|
56
|
+
- **`--env`**: Specifica l'ambiente.
|
|
57
|
+
- **`--env-file`**: Fornisci un file di ambiente personalizzato.
|
|
58
|
+
- **`--verbose`**: Abilita il logging dettagliato.
|
|
59
|
+
|
|
60
|
+
**Plugin richiesti:**
|
|
61
|
+
|
|
62
|
+
Il comando transform funziona senza plugin aggiuntivi per file TypeScript / JSX. Tuttavia, richiede l'installazione dei seguenti plugin per i progetti Vue e Svelte:
|
|
63
|
+
|
|
64
|
+
- **`@intlayer/vue-transformer`**: Per i file Vue.
|
|
65
|
+
- **`@intlayer/svelte-transformer`**: Per i file Svelte.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: Controllare la versione della CLI
|
|
5
|
+
description: Scopri come verificare la versione della CLI Intlayer installata.
|
|
6
|
+
keywords:
|
|
7
|
+
- Versione
|
|
8
|
+
- CLI
|
|
9
|
+
- Intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- doc
|
|
12
|
+
- concept
|
|
13
|
+
- cli
|
|
14
|
+
- version
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Controllare la versione della CLI
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx intlayer --version
|
|
21
|
+
npx intlayer version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Entrambi i comandi mostrano la versione della CLI Intlayer installata.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: Osservare i Dizionari
|
|
5
|
+
description: Scopri come osservare le modifiche nei tuoi file di dichiarazione dei contenuti e costruire automaticamente i dizionari.
|
|
6
|
+
keywords:
|
|
7
|
+
- Osservare
|
|
8
|
+
- Dizionari
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
slugs:
|
|
12
|
+
- doc
|
|
13
|
+
- concept
|
|
14
|
+
- cli
|
|
15
|
+
- watch
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Osservare i Dizionari
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx intlayer watch
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Questo comando osserverà le modifiche nei tuoi file di dichiarazione dei contenuti e costruirà i dizionari nella directory `.intlayer`.
|
|
25
|
+
Questo comando è l'equivalente di `npx intlayer build --watch --skip-prepare`.
|
|
26
|
+
|
|
27
|
+
## Alias:
|
|
28
|
+
|
|
29
|
+
- `npx intlayer dictionaries watch`
|
|
30
|
+
- `npx intlayer dictionary watch`
|
|
31
|
+
- `npx intlayer dic watch`
|
|
32
|
+
|
|
33
|
+
## Argomenti:
|
|
34
|
+
|
|
35
|
+
- **`--with`**: Avvia un comando in parallelo con l'osservazione.
|
|
36
|
+
|
|
37
|
+
> Esempio: `npx intlayer watch --with "next dev --turbopack"`
|
|
38
|
+
|
|
39
|
+
> Esempio: `npx intlayer watch --with "next dev --turbopack"`
|
|
@@ -555,8 +555,9 @@ export const load: Load = ({ params }) => {
|
|
|
555
555
|
let { children, data }: { children: Snippet, data: LayoutData } = $props();
|
|
556
556
|
|
|
557
557
|
// Inizializza Intlayer con la locale dalla route
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
$effect(() => {
|
|
559
|
+
setupIntlayer(data.locale);
|
|
560
|
+
});
|
|
560
561
|
// Usa il dizionario dei contenuti del layout
|
|
561
562
|
const layoutContent = useIntlayer('layout');
|
|
562
563
|
</script>
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-11-16
|
|
3
|
+
updatedAt: 2025-11-16
|
|
4
|
+
title: Documentazione della funzione getPrefix | intlayer
|
|
5
|
+
description: Scopri come utilizzare la funzione getPrefix per il pacchetto intlayer
|
|
6
|
+
keywords:
|
|
7
|
+
- getPrefix
|
|
8
|
+
- prefisso
|
|
9
|
+
- Intlayer
|
|
10
|
+
- intlayer
|
|
11
|
+
- Internazionalizzazione
|
|
12
|
+
- Documentazione
|
|
13
|
+
- Next.js
|
|
14
|
+
- JavaScript
|
|
15
|
+
- React
|
|
16
|
+
slugs:
|
|
17
|
+
- doc
|
|
18
|
+
- packages
|
|
19
|
+
- intlayer
|
|
20
|
+
- getPrefix
|
|
21
|
+
history:
|
|
22
|
+
- version: 7.1.0
|
|
23
|
+
date: 2025-11-16
|
|
24
|
+
changes: Documentazione iniziale
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Documentazione: Funzione `getPrefix` in `intlayer`
|
|
28
|
+
|
|
29
|
+
## Descrizione
|
|
30
|
+
|
|
31
|
+
La funzione `getPrefix` determina il prefisso URL per una data locale basandosi sulla configurazione della modalità di routing. Confronta la locale con la locale predefinita e restituisce un oggetto contenente tre diversi formati di prefisso per una costruzione flessibile degli URL.
|
|
32
|
+
|
|
33
|
+
**Caratteristiche principali:**
|
|
34
|
+
|
|
35
|
+
- Prende una locale come primo parametro (obbligatorio)
|
|
36
|
+
- Oggetto `options` opzionale con `defaultLocale` e `mode`
|
|
37
|
+
- Restituisce un oggetto con le proprietà `prefix` e `localePrefix`
|
|
38
|
+
- Supporta tutte le modalità di routing: `prefix-no-default`, `prefix-all`, `no-prefix` e `search-params`
|
|
39
|
+
- Utility leggera per determinare quando aggiungere i prefissi di locale
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Firma della funzione
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
getPrefix(
|
|
47
|
+
locale: Locales, // Obbligatorio
|
|
48
|
+
options?: { // Opzionale
|
|
49
|
+
defaultLocale?: Locales;
|
|
50
|
+
mode?: 'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params';
|
|
51
|
+
}
|
|
52
|
+
): GetPrefixResult
|
|
53
|
+
|
|
54
|
+
type GetPrefixResult = {
|
|
55
|
+
prefix: string; // es. 'fr/' o ''
|
|
56
|
+
localePrefix?: Locale; // es. 'fr' o undefined
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Parametri
|
|
63
|
+
|
|
64
|
+
- `locale: Locales`
|
|
65
|
+
- **Descrizione**: La locale per cui generare il prefisso. Se il valore è falsy (undefined, null, stringa vuota), la funzione restituisce una stringa vuota.
|
|
66
|
+
- **Tipo**: `Locales`
|
|
67
|
+
- **Obbligatorio**: Sì
|
|
68
|
+
|
|
69
|
+
- `options?: object`
|
|
70
|
+
- **Descrizione**: Oggetto di configurazione per la determinazione del prefisso.
|
|
71
|
+
- **Tipo**: `object`
|
|
72
|
+
- **Obbligatorio**: No (Opzionale)
|
|
73
|
+
|
|
74
|
+
- `options.defaultLocale?: Locales`
|
|
75
|
+
- **Descrizione**: La locale predefinita per l'applicazione. Se non fornita, utilizza la locale predefinita configurata nel progetto.
|
|
76
|
+
- **Tipo**: `Locales`
|
|
77
|
+
- **Predefinito**: [`Configurazione del Progetto`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md#middleware)
|
|
78
|
+
|
|
79
|
+
- `options.mode?: 'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params'`
|
|
80
|
+
- **Descrizione**: La modalità di routing URL per la gestione della locale. Se non fornita, utilizza la modalità configurata nella configurazione del progetto.
|
|
81
|
+
- **Tipo**: `'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params'`
|
|
82
|
+
- **Predefinito**: [`Configurazione del Progetto`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md#middleware)
|
|
83
|
+
- **Modalità**:
|
|
84
|
+
- `prefix-no-default`: Restituisce stringhe vuote quando la locale corrisponde alla locale predefinita
|
|
85
|
+
- `prefix-all`: Restituisce il prefisso per tutte le località, inclusa quella predefinita
|
|
86
|
+
- `no-prefix`: Restituisce stringhe vuote (nessun prefisso negli URL)
|
|
87
|
+
- `search-params`: Restituisce stringhe vuote (locale nei parametri di query)
|
|
88
|
+
|
|
89
|
+
### Ritorna
|
|
90
|
+
|
|
91
|
+
- **Tipo**: `GetPrefixResult`
|
|
92
|
+
- **Descrizione**: Un oggetto contenente tre diversi formati di prefisso:
|
|
93
|
+
- `prefix`: Il prefisso del percorso con slash finale (es. `'fr/'`, `''`)
|
|
94
|
+
- `localePrefix`: L'identificatore della locale senza slash (es. `'fr'`, `undefined`)
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Esempio di Utilizzo
|
|
99
|
+
|
|
100
|
+
### Utilizzo Base
|
|
101
|
+
|
|
102
|
+
```typescript codeFormat="typescript"
|
|
103
|
+
import { getPrefix, Locales } from "intlayer";
|
|
104
|
+
|
|
105
|
+
// Controlla il prefisso per la locale inglese
|
|
106
|
+
getPrefix(Locales.ENGLISH, {
|
|
107
|
+
defaultLocale: Locales.ENGLISH,
|
|
108
|
+
mode: "prefix-all",
|
|
109
|
+
});
|
|
110
|
+
// Restituisce: { prefix: 'en/', localePrefix: 'en' }
|
|
111
|
+
|
|
112
|
+
// Controlla il prefisso per la locale francese
|
|
113
|
+
getPrefix(Locales.FRENCH, {
|
|
114
|
+
defaultLocale: Locales.ENGLISH,
|
|
115
|
+
mode: "prefix-no-default",
|
|
116
|
+
});
|
|
117
|
+
// Restituisce: { prefix: 'fr/', localePrefix: 'fr' }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```javascript codeFormat="esm"
|
|
121
|
+
import { getPrefix, Locales } from "intlayer";
|
|
122
|
+
|
|
123
|
+
getPrefix(Locales.ENGLISH, { mode: "prefix-all" });
|
|
124
|
+
javascript codeFormat="commonjs"
|
|
125
|
+
const { getPrefix, Locales } = require("intlayer");
|
|
126
|
+
|
|
127
|
+
getPrefix(Locales.ENGLISH, { mode: "prefix-all" });
|
|
128
|
+
// Restituisce: { prefix: '', localePrefix: undefined }
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Modalità di Routing Differenti
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { getPrefix, Locales } from "intlayer";
|
|
135
|
+
|
|
136
|
+
// prefix-all: Restituisce sempre il prefisso
|
|
137
|
+
getPrefix(Locales.ENGLISH, {
|
|
138
|
+
mode: "prefix-all",
|
|
139
|
+
defaultLocale: Locales.ENGLISH,
|
|
140
|
+
});
|
|
141
|
+
// Restituisce: { prefix: '/en', localePrefix: 'en' }
|
|
142
|
+
|
|
143
|
+
// prefix-no-default: Nessun prefisso quando la locale corrisponde a quella di default
|
|
144
|
+
getPrefix(Locales.ENGLISH, {
|
|
145
|
+
mode: "prefix-no-default",
|
|
146
|
+
defaultLocale: Locales.ENGLISH,
|
|
147
|
+
});
|
|
148
|
+
// Restituisce: { prefix: '', localePrefix: undefined }
|
|
149
|
+
|
|
150
|
+
// prefix-no-default: Restituisce il prefisso quando la locale è diversa da quella predefinita
|
|
151
|
+
getPrefix(Locales.FRENCH, {
|
|
152
|
+
mode: "prefix-no-default",
|
|
153
|
+
defaultLocale: Locales.ENGLISH,
|
|
154
|
+
});
|
|
155
|
+
// Restituisce: { prefix: 'fr/', localePrefix: 'fr' }
|
|
156
|
+
|
|
157
|
+
// no-prefix & search-params: Non restituisce mai il prefisso
|
|
158
|
+
getPrefix(Locales.ENGLISH, { mode: "no-prefix" });
|
|
159
|
+
// Restituisce: { prefix: '', localePrefix: undefined }
|
|
160
|
+
|
|
161
|
+
getPrefix(Locales.ENGLISH, { mode: "search-params" });
|
|
162
|
+
// Restituisce: { prefix: '', localePrefix: undefined }
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Esempio Pratico
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
import { getPrefix, Locales } from "intlayer";
|
|
169
|
+
|
|
170
|
+
// Costruisci URL con il prefisso appropriato per una specifica locale
|
|
171
|
+
const locale = Locales.FRENCH;
|
|
172
|
+
const { prefix, localePrefix } = getPrefix(locale, {
|
|
173
|
+
defaultLocale: Locales.ENGLISH,
|
|
174
|
+
mode: "prefix-no-default",
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// Utilizzo del prefisso per la costruzione del percorso
|
|
178
|
+
const url1 = `/${prefix}about`.replace(/\/+/g, "/");
|
|
179
|
+
// Risultato: "/fr/about"
|
|
180
|
+
|
|
181
|
+
// Utilizzo di localePrefix per l'identificazione della locale
|
|
182
|
+
console.log(`Current locale: ${localePrefix}`);
|
|
183
|
+
// Output: "Current locale: fr"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Funzioni Correlate
|
|
189
|
+
|
|
190
|
+
- [`getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/intlayer/getLocalizedUrl.md): Genera un URL localizzato per una specifica locale
|
|
191
|
+
- [`getMultilingualUrls`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/intlayer/getMultilingualUrls.md): Genera URL per tutte le localizzazioni configurate
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## TypeScript
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
type GetPrefixResult = {
|
|
199
|
+
prefix: string; // Il prefisso del percorso con slash finale (es. 'fr/' o '')
|
|
200
|
+
|
|
201
|
+
localePrefix?: Locale; // L'identificatore della locale senza slash (es. 'fr' o undefined)
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
function getPrefix(
|
|
205
|
+
locale: Locales,
|
|
206
|
+
options?: {
|
|
207
|
+
defaultLocale?: Locales;
|
|
208
|
+
mode?: "prefix-no-default" | "prefix-all" | "no-prefix" | "search-params";
|
|
209
|
+
}
|
|
210
|
+
): GetPrefixResult;
|
|
211
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-11
|
|
3
|
+
updatedAt: 2025-11-22
|
|
4
|
+
title: 辞書のビルド
|
|
5
|
+
description: コンテンツ宣言ファイルからIntlayerの辞書をビルドする方法を学びます。
|
|
6
|
+
keywords:
|
|
7
|
+
- ビルド
|
|
8
|
+
- 辞書
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
slugs:
|
|
12
|
+
- doc
|
|
13
|
+
- concept
|
|
14
|
+
- cli
|
|
15
|
+
- build
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# 辞書のビルド
|
|
19
|
+
|
|
20
|
+
辞書をビルドするには、以下のコマンドを実行します。
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx intlayer build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
またはウォッチモードで
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx intlayer build --watch
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
このコマンドはデフォルトで `./src/**/*.content.{ts|js|mjs|cjs|json|tsx|jsx}` にある宣言コンテンツファイルを検出し、`.intlayer` ディレクトリに辞書をビルドします。
|
|
33
|
+
|
|
34
|
+
## エイリアス:
|
|
35
|
+
|
|
36
|
+
- `npx intlayer dictionaries build`
|
|
37
|
+
- `npx intlayer dictionary build`
|
|
38
|
+
- `npx intlayer dic build`
|
|
39
|
+
|
|
40
|
+
## 引数:
|
|
41
|
+
|
|
42
|
+
- **`--base-dir`**: プロジェクトのベースディレクトリを指定します。intlayerの設定を取得するために、コマンドはベースディレクトリ内の `intlayer.config.{ts,js,json,cjs,mjs}` ファイルを探します。
|
|
43
|
+
|
|
44
|
+
> 例: `npx intlayer build --base-dir ./src`
|
|
45
|
+
|
|
46
|
+
- **`--env`**: 環境を指定します(例:`development`、`production`)。intlayerの設定ファイルで環境変数を使用している場合に便利です。
|
|
47
|
+
|
|
48
|
+
> 例: `npx intlayer build --env production`
|
|
49
|
+
|
|
50
|
+
- **`--env-file`**: 変数を読み込むためのカスタム環境ファイルを指定します。intlayerの設定ファイルで環境変数を使用している場合に便利です。
|
|
51
|
+
|
|
52
|
+
> 例: `npx intlayer build --env-file .env.production.local`
|
|
53
|
+
|
|
54
|
+
- **`--with`**: ビルドと並行してコマンドを開始します。
|
|
55
|
+
|
|
56
|
+
- **`--base-dir`**: プロジェクトのベースディレクトリを指定します。intlayerの設定を取得するために、コマンドはベースディレクトリ内の `intlayer.config.{ts,js,json,cjs,mjs}` ファイルを探します。
|
|
57
|
+
|
|
58
|
+
> 例: `npx intlayer build --base-dir ./src`
|
|
59
|
+
|
|
60
|
+
- **`--env`**: 環境を指定します(例:`development`、`production`)。intlayerの設定ファイルで環境変数を使用している場合に便利です。
|
|
61
|
+
|
|
62
|
+
> 例: `npx intlayer build --env production`
|
|
63
|
+
|
|
64
|
+
- **`--env-file`**: 変数を読み込むためのカスタム環境ファイルを指定します。intlayerの設定ファイルで環境変数を使用している場合に便利です。
|
|
65
|
+
|
|
66
|
+
> 例: `npx intlayer build --env-file .env.production.local`
|
|
67
|
+
|
|
68
|
+
- **`--with`**: ビルドと並行してコマンドを開始します。
|
|
69
|
+
|
|
70
|
+
> 例: `npx intlayer build --with "next dev --turbopack"`
|
|
71
|
+
|
|
72
|
+
- **`--skip-prepare`**: prepareステップをスキップします。
|
|
73
|
+
|
|
74
|
+
> 例: `npx intlayer build --skip-prepare`
|
|
75
|
+
|
|
76
|
+
- **`--no-cache`**: キャッシュを無効にします。
|
|
77
|
+
|
|
78
|
+
> 例: `npx intlayer build --no-cache`
|