@intlayer/docs 5.8.1 → 6.0.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/blog/ar/rag_powered_documentation_assistant.md +282 -0
- package/blog/de/rag_powered_documentation_assistant.md +282 -0
- package/blog/en/rag_powered_documentation_assistant.md +289 -0
- package/blog/en-GB/rag_powered_documentation_assistant.md +284 -0
- package/blog/es/rag_powered_documentation_assistant.md +308 -0
- package/blog/fr/rag_powered_documentation_assistant.md +308 -0
- package/blog/hi/rag_powered_documentation_assistant.md +284 -0
- package/blog/it/rag_powered_documentation_assistant.md +284 -0
- package/blog/ja/rag_powered_documentation_assistant.md +284 -0
- package/blog/ko/rag_powered_documentation_assistant.md +283 -0
- package/blog/pt/rag_powered_documentation_assistant.md +284 -0
- package/blog/ru/rag_powered_documentation_assistant.md +284 -0
- package/blog/tr/index.md +69 -0
- package/blog/tr/internationalization_and_SEO.md +273 -0
- package/blog/tr/intlayer_with_i18next.md +162 -0
- package/blog/tr/intlayer_with_next-i18next.md +367 -0
- package/blog/tr/intlayer_with_next-intl.md +392 -0
- package/blog/tr/intlayer_with_react-i18next.md +346 -0
- package/blog/tr/intlayer_with_react-intl.md +345 -0
- package/blog/tr/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/tr/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/tr/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/tr/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/tr/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/tr/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/tr/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/tr/list_i18n_technologies/frameworks/svelte.md +129 -0
- package/blog/tr/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +170 -0
- package/blog/tr/rag_powered_documentation_assistant.md +284 -0
- package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +162 -0
- package/blog/tr/vue-i18n_vs_intlayer.md +276 -0
- package/blog/tr/what_is_internationalization.md +166 -0
- package/blog/zh/rag_powered_documentation_assistant.md +284 -0
- package/dist/cjs/generated/blog.entry.cjs +212 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +660 -132
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +84 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +6 -0
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +212 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +660 -132
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +84 -0
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +6 -0
- package/dist/esm/generated/legal.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 +5 -2
- 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/autoFill.md +41 -40
- package/docs/ar/configuration.md +202 -199
- package/docs/ar/dictionary/content_file.md +1059 -0
- package/docs/ar/intlayer_CMS.md +4 -4
- package/docs/ar/intlayer_with_nestjs.md +271 -0
- package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7.md +533 -0
- package/docs/ar/intlayer_with_tanstack.md +465 -299
- package/docs/ar/intlayer_with_vite+preact.md +7 -7
- package/docs/ar/intlayer_with_vite+react.md +7 -7
- package/docs/ar/intlayer_with_vite+vue.md +9 -9
- package/docs/ar/packages/vite-intlayer/index.md +3 -3
- package/docs/ar/readme.md +261 -0
- package/docs/ar/testing.md +199 -0
- package/docs/de/autoFill.md +42 -19
- package/docs/de/configuration.md +155 -147
- package/docs/de/dictionary/content_file.md +1059 -0
- package/docs/de/intlayer_CMS.md +4 -5
- package/docs/de/intlayer_with_nestjs.md +270 -0
- package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/de/intlayer_with_react_router_v7.md +537 -0
- package/docs/de/intlayer_with_tanstack.md +469 -302
- package/docs/de/intlayer_with_vite+preact.md +7 -7
- package/docs/de/intlayer_with_vite+react.md +7 -7
- package/docs/de/intlayer_with_vite+vue.md +9 -9
- package/docs/de/packages/vite-intlayer/index.md +3 -3
- package/docs/de/readme.md +261 -0
- package/docs/de/testing.md +200 -0
- package/docs/en/CI_CD.md +4 -6
- package/docs/en/autoFill.md +25 -5
- package/docs/en/configuration.md +45 -54
- package/docs/en/dictionary/content_file.md +1054 -0
- package/docs/en/intlayer_CMS.md +8 -7
- package/docs/en/intlayer_cli.md +112 -5
- package/docs/en/intlayer_with_nestjs.md +268 -0
- package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en/intlayer_with_react_router_v7.md +531 -0
- package/docs/en/intlayer_with_tanstack.md +463 -294
- package/docs/en/intlayer_with_vite+preact.md +8 -8
- package/docs/en/intlayer_with_vite+react.md +8 -8
- package/docs/en/intlayer_with_vite+vue.md +8 -8
- package/docs/en/packages/intlayer/getLocalizedUrl.md +102 -25
- package/docs/en/packages/vite-intlayer/index.md +3 -3
- package/docs/en/readme.md +261 -0
- package/docs/en/testing.md +200 -0
- package/docs/en-GB/autoFill.md +29 -6
- package/docs/en-GB/configuration.md +79 -71
- package/docs/en-GB/dictionary/content_file.md +1084 -0
- package/docs/en-GB/intlayer_CMS.md +4 -5
- package/docs/en-GB/intlayer_with_nestjs.md +268 -0
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7.md +533 -0
- package/docs/en-GB/intlayer_with_tanstack.md +466 -299
- package/docs/en-GB/intlayer_with_vite+preact.md +7 -7
- package/docs/en-GB/intlayer_with_vite+react.md +7 -7
- package/docs/en-GB/intlayer_with_vite+vue.md +9 -9
- package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
- package/docs/en-GB/readme.md +261 -0
- package/docs/en-GB/testing.md +200 -0
- package/docs/es/autoFill.md +45 -23
- package/docs/es/configuration.md +171 -167
- package/docs/es/dictionary/content_file.md +1088 -0
- package/docs/es/intlayer_CMS.md +4 -5
- package/docs/es/intlayer_with_nestjs.md +268 -0
- package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +533 -0
- package/docs/es/intlayer_with_tanstack.md +469 -280
- package/docs/es/intlayer_with_vite+preact.md +7 -7
- package/docs/es/intlayer_with_vite+react.md +7 -7
- package/docs/es/intlayer_with_vite+vue.md +9 -9
- package/docs/es/packages/vite-intlayer/index.md +3 -3
- package/docs/es/readme.md +261 -0
- package/docs/es/testing.md +200 -0
- package/docs/fr/autoFill.md +47 -24
- package/docs/fr/configuration.md +213 -198
- package/docs/fr/dictionary/content_file.md +1054 -0
- package/docs/fr/intlayer_CMS.md +4 -5
- package/docs/fr/intlayer_with_nestjs.md +268 -0
- package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7.md +549 -0
- package/docs/fr/intlayer_with_tanstack.md +465 -279
- package/docs/fr/intlayer_with_vite+preact.md +7 -7
- package/docs/fr/intlayer_with_vite+react.md +7 -7
- package/docs/fr/intlayer_with_vite+vue.md +9 -9
- package/docs/fr/packages/vite-intlayer/index.md +3 -3
- package/docs/fr/readme.md +261 -0
- package/docs/fr/testing.md +200 -0
- package/docs/hi/autoFill.md +47 -25
- package/docs/hi/configuration.md +194 -189
- package/docs/hi/dictionary/content_file.md +1056 -0
- package/docs/hi/intlayer_CMS.md +4 -5
- package/docs/hi/intlayer_with_nestjs.md +269 -0
- package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7.md +533 -0
- package/docs/hi/intlayer_with_tanstack.md +467 -282
- package/docs/hi/intlayer_with_vite+preact.md +7 -7
- package/docs/hi/intlayer_with_vite+react.md +7 -7
- package/docs/hi/intlayer_with_vite+vue.md +9 -9
- package/docs/hi/packages/vite-intlayer/index.md +3 -3
- package/docs/hi/readme.md +261 -0
- package/docs/hi/testing.md +200 -0
- package/docs/it/autoFill.md +46 -24
- package/docs/it/configuration.md +169 -161
- package/docs/it/dictionary/content_file.md +1061 -0
- package/docs/it/intlayer_CMS.md +4 -5
- package/docs/it/intlayer_with_nestjs.md +268 -0
- package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/it/intlayer_with_react_router_v7.md +535 -0
- package/docs/it/intlayer_with_tanstack.md +467 -301
- package/docs/it/intlayer_with_vite+preact.md +7 -7
- package/docs/it/intlayer_with_vite+react.md +7 -7
- package/docs/it/intlayer_with_vite+vue.md +9 -9
- package/docs/it/packages/vite-intlayer/index.md +3 -3
- package/docs/it/readme.md +261 -0
- package/docs/it/testing.md +200 -0
- package/docs/ja/autoFill.md +45 -23
- package/docs/ja/configuration.md +243 -204
- package/docs/ja/dictionary/content_file.md +1064 -0
- package/docs/ja/intlayer_CMS.md +4 -5
- package/docs/ja/intlayer_with_nestjs.md +268 -0
- package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ja/intlayer_with_react_router_v7.md +534 -0
- package/docs/ja/intlayer_with_tanstack.md +467 -303
- package/docs/ja/intlayer_with_vite+preact.md +7 -7
- package/docs/ja/intlayer_with_vite+react.md +7 -7
- package/docs/ja/intlayer_with_vite+vue.md +9 -9
- package/docs/ja/packages/vite-intlayer/index.md +3 -3
- package/docs/ja/readme.md +263 -0
- package/docs/ja/testing.md +200 -0
- package/docs/ko/autoFill.md +39 -16
- package/docs/ko/configuration.md +217 -197
- package/docs/ko/dictionary/content_file.md +1060 -0
- package/docs/ko/intlayer_CMS.md +4 -5
- package/docs/ko/intlayer_with_nestjs.md +268 -0
- package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7.md +540 -0
- package/docs/ko/intlayer_with_tanstack.md +466 -302
- package/docs/ko/intlayer_with_vite+preact.md +7 -7
- package/docs/ko/intlayer_with_vite+react.md +7 -7
- package/docs/ko/intlayer_with_vite+vue.md +9 -9
- package/docs/ko/packages/vite-intlayer/index.md +3 -3
- package/docs/ko/readme.md +261 -0
- package/docs/ko/testing.md +200 -0
- package/docs/pt/autoFill.md +39 -15
- package/docs/pt/configuration.md +165 -147
- package/docs/pt/dictionary/content_file.md +1062 -0
- package/docs/pt/intlayer_CMS.md +4 -5
- package/docs/pt/intlayer_with_nestjs.md +271 -0
- package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7.md +535 -0
- package/docs/pt/intlayer_with_tanstack.md +469 -300
- package/docs/pt/intlayer_with_vite+preact.md +7 -7
- package/docs/pt/intlayer_with_vite+react.md +7 -7
- package/docs/pt/intlayer_with_vite+vue.md +9 -9
- package/docs/pt/packages/vite-intlayer/index.md +3 -3
- package/docs/pt/readme.md +261 -0
- package/docs/pt/testing.md +200 -0
- package/docs/ru/autoFill.md +52 -30
- package/docs/ru/configuration.md +164 -117
- package/docs/ru/dictionary/content_file.md +1064 -0
- package/docs/ru/intlayer_CMS.md +4 -4
- package/docs/ru/intlayer_with_nestjs.md +270 -0
- package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7.md +534 -0
- package/docs/ru/intlayer_with_tanstack.md +470 -305
- package/docs/ru/intlayer_with_vite+preact.md +7 -7
- package/docs/ru/intlayer_with_vite+react.md +7 -7
- package/docs/ru/intlayer_with_vite+vue.md +9 -9
- package/docs/ru/packages/vite-intlayer/index.md +3 -3
- package/docs/ru/readme.md +261 -0
- package/docs/ru/testing.md +202 -0
- package/docs/tr/CI_CD.md +198 -0
- package/docs/tr/autoFill.md +201 -0
- package/docs/tr/configuration.md +585 -0
- package/docs/tr/dictionary/condition.md +243 -0
- package/docs/tr/dictionary/content_file.md +1055 -0
- package/docs/tr/dictionary/enumeration.md +251 -0
- package/docs/tr/dictionary/file.md +228 -0
- package/docs/tr/dictionary/function_fetching.md +218 -0
- package/docs/tr/dictionary/gender.md +279 -0
- package/docs/tr/dictionary/insertion.md +191 -0
- package/docs/tr/dictionary/markdown.md +385 -0
- package/docs/tr/dictionary/nesting.md +279 -0
- package/docs/tr/dictionary/translation.md +315 -0
- package/docs/tr/formatters.md +618 -0
- package/docs/tr/how_works_intlayer.md +254 -0
- package/docs/tr/index.md +168 -0
- package/docs/tr/interest_of_intlayer.md +288 -0
- package/docs/tr/intlayer_CMS.md +347 -0
- package/docs/tr/intlayer_cli.md +570 -0
- package/docs/tr/intlayer_visual_editor.md +269 -0
- package/docs/tr/intlayer_with_angular.md +694 -0
- package/docs/tr/intlayer_with_create_react_app.md +1218 -0
- package/docs/tr/intlayer_with_express.md +415 -0
- package/docs/tr/intlayer_with_lynx+react.md +511 -0
- package/docs/tr/intlayer_with_nestjs.md +268 -0
- package/docs/tr/intlayer_with_nextjs_14.md +1029 -0
- package/docs/tr/intlayer_with_nextjs_15.md +1506 -0
- package/docs/tr/intlayer_with_nextjs_page_router.md +1484 -0
- package/docs/tr/intlayer_with_nuxt.md +773 -0
- package/docs/tr/intlayer_with_react_native+expo.md +660 -0
- package/docs/tr/intlayer_with_react_router_v7.md +531 -0
- package/docs/tr/intlayer_with_tanstack.md +452 -0
- package/docs/tr/intlayer_with_vite+preact.md +1673 -0
- package/docs/tr/intlayer_with_vite+react.md +1632 -0
- package/docs/tr/intlayer_with_vite+solid.md +288 -0
- package/docs/tr/intlayer_with_vite+svelte.md +288 -0
- package/docs/tr/intlayer_with_vite+vue.md +1042 -0
- package/docs/tr/introduction.md +209 -0
- package/docs/tr/locale_mapper.md +244 -0
- package/docs/tr/mcp_server.md +207 -0
- package/docs/tr/packages/@intlayer/api/index.md +58 -0
- package/docs/tr/packages/@intlayer/chokidar/index.md +57 -0
- package/docs/tr/packages/@intlayer/cli/index.md +47 -0
- package/docs/tr/packages/@intlayer/config/index.md +142 -0
- package/docs/tr/packages/@intlayer/core/index.md +51 -0
- package/docs/tr/packages/@intlayer/design-system/index.md +47 -0
- package/docs/tr/packages/@intlayer/dictionary-entry/index.md +53 -0
- package/docs/tr/packages/@intlayer/editor/index.md +47 -0
- package/docs/tr/packages/@intlayer/editor-react/index.md +47 -0
- package/docs/tr/packages/@intlayer/webpack/index.md +61 -0
- package/docs/tr/packages/angular-intlayer/index.md +59 -0
- package/docs/tr/packages/express-intlayer/index.md +258 -0
- package/docs/tr/packages/express-intlayer/t.md +459 -0
- package/docs/tr/packages/intlayer/getConfiguration.md +151 -0
- package/docs/tr/packages/intlayer/getEnumeration.md +165 -0
- package/docs/tr/packages/intlayer/getHTMLTextDir.md +127 -0
- package/docs/tr/packages/intlayer/getLocaleLang.md +87 -0
- package/docs/tr/packages/intlayer/getLocaleName.md +124 -0
- package/docs/tr/packages/intlayer/getLocalizedUrl.md +324 -0
- package/docs/tr/packages/intlayer/getMultilingualUrls.md +225 -0
- package/docs/tr/packages/intlayer/getPathWithoutLocale.md +81 -0
- package/docs/tr/packages/intlayer/getTranslation.md +196 -0
- package/docs/tr/packages/intlayer/getTranslationContent.md +195 -0
- package/docs/tr/packages/intlayer/index.md +505 -0
- package/docs/tr/packages/intlayer-cli/index.md +71 -0
- package/docs/tr/packages/intlayer-editor/index.md +139 -0
- package/docs/tr/packages/lynx-intlayer/index.md +85 -0
- package/docs/tr/packages/next-intlayer/index.md +154 -0
- package/docs/tr/packages/next-intlayer/t.md +354 -0
- package/docs/tr/packages/next-intlayer/useDictionary.md +270 -0
- package/docs/tr/packages/next-intlayer/useIntlayer.md +265 -0
- package/docs/tr/packages/next-intlayer/useLocale.md +133 -0
- package/docs/tr/packages/nuxt-intlayer/index.md +59 -0
- package/docs/tr/packages/preact-intlayer/index.md +55 -0
- package/docs/tr/packages/react-intlayer/index.md +148 -0
- package/docs/tr/packages/react-intlayer/t.md +304 -0
- package/docs/tr/packages/react-intlayer/useDictionary.md +554 -0
- package/docs/tr/packages/react-intlayer/useI18n.md +478 -0
- package/docs/tr/packages/react-intlayer/useIntlayer.md +253 -0
- package/docs/tr/packages/react-intlayer/useLocale.md +212 -0
- package/docs/tr/packages/react-native-intlayer/index.md +85 -0
- package/docs/tr/packages/react-scripts-intlayer/index.md +82 -0
- package/docs/tr/packages/solid-intlayer/index.md +56 -0
- package/docs/tr/packages/svelte-intlayer/index.md +55 -0
- package/docs/tr/packages/vite-intlayer/index.md +82 -0
- package/docs/tr/packages/vue-intlayer/index.md +59 -0
- package/docs/tr/per_locale_file.md +321 -0
- package/docs/tr/readme.md +261 -0
- package/docs/tr/roadmap.md +338 -0
- package/docs/tr/testing.md +200 -0
- package/docs/tr/vs_code_extension.md +154 -0
- package/docs/zh/autoFill.md +40 -18
- package/docs/zh/configuration.md +245 -226
- package/docs/zh/dictionary/content_file.md +1064 -0
- package/docs/zh/intlayer_CMS.md +4 -5
- package/docs/zh/intlayer_with_nestjs.md +268 -0
- package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +535 -0
- package/docs/zh/intlayer_with_tanstack.md +468 -278
- package/docs/zh/intlayer_with_vite+preact.md +7 -7
- package/docs/zh/intlayer_with_vite+react.md +7 -7
- package/docs/zh/intlayer_with_vite+vue.md +7 -7
- package/docs/zh/packages/vite-intlayer/index.md +3 -3
- package/docs/zh/readme.md +261 -0
- package/docs/zh/testing.md +198 -0
- package/frequent_questions/tr/SSR_Next_no_[locale].md +105 -0
- package/frequent_questions/tr/array_as_content_declaration.md +72 -0
- package/frequent_questions/tr/build_dictionaries.md +59 -0
- package/frequent_questions/tr/build_error_CI_CD.md +75 -0
- package/frequent_questions/tr/customized_locale_list.md +65 -0
- package/frequent_questions/tr/domain_routing.md +114 -0
- package/frequent_questions/tr/esbuild_error.md +30 -0
- package/frequent_questions/tr/get_locale_cookie.md +142 -0
- package/frequent_questions/tr/intlayer_command_undefined.md +156 -0
- package/frequent_questions/tr/locale_incorect_in_url.md +74 -0
- package/frequent_questions/tr/static_rendering.md +45 -0
- package/frequent_questions/tr/translated_path_url.md +56 -0
- package/frequent_questions/tr/unknown_command.md +98 -0
- package/legal/tr/privacy_notice.md +83 -0
- package/legal/tr/terms_of_service.md +55 -0
- package/package.json +12 -12
- package/src/generated/blog.entry.ts +212 -0
- package/src/generated/docs.entry.ts +663 -135
- package/src/generated/frequentQuestions.entry.ts +85 -1
- package/src/generated/legal.entry.ts +7 -1
- package/docs/ar/dictionary/content_extention_customization.md +0 -100
- package/docs/ar/dictionary/get_started.md +0 -527
- package/docs/de/dictionary/content_extention_customization.md +0 -100
- package/docs/de/dictionary/get_started.md +0 -531
- package/docs/en/dictionary/content_extention_customization.md +0 -102
- package/docs/en/dictionary/get_started.md +0 -529
- package/docs/en-GB/dictionary/content_extention_customization.md +0 -100
- package/docs/en-GB/dictionary/get_started.md +0 -591
- package/docs/es/dictionary/content_extention_customization.md +0 -100
- package/docs/es/dictionary/get_started.md +0 -527
- package/docs/fr/dictionary/content_extention_customization.md +0 -100
- package/docs/fr/dictionary/get_started.md +0 -527
- package/docs/hi/dictionary/content_extention_customization.md +0 -100
- package/docs/hi/dictionary/get_started.md +0 -527
- package/docs/it/dictionary/content_extention_customization.md +0 -113
- package/docs/it/dictionary/get_started.md +0 -573
- package/docs/ja/dictionary/content_extention_customization.md +0 -113
- package/docs/ja/dictionary/get_started.md +0 -576
- package/docs/ko/dictionary/content_extention_customization.md +0 -100
- package/docs/ko/dictionary/get_started.md +0 -530
- package/docs/pt/dictionary/content_extention_customization.md +0 -100
- package/docs/pt/dictionary/get_started.md +0 -532
- package/docs/ru/dictionary/content_extention_customization.md +0 -100
- package/docs/ru/dictionary/get_started.md +0 -575
- package/docs/zh/dictionary/content_extention_customization.md +0 -117
- package/docs/zh/dictionary/get_started.md +0 -533
|
@@ -0,0 +1,1054 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-02-07
|
|
3
|
+
updatedAt: 2025-09-20
|
|
4
|
+
title: Content File
|
|
5
|
+
description: Learn how to customize the extensions for your content declaration files. Follow this documentation to implement conditions efficiently in your project.
|
|
6
|
+
keywords:
|
|
7
|
+
- Content File
|
|
8
|
+
- Documentation
|
|
9
|
+
- Intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- doc
|
|
12
|
+
- concept
|
|
13
|
+
- content
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Content File
|
|
17
|
+
|
|
18
|
+
<iframe title="i18n, Markdown, JSON… one single solution to manage it all | Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/1VHgSY_j9_I?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
19
|
+
|
|
20
|
+
## What is a Content File?
|
|
21
|
+
|
|
22
|
+
A content file in Intlayer is a file that contains dictionary definitions.
|
|
23
|
+
These files declare your application's text content, translations, and resources.
|
|
24
|
+
Content files are processed by Intlayer to generate dictionaries.
|
|
25
|
+
|
|
26
|
+
The dictionaries will be the final result that your application will import using the `useIntlayer` hook.
|
|
27
|
+
|
|
28
|
+
### Key Concepts
|
|
29
|
+
|
|
30
|
+
#### Dictionary
|
|
31
|
+
|
|
32
|
+
A dictionary is a structured collection of content organized by keys. Each dictionary contains:
|
|
33
|
+
|
|
34
|
+
- **Key**: A unique identifier for the dictionary
|
|
35
|
+
- **Content**: The actual content values (text, numbers, objects, etc.)
|
|
36
|
+
- **Metadata**: Additional information like title, description, tags, etc.
|
|
37
|
+
|
|
38
|
+
#### Content File
|
|
39
|
+
|
|
40
|
+
Content file example:
|
|
41
|
+
|
|
42
|
+
```tsx fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
|
|
43
|
+
import { type ReactNode } from "react";
|
|
44
|
+
import {
|
|
45
|
+
t,
|
|
46
|
+
enu,
|
|
47
|
+
cond,
|
|
48
|
+
nest,
|
|
49
|
+
md,
|
|
50
|
+
insert,
|
|
51
|
+
file,
|
|
52
|
+
type Dictionary,
|
|
53
|
+
} from "intlayer";
|
|
54
|
+
|
|
55
|
+
interface Content {
|
|
56
|
+
imbricatedContent: {
|
|
57
|
+
imbricatedContent2: {
|
|
58
|
+
stringContent: string;
|
|
59
|
+
numberContent: number;
|
|
60
|
+
booleanContent: boolean;
|
|
61
|
+
javaScriptContent: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
multilingualContent: string;
|
|
65
|
+
quantityContent: string;
|
|
66
|
+
conditionalContent: string;
|
|
67
|
+
markdownContent: never;
|
|
68
|
+
externalContent: string;
|
|
69
|
+
insertionContent: string;
|
|
70
|
+
nestedContent: string;
|
|
71
|
+
fileContent: string;
|
|
72
|
+
jsxContent: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
key: "page",
|
|
77
|
+
content: {
|
|
78
|
+
imbricatedContent: {
|
|
79
|
+
imbricatedContent2: {
|
|
80
|
+
stringContent: "Hello World",
|
|
81
|
+
numberContent: 123,
|
|
82
|
+
booleanContent: true,
|
|
83
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
multilingualContent: t({
|
|
87
|
+
en: "English content",
|
|
88
|
+
"en-GB": "English content (UK)",
|
|
89
|
+
fr: "French content",
|
|
90
|
+
es: "Spanish content",
|
|
91
|
+
}),
|
|
92
|
+
quantityContent: enu({
|
|
93
|
+
"<-1": "Less than minus one car",
|
|
94
|
+
"-1": "Minus one car",
|
|
95
|
+
"0": "No cars",
|
|
96
|
+
"1": "One car",
|
|
97
|
+
">5": "Some cars",
|
|
98
|
+
">19": "Many cars",
|
|
99
|
+
}),
|
|
100
|
+
conditionalContent: cond({
|
|
101
|
+
true: "Validation is enabled",
|
|
102
|
+
false: "Validation is disabled",
|
|
103
|
+
}),
|
|
104
|
+
insertionContent: insert("Hello {{name}}!"),
|
|
105
|
+
nestedContent: nest(
|
|
106
|
+
"navbar", // The key of the dictionary to nest
|
|
107
|
+
"login.button" // [Optional] The path to the content to nest
|
|
108
|
+
),
|
|
109
|
+
fileContent: file("./path/to/file.txt"),
|
|
110
|
+
externalContent: fetch("https://example.com").then((res) => res.json()),
|
|
111
|
+
markdownContent: md("# Markdown Example"),
|
|
112
|
+
|
|
113
|
+
/*
|
|
114
|
+
* Only available using `react-intlayer` or `next-intlayer`
|
|
115
|
+
*/
|
|
116
|
+
jsxContent: <h1>My title</h1>,
|
|
117
|
+
},
|
|
118
|
+
} satisfies Dictionary<Content>; // [optional] Dictionary is generic and allow you to strengthen the formatting of your dictionary
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
|
|
122
|
+
import { t, enu, cond, nest, md, insert, file } from "intlayer";
|
|
123
|
+
|
|
124
|
+
/** @type {import('intlayer').Dictionary} */
|
|
125
|
+
export default {
|
|
126
|
+
key: "page",
|
|
127
|
+
content: {
|
|
128
|
+
imbricatedContent: {
|
|
129
|
+
imbricatedContent2: {
|
|
130
|
+
stringContent: "Hello World",
|
|
131
|
+
numberContent: 123,
|
|
132
|
+
booleanContent: true,
|
|
133
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
134
|
+
},
|
|
135
|
+
imbricatedArray: [1, 2, 3],
|
|
136
|
+
},
|
|
137
|
+
multilingualContent: t({
|
|
138
|
+
en: "English content",
|
|
139
|
+
"en-GB": "English content (UK)",
|
|
140
|
+
fr: "French content",
|
|
141
|
+
es: "Spanish content",
|
|
142
|
+
}),
|
|
143
|
+
quantityContent: enu({
|
|
144
|
+
"<-1": "Less than minus one car",
|
|
145
|
+
"-1": "Minus one car",
|
|
146
|
+
"0": "No cars",
|
|
147
|
+
"1": "One car",
|
|
148
|
+
">5": "Some cars",
|
|
149
|
+
">19": "Many cars",
|
|
150
|
+
}),
|
|
151
|
+
conditionalContent: cond({
|
|
152
|
+
true: "Validation is enabled",
|
|
153
|
+
false: "Validation is disabled",
|
|
154
|
+
}),
|
|
155
|
+
insertionContent: insert("Hello {{name}}!"),
|
|
156
|
+
nestedContent: nest(
|
|
157
|
+
"navbar", // The key of the dictionary to nest
|
|
158
|
+
"login.button" // [Optional] The path to the content to nest
|
|
159
|
+
),
|
|
160
|
+
markdownContent: md("# Markdown Example"),
|
|
161
|
+
fileContent: file("./path/to/file.txt"),
|
|
162
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
163
|
+
|
|
164
|
+
// Only available using `react-intlayer` or `next-intlayer`
|
|
165
|
+
jsxContent: <h1>My title</h1>,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
|
|
171
|
+
const { t, enu, cond, nest, md, insert, file } = require("intlayer");
|
|
172
|
+
|
|
173
|
+
/** @type {import('intlayer').Dictionary} */
|
|
174
|
+
module.exports = {
|
|
175
|
+
key: "page",
|
|
176
|
+
content: {
|
|
177
|
+
imbricatedContent: {
|
|
178
|
+
imbricatedContent2: {
|
|
179
|
+
stringContent: "Hello World",
|
|
180
|
+
numberContent: 123,
|
|
181
|
+
booleanContent: true,
|
|
182
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
183
|
+
},
|
|
184
|
+
imbricatedArray: [1, 2, 3],
|
|
185
|
+
},
|
|
186
|
+
multilingualContent: t({
|
|
187
|
+
en: "English content",
|
|
188
|
+
"en-GB": "English content (UK)",
|
|
189
|
+
fr: "French content",
|
|
190
|
+
es: "Spanish content",
|
|
191
|
+
}),
|
|
192
|
+
quantityContent: enu({
|
|
193
|
+
"<-1": "Less than minus one car",
|
|
194
|
+
"-1": "Minus one car",
|
|
195
|
+
"0": "No cars",
|
|
196
|
+
"1": "One car",
|
|
197
|
+
">5": "Some cars",
|
|
198
|
+
">19": "Many cars",
|
|
199
|
+
}),
|
|
200
|
+
conditionalContent: cond({
|
|
201
|
+
true: "Validation is enabled",
|
|
202
|
+
false: "Validation is disabled",
|
|
203
|
+
}),
|
|
204
|
+
insertionContent: insert("Hello {{name}}!"),
|
|
205
|
+
nestedContent: nest(
|
|
206
|
+
"navbar", // The key of the dictionary to nest
|
|
207
|
+
"login.button" // [Optional] The path to the content to nest
|
|
208
|
+
),
|
|
209
|
+
markdownContent: md("# Markdown Example"),
|
|
210
|
+
fileContent: file("./path/to/file.txt"),
|
|
211
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
212
|
+
|
|
213
|
+
// Only available using `react-intlayer` or `next-intlayer`
|
|
214
|
+
jsxContent: <h1>My title</h1>,
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
220
|
+
{
|
|
221
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
222
|
+
"key": "page",
|
|
223
|
+
"content": {
|
|
224
|
+
"imbricatedContent": {
|
|
225
|
+
"imbricatedContent2": {
|
|
226
|
+
"stringContent": "Hello World",
|
|
227
|
+
"numberContent": 123,
|
|
228
|
+
"booleanContent": true,
|
|
229
|
+
},
|
|
230
|
+
"imbricatedArray": [1, 2, 3],
|
|
231
|
+
},
|
|
232
|
+
"multilingualContent": {
|
|
233
|
+
"nodeType": "translation",
|
|
234
|
+
"translation": {
|
|
235
|
+
"en": "English content",
|
|
236
|
+
"en-GB": "English content (UK)",
|
|
237
|
+
"fr": "French content",
|
|
238
|
+
"es": "Spanish content",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
"quantityContent": {
|
|
242
|
+
"nodeType": "enumeration",
|
|
243
|
+
"enumeration": {
|
|
244
|
+
"0": "No cars",
|
|
245
|
+
"1": "One car",
|
|
246
|
+
"<-1": "Less than minus one car",
|
|
247
|
+
"-1": "Minus one car",
|
|
248
|
+
">5": "Some cars",
|
|
249
|
+
">19": "Many cars",
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
"conditionalContent": {
|
|
253
|
+
"nodeType": "condition",
|
|
254
|
+
"condition": {
|
|
255
|
+
"true": "Validation is enabled",
|
|
256
|
+
"false": "Validation is disabled",
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
"insertionContent": {
|
|
260
|
+
"nodeType": "insertion",
|
|
261
|
+
"insertion": "Hello {{name}}!",
|
|
262
|
+
},
|
|
263
|
+
"nestedContent": {
|
|
264
|
+
"nodeType": "nested",
|
|
265
|
+
"nested": { "dictionaryKey": "app" },
|
|
266
|
+
},
|
|
267
|
+
"markdownContent": {
|
|
268
|
+
"nodeType": "markdown",
|
|
269
|
+
"markdown": "# Markdown Example",
|
|
270
|
+
},
|
|
271
|
+
"fileContent": {
|
|
272
|
+
"nodeType": "file",
|
|
273
|
+
"file": "./path/to/file.txt",
|
|
274
|
+
},
|
|
275
|
+
"jsxContent": {
|
|
276
|
+
"type": "h1",
|
|
277
|
+
"key": null,
|
|
278
|
+
"ref": null,
|
|
279
|
+
"props": {
|
|
280
|
+
"children": ["My title"],
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Content Nodes
|
|
288
|
+
|
|
289
|
+
Content nodes are the building blocks of dictionary content. They can be:
|
|
290
|
+
|
|
291
|
+
- **Primitive values**: strings, numbers, booleans, null, undefined
|
|
292
|
+
- **Typed nodes**: Special content types like translations, conditions, markdown, etc.
|
|
293
|
+
- **Functions**: Dynamic content that can be evaluated at runtime [see Function Fetching](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/function_fetching.md)
|
|
294
|
+
- **Nested content**: References to other dictionaries
|
|
295
|
+
|
|
296
|
+
#### Content Types
|
|
297
|
+
|
|
298
|
+
Intlayer supports various content types through typed nodes:
|
|
299
|
+
|
|
300
|
+
- **Translation Content**: Multilingual text with locale-specific values [see Translation Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/translation_content.md)
|
|
301
|
+
- **Condition Content**: Conditional content based on boolean expressions [see Condition Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/condition_content.md)
|
|
302
|
+
- **Enumeration Content**: Content that varies based on enumerated values [see Enumeration Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/enumeration_content.md)
|
|
303
|
+
- **Insertion Content**: Content that can be inserted into other content [see Insertion Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/insertion_content.md)
|
|
304
|
+
- **Markdown Content**: Rich text content in Markdown format [see Markdown Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/markdown_content.md)
|
|
305
|
+
- **Nested Content**: References to other dictionaries [see Nested Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/nested_content.md)
|
|
306
|
+
- **Gender Content**: Content that varies based on gender [see Gender Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/gender_content.md)
|
|
307
|
+
- **File Content**: References to external files [see File Content](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/file_content.md)
|
|
308
|
+
|
|
309
|
+
## Dictionary Structure
|
|
310
|
+
|
|
311
|
+
A dictionary in Intlayer is defined by the `Dictionary` type and contains several properties that control its behavior:
|
|
312
|
+
|
|
313
|
+
### Required Properties
|
|
314
|
+
|
|
315
|
+
#### `key` (string)
|
|
316
|
+
|
|
317
|
+
The identifier for the dictionary. If multiple dictionaries have the same key, Intlayer will merge them automatically.
|
|
318
|
+
|
|
319
|
+
> Use kebab-case naming convention (e.g., `"about-page-meta"`).
|
|
320
|
+
|
|
321
|
+
#### Content (string | number | boolean | object | array | function)
|
|
322
|
+
|
|
323
|
+
The `content` property contains the actual dictionary data and supports:
|
|
324
|
+
|
|
325
|
+
- **Primitive values**: strings, numbers, booleans, null, undefined
|
|
326
|
+
- **Typed nodes**: Special content types using Intlayer's helper functions
|
|
327
|
+
- **Nested objects**: Complex data structures
|
|
328
|
+
- **Arrays**: Collections of content
|
|
329
|
+
- **Functions**: Dynamic content evaluation
|
|
330
|
+
|
|
331
|
+
### Optional Properties
|
|
332
|
+
|
|
333
|
+
#### `title` (string)
|
|
334
|
+
|
|
335
|
+
Human-readable title for the dictionary that helps identify it in editors and CMS systems. This is particularly useful when managing large numbers of dictionaries or when working with content management interfaces.
|
|
336
|
+
|
|
337
|
+
**Example:**
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
{
|
|
341
|
+
key: "about-page-meta",
|
|
342
|
+
title: "About Page Metadata",
|
|
343
|
+
content: { /* ... */ }
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
#### `description` (string)
|
|
348
|
+
|
|
349
|
+
Detailed description explaining the dictionary's purpose, usage guidelines, and any special considerations. This description is also used as context for AI-powered translation generation, making it valuable for maintaining translation quality and consistency.
|
|
350
|
+
|
|
351
|
+
**Example:**
|
|
352
|
+
|
|
353
|
+
```typescript
|
|
354
|
+
{
|
|
355
|
+
key: "about-page-meta",
|
|
356
|
+
description: [
|
|
357
|
+
"This dictionary manages the metadata of the About Page",
|
|
358
|
+
"Consider good practices for SEO:",
|
|
359
|
+
"- The title should be between 50 and 60 characters",
|
|
360
|
+
"- The description should be between 150 and 160 characters",
|
|
361
|
+
].join('\n'),
|
|
362
|
+
content: { /* ... */ }
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
#### `tags` (string[])
|
|
367
|
+
|
|
368
|
+
Array of strings for categorizing and organizing dictionaries. Tags provide additional context and can be used for filtering, searching, or organizing dictionaries in editors and CMS systems.
|
|
369
|
+
|
|
370
|
+
**Example:**
|
|
371
|
+
|
|
372
|
+
```typescript
|
|
373
|
+
{
|
|
374
|
+
key: "about-page-meta",
|
|
375
|
+
tags: ["metadata", "about-page", "seo"],
|
|
376
|
+
content: { /* ... */ }
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
#### `locale` (LocalesValues)
|
|
381
|
+
|
|
382
|
+
Transforms the dictionary into a per-locale dictionary where each field declared in the content will be automatically transformed into a translation node. When this property is set:
|
|
383
|
+
|
|
384
|
+
- The dictionary is treated as a single-locale dictionary
|
|
385
|
+
- Each field becomes a translation node for that specific locale
|
|
386
|
+
- You should NOT use translation nodes (`t()`) in the content when using this property
|
|
387
|
+
- If missing, the dictionary will be treated as a multilingual dictionary
|
|
388
|
+
|
|
389
|
+
> See [Per-Locale Content Declaration in Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/per_locale_file.md) for more information.
|
|
390
|
+
|
|
391
|
+
**Example:**
|
|
392
|
+
|
|
393
|
+
```json
|
|
394
|
+
// Per-locale dictionary
|
|
395
|
+
{
|
|
396
|
+
"key": "about-page",
|
|
397
|
+
"locale": "en",
|
|
398
|
+
"content": {
|
|
399
|
+
"title": "About Us", // This becomes a translation node for 'en'
|
|
400
|
+
"description": "Learn more about our company"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
#### `autoFill` (AutoFill)
|
|
406
|
+
|
|
407
|
+
Instructions for automatically filling dictionary content from external sources. This can be configured globally in `intlayer.config.ts` or per-dictionary. Supports multiple formats:
|
|
408
|
+
|
|
409
|
+
- **`true`**: Enable auto-fill for all locales
|
|
410
|
+
- **`string`**: Path to a single file or template with variables
|
|
411
|
+
- **`object`**: Per-locale file paths
|
|
412
|
+
|
|
413
|
+
**Examples:**
|
|
414
|
+
|
|
415
|
+
```json
|
|
416
|
+
// Enable for all locales
|
|
417
|
+
{
|
|
418
|
+
"autoFill": true
|
|
419
|
+
}
|
|
420
|
+
// Single file
|
|
421
|
+
{
|
|
422
|
+
"autoFill": "./translations/aboutPage.content.json"
|
|
423
|
+
}
|
|
424
|
+
// Template with variables
|
|
425
|
+
{
|
|
426
|
+
"autoFill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
|
|
427
|
+
}
|
|
428
|
+
// Fine per-locale configuration
|
|
429
|
+
{
|
|
430
|
+
"autoFill": {
|
|
431
|
+
"en": "./translations/en/aboutPage.content.json",
|
|
432
|
+
"fr": "./translations/fr/aboutPage.content.json",
|
|
433
|
+
"es": "./translations/es/aboutPage.content.json"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Available variables:**
|
|
439
|
+
|
|
440
|
+
- `{{locale}}` – Locale code (e.g. `fr`, `es`)
|
|
441
|
+
- `{{fileName}}` – File name (e.g. `example`)
|
|
442
|
+
- `{{key}}` – Dictionary key (e.g. `example`)
|
|
443
|
+
|
|
444
|
+
> See [Auto-Fill Configuration in Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/autoFill.md) for more information.
|
|
445
|
+
|
|
446
|
+
##### `priority` (number)
|
|
447
|
+
|
|
448
|
+
Indicates the priority of the dictionary for conflict resolution. When multiple dictionaries have the same key, the dictionary with the highest priority number will override the others. This is useful for managing content hierarchies and overrides.
|
|
449
|
+
|
|
450
|
+
**Example:**
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
// Base dictionary
|
|
454
|
+
{
|
|
455
|
+
key: "welcome-message",
|
|
456
|
+
priority: 1,
|
|
457
|
+
content: { message: "Welcome!" }
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Override dictionary
|
|
461
|
+
{
|
|
462
|
+
key: "welcome-message",
|
|
463
|
+
priority: 10,
|
|
464
|
+
content: { message: "Welcome to our premium service!" }
|
|
465
|
+
}
|
|
466
|
+
// This will override the base dictionary
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### CMS Properties
|
|
470
|
+
|
|
471
|
+
##### `version` (string)
|
|
472
|
+
|
|
473
|
+
Version identifier for remote dictionaries. Helps track which version of the dictionary is currently being used, especially useful when working with remote content management systems.
|
|
474
|
+
|
|
475
|
+
##### `live` (boolean)
|
|
476
|
+
|
|
477
|
+
For remote dictionaries, indicates if the dictionary should be fetched live at runtime. When enabled:
|
|
478
|
+
|
|
479
|
+
- Requires `importMode` to be set to "live" in `intlayer.config.ts`
|
|
480
|
+
- Requires a live server to be running
|
|
481
|
+
- Dictionary will be fetched at runtime using the live sync API
|
|
482
|
+
- If live but fetch fails, falls back to dynamic value
|
|
483
|
+
- If not live, dictionary is transformed at build time for optimal performance
|
|
484
|
+
|
|
485
|
+
### System Properties (Auto-generated)
|
|
486
|
+
|
|
487
|
+
These properties are automatically generated by Intlayer and should not be manually modified:
|
|
488
|
+
|
|
489
|
+
##### `$schema` (string)
|
|
490
|
+
|
|
491
|
+
JSON schema used for validation of the dictionary structure. Automatically added by Intlayer to ensure dictionary integrity.
|
|
492
|
+
|
|
493
|
+
##### `id` (string)
|
|
494
|
+
|
|
495
|
+
For remote dictionaries, this is the unique identifier of the dictionary in the remote server. Used for fetching and managing remote content.
|
|
496
|
+
|
|
497
|
+
##### `localId` (LocalDictionaryId)
|
|
498
|
+
|
|
499
|
+
Unique identifier for local dictionaries. Auto-generated by Intlayer to help identify the dictionary and determine if it's local or remote, along with its location.
|
|
500
|
+
|
|
501
|
+
##### `localIds` (LocalDictionaryId[])
|
|
502
|
+
|
|
503
|
+
For merged dictionaries, this array contains the IDs of all dictionaries that were merged together. Useful for tracking the source of merged content.
|
|
504
|
+
|
|
505
|
+
##### `filePath` (string)
|
|
506
|
+
|
|
507
|
+
The file path of the local dictionary, indicating which `.content` file the dictionary was generated from. Helps with debugging and source tracking.
|
|
508
|
+
|
|
509
|
+
##### `versions` (string[])
|
|
510
|
+
|
|
511
|
+
For remote dictionaries, this array contains all available versions of the dictionary. Helps track which versions are available for use.
|
|
512
|
+
|
|
513
|
+
##### `autoFilled` (true)
|
|
514
|
+
|
|
515
|
+
Indicates whether the dictionary has been auto-filled from external sources. In case of conflicts, base dictionaries will override auto-filled dictionaries.
|
|
516
|
+
|
|
517
|
+
##### `location` ('distant' | 'locale')
|
|
518
|
+
|
|
519
|
+
Indicates the location of the dictionary:
|
|
520
|
+
|
|
521
|
+
- `'locale'`: Local dictionary (from content files)
|
|
522
|
+
- `'distant'`: Remote dictionary (from external source)
|
|
523
|
+
|
|
524
|
+
## Content Node Types
|
|
525
|
+
|
|
526
|
+
Intlayer provides several specialized content node types that extend basic primitive values:
|
|
527
|
+
|
|
528
|
+
### Translation Content (`t`)
|
|
529
|
+
|
|
530
|
+
Multilingual content that varies by locale:
|
|
531
|
+
|
|
532
|
+
```typescript
|
|
533
|
+
import { t } from "intlayer";
|
|
534
|
+
|
|
535
|
+
// TypeScript/JavaScript
|
|
536
|
+
multilingualContent: t({
|
|
537
|
+
en: "Welcome to our website",
|
|
538
|
+
fr: "Bienvenue sur notre site web",
|
|
539
|
+
es: "Bienvenido a nuestro sitio web",
|
|
540
|
+
});
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Condition Content (`cond`)
|
|
544
|
+
|
|
545
|
+
Content that changes based on boolean conditions:
|
|
546
|
+
|
|
547
|
+
```typescript
|
|
548
|
+
import { cond } from "intlayer";
|
|
549
|
+
|
|
550
|
+
conditionalContent: cond({
|
|
551
|
+
true: "User is logged in",
|
|
552
|
+
false: "Please log in to continue",
|
|
553
|
+
});
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
### Enumeration Content (`enu`)
|
|
557
|
+
|
|
558
|
+
Content that varies based on enumerated values:
|
|
559
|
+
|
|
560
|
+
```typescript
|
|
561
|
+
import { enu } from "intlayer";
|
|
562
|
+
|
|
563
|
+
statusContent: enu({
|
|
564
|
+
pending: "Your request is pending",
|
|
565
|
+
approved: "Your request has been approved",
|
|
566
|
+
rejected: "Your request has been rejected",
|
|
567
|
+
});
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### Insertion Content (`insert`)
|
|
571
|
+
|
|
572
|
+
Content that can be inserted into other content:
|
|
573
|
+
|
|
574
|
+
```typescript
|
|
575
|
+
import { insert } from "intlayer";
|
|
576
|
+
|
|
577
|
+
insertionContent: insert("This text can be inserted anywhere");
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### Nested Content (`nest`)
|
|
581
|
+
|
|
582
|
+
References to other dictionaries:
|
|
583
|
+
|
|
584
|
+
```typescript
|
|
585
|
+
import { nest } from "intlayer";
|
|
586
|
+
|
|
587
|
+
nestedContent: nest("about-page");
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
### Markdown Content (`md`)
|
|
591
|
+
|
|
592
|
+
Rich text content in Markdown format:
|
|
593
|
+
|
|
594
|
+
```typescript
|
|
595
|
+
import { md } from "intlayer";
|
|
596
|
+
|
|
597
|
+
markdownContent: md(
|
|
598
|
+
"# Welcome\n\nThis is **bold** text with [links](https://example.com)"
|
|
599
|
+
);
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### Gender Content (`gender`)
|
|
603
|
+
|
|
604
|
+
Content that varies based on gender:
|
|
605
|
+
|
|
606
|
+
```typescript
|
|
607
|
+
import { gender } from "intlayer";
|
|
608
|
+
|
|
609
|
+
genderContent: gender({
|
|
610
|
+
male: "He is a developer",
|
|
611
|
+
female: "She is a developer",
|
|
612
|
+
other: "They are a developer",
|
|
613
|
+
});
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
### File Content (`file`)
|
|
617
|
+
|
|
618
|
+
References to external files:
|
|
619
|
+
|
|
620
|
+
```typescript
|
|
621
|
+
import { file } from "intlayer";
|
|
622
|
+
|
|
623
|
+
fileContent: file("./path/to/content.txt");
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## Creating Content Files
|
|
627
|
+
|
|
628
|
+
### Basic Content File Structure
|
|
629
|
+
|
|
630
|
+
A content file exports a default object that satisfies the `Dictionary` type:
|
|
631
|
+
|
|
632
|
+
```typescript
|
|
633
|
+
// example.content.ts
|
|
634
|
+
import { t, cond, nest, md, insert, file } from "intlayer";
|
|
635
|
+
|
|
636
|
+
export default {
|
|
637
|
+
key: "welcome-page",
|
|
638
|
+
title: "Welcome Page Content",
|
|
639
|
+
description:
|
|
640
|
+
"Content for the main welcome page including hero section and features",
|
|
641
|
+
tags: ["page", "welcome", "homepage"],
|
|
642
|
+
content: {
|
|
643
|
+
hero: {
|
|
644
|
+
title: t({
|
|
645
|
+
en: "Welcome to Our Platform",
|
|
646
|
+
fr: "Bienvenue sur Notre Plateforme",
|
|
647
|
+
es: "Bienvenido a Nuestra Plataforma",
|
|
648
|
+
}),
|
|
649
|
+
subtitle: t({
|
|
650
|
+
en: "Build amazing applications with ease",
|
|
651
|
+
fr: "Construisez des applications incroyables avec facilité",
|
|
652
|
+
es: "Construye aplicaciones increíbles con facilidad",
|
|
653
|
+
}),
|
|
654
|
+
cta: cond({
|
|
655
|
+
true: t({
|
|
656
|
+
en: "Get Started",
|
|
657
|
+
fr: "Commencer",
|
|
658
|
+
es: "Comenzar",
|
|
659
|
+
}),
|
|
660
|
+
false: t({
|
|
661
|
+
en: "Sign Up",
|
|
662
|
+
fr: "S'inscrire",
|
|
663
|
+
es: "Registrarse",
|
|
664
|
+
}),
|
|
665
|
+
}),
|
|
666
|
+
},
|
|
667
|
+
features: [
|
|
668
|
+
{
|
|
669
|
+
title: t({
|
|
670
|
+
en: "Easy to Use",
|
|
671
|
+
fr: "Facile à Utiliser",
|
|
672
|
+
es: "Fácil de Usar",
|
|
673
|
+
}),
|
|
674
|
+
description: t({
|
|
675
|
+
en: "Intuitive interface for all skill levels",
|
|
676
|
+
fr: "Interface intuitive pour tous les niveaux",
|
|
677
|
+
es: "Interfaz intuitiva para todos los niveles",
|
|
678
|
+
}),
|
|
679
|
+
},
|
|
680
|
+
],
|
|
681
|
+
documentation: nest("documentation"),
|
|
682
|
+
readme: file("./README.md"),
|
|
683
|
+
},
|
|
684
|
+
} satisfies Dictionary;
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
### JSON Content File
|
|
688
|
+
|
|
689
|
+
You can also create content files in JSON format:
|
|
690
|
+
|
|
691
|
+
```json
|
|
692
|
+
{
|
|
693
|
+
"key": "welcome-page",
|
|
694
|
+
"title": "Welcome Page Content",
|
|
695
|
+
"description": "Content for the main welcome page",
|
|
696
|
+
"tags": ["page", "welcome"],
|
|
697
|
+
"content": {
|
|
698
|
+
"hero": {
|
|
699
|
+
"title": {
|
|
700
|
+
"nodeType": "translation",
|
|
701
|
+
"translation": {
|
|
702
|
+
"en": "Welcome to Our Platform",
|
|
703
|
+
"fr": "Bienvenue sur Notre Plateforme"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"subtitle": {
|
|
707
|
+
"nodeType": "translation",
|
|
708
|
+
"translation": {
|
|
709
|
+
"en": "Build amazing applications with ease",
|
|
710
|
+
"fr": "Construisez des applications incroyables avec facilité"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### Per-Locale Content Files
|
|
719
|
+
|
|
720
|
+
For per-locale dictionaries, specify the `locale` property:
|
|
721
|
+
|
|
722
|
+
```typescript
|
|
723
|
+
// welcome-page.en.content.ts
|
|
724
|
+
export default {
|
|
725
|
+
key: "welcome-page",
|
|
726
|
+
locale: "en",
|
|
727
|
+
content: {
|
|
728
|
+
hero: {
|
|
729
|
+
title: "Welcome to Our Platform",
|
|
730
|
+
subtitle: "Build amazing applications with ease",
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
} satisfies Dictionary;
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
```typescript
|
|
737
|
+
// welcome-page.fr.content.ts
|
|
738
|
+
export default {
|
|
739
|
+
key: "welcome-page",
|
|
740
|
+
locale: "fr",
|
|
741
|
+
content: {
|
|
742
|
+
hero: {
|
|
743
|
+
title: "Bienvenue sur Notre Plateforme",
|
|
744
|
+
subtitle: "Construisez des applications incroyables avec facilité",
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
} satisfies Dictionary;
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
## Content File Extensions
|
|
751
|
+
|
|
752
|
+
Intlayer allows you to customize the extensions for your content declaration files. This customization provides flexibility in managing large-scale projects and helps to avoid conflicts with other modules.
|
|
753
|
+
|
|
754
|
+
### Default Extensions
|
|
755
|
+
|
|
756
|
+
By default, Intlayer watches all files with the following extensions for content declarations:
|
|
757
|
+
|
|
758
|
+
- `.content.json`
|
|
759
|
+
- `.content.ts`
|
|
760
|
+
- `.content.tsx`
|
|
761
|
+
- `.content.js`
|
|
762
|
+
- `.content.jsx`
|
|
763
|
+
- `.content.mjs`
|
|
764
|
+
- `.content.mjx`
|
|
765
|
+
- `.content.cjs`
|
|
766
|
+
- `.content.cjx`
|
|
767
|
+
|
|
768
|
+
These default extensions are suitable for most applications. However, when you have specific needs, you can define custom extensions to streamline the build process and reduce the risk of conflicts with other components.
|
|
769
|
+
|
|
770
|
+
> To customize the file extensions Intlayer uses to identify content declaration files, you can specify them in the Intlayer configuration file. This approach is beneficial for large-scale projects where limiting the scope of the watch process improves build performance.
|
|
771
|
+
|
|
772
|
+
## Advanced Concepts
|
|
773
|
+
|
|
774
|
+
### Dictionary Merging
|
|
775
|
+
|
|
776
|
+
When multiple dictionaries have the same key, Intlayer automatically merges them. The merging behavior depends on several factors:
|
|
777
|
+
|
|
778
|
+
- **Priority**: Dictionaries with higher `priority` values override those with lower values
|
|
779
|
+
- **Auto-fill vs Base**: Base dictionaries override auto-filled dictionaries
|
|
780
|
+
- **Location**: Local dictionaries override remote dictionaries (when priorities are equal)
|
|
781
|
+
|
|
782
|
+
### Type Safety
|
|
783
|
+
|
|
784
|
+
Intlayer provides full TypeScript support for content files:
|
|
785
|
+
|
|
786
|
+
```typescript
|
|
787
|
+
// Define your content type
|
|
788
|
+
interface WelcomePageContent {
|
|
789
|
+
hero: {
|
|
790
|
+
title: string;
|
|
791
|
+
subtitle: string;
|
|
792
|
+
cta: string;
|
|
793
|
+
};
|
|
794
|
+
features: Array<{
|
|
795
|
+
title: string;
|
|
796
|
+
description: string;
|
|
797
|
+
}>;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// Use it in your dictionary
|
|
801
|
+
export default {
|
|
802
|
+
key: "welcome-page",
|
|
803
|
+
content: {
|
|
804
|
+
// TypeScript will provide autocomplete and type checking
|
|
805
|
+
hero: {
|
|
806
|
+
title: "Welcome",
|
|
807
|
+
subtitle: "Build amazing apps",
|
|
808
|
+
cta: "Get Started",
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
} satisfies Dictionary<WelcomePageContent>;
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
### Node Imbrication
|
|
815
|
+
|
|
816
|
+
You can without problem imbricate functions into other ones.
|
|
817
|
+
|
|
818
|
+
Example :
|
|
819
|
+
|
|
820
|
+
```javascript fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
|
|
821
|
+
import { t, enu, cond, nest, md, type Dictionary } from "intlayer";
|
|
822
|
+
|
|
823
|
+
const getName = async () => "John Doe";
|
|
824
|
+
|
|
825
|
+
export default {
|
|
826
|
+
key: "page",
|
|
827
|
+
content: {
|
|
828
|
+
// `getIntlayer('page','en').hiMessage` returns `['Hi', ' ', 'John Doe']`
|
|
829
|
+
hiMessage: [
|
|
830
|
+
t({
|
|
831
|
+
en: "Hi",
|
|
832
|
+
fr: "Salut",
|
|
833
|
+
es: "Hola",
|
|
834
|
+
}),
|
|
835
|
+
" ",
|
|
836
|
+
getName(),
|
|
837
|
+
],
|
|
838
|
+
// Composite content imbricating condition, enumeration, and multilingual content
|
|
839
|
+
// `getIntlayer('page','en').advancedContent(true)(10) returns 'Multiple items found'`
|
|
840
|
+
advancedContent: cond({
|
|
841
|
+
true: enu({
|
|
842
|
+
"0": t({
|
|
843
|
+
en: "No items found",
|
|
844
|
+
fr: "Aucun article trouvé",
|
|
845
|
+
es: "No se encontraron artículos",
|
|
846
|
+
}),
|
|
847
|
+
"1": t({
|
|
848
|
+
en: "One item found",
|
|
849
|
+
fr: "Un article trouvé",
|
|
850
|
+
es: "Se encontró un artículo",
|
|
851
|
+
}),
|
|
852
|
+
">1": t({
|
|
853
|
+
en: "Multiple items found",
|
|
854
|
+
fr: "Plusieurs articles trouvés",
|
|
855
|
+
es: "Se encontraron múltiples artículos",
|
|
856
|
+
}),
|
|
857
|
+
}),
|
|
858
|
+
false: t({
|
|
859
|
+
en: "No valid data available",
|
|
860
|
+
fr: "Aucune donnée valide disponible",
|
|
861
|
+
es: "No hay datos válidos disponibles",
|
|
862
|
+
}),
|
|
863
|
+
}),
|
|
864
|
+
},
|
|
865
|
+
} satisfies Dictionary;
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
|
|
869
|
+
import { t, enu, cond, nest, md } from "intlayer";
|
|
870
|
+
|
|
871
|
+
const getName = async () => "John Doe";
|
|
872
|
+
|
|
873
|
+
/** @type {import('intlayer').Dictionary} */
|
|
874
|
+
export default {
|
|
875
|
+
key: "page",
|
|
876
|
+
content: {
|
|
877
|
+
// `getIntlayer('page','en').hiMessage` returns `['Hi', ' ', 'John Doe']`
|
|
878
|
+
hiMessage: [
|
|
879
|
+
t({
|
|
880
|
+
en: "Hi",
|
|
881
|
+
fr: "Salut",
|
|
882
|
+
es: "Hola",
|
|
883
|
+
}),
|
|
884
|
+
" ",
|
|
885
|
+
getName(),
|
|
886
|
+
],
|
|
887
|
+
// Composite content imbricating condition, enumeration, and multilingual content
|
|
888
|
+
// `getIntlayer('page','en').advancedContent(true)(10) returns 'Multiple items found'`
|
|
889
|
+
advancedContent: cond({
|
|
890
|
+
true: enu({
|
|
891
|
+
"0": t({
|
|
892
|
+
en: "No items found",
|
|
893
|
+
fr: "Aucun article trouvé",
|
|
894
|
+
es: "No se encontraron artículos",
|
|
895
|
+
}),
|
|
896
|
+
"1": t({
|
|
897
|
+
en: "One item found",
|
|
898
|
+
fr: "Un article trouvé",
|
|
899
|
+
es: "Se encontró un artículo",
|
|
900
|
+
}),
|
|
901
|
+
">1": t({
|
|
902
|
+
en: "Multiple items found",
|
|
903
|
+
fr: "Plusieurs articles trouvés",
|
|
904
|
+
es: "Se encontraron múltiples artículos",
|
|
905
|
+
}),
|
|
906
|
+
}),
|
|
907
|
+
false: t({
|
|
908
|
+
en: "No valid data available",
|
|
909
|
+
fr: "Aucune donnée valide disponible",
|
|
910
|
+
es: "No hay datos válidos disponibles",
|
|
911
|
+
}),
|
|
912
|
+
}),
|
|
913
|
+
},
|
|
914
|
+
};
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
|
|
918
|
+
const { t, enu, cond, nest, md } = require("intlayer");
|
|
919
|
+
|
|
920
|
+
const getName = async () => "John Doe";
|
|
921
|
+
|
|
922
|
+
/** @type {import('intlayer').Dictionary} */
|
|
923
|
+
module.exports = {
|
|
924
|
+
key: "page",
|
|
925
|
+
content: {
|
|
926
|
+
// `getIntlayer('page','en').hiMessage` returns `['Hi', ' ', 'John Doe']`
|
|
927
|
+
hiMessage: [
|
|
928
|
+
t({
|
|
929
|
+
en: "Hi",
|
|
930
|
+
fr: "Salut",
|
|
931
|
+
es: "Hola",
|
|
932
|
+
}),
|
|
933
|
+
" ",
|
|
934
|
+
getName(),
|
|
935
|
+
],
|
|
936
|
+
// Composite content imbricating condition, enumeration, and multilingual content
|
|
937
|
+
// `getIntlayer('page','en').advancedContent(true)(10) returns 'Multiple items found'`
|
|
938
|
+
advancedContent: cond({
|
|
939
|
+
true: enu({
|
|
940
|
+
"0": t({
|
|
941
|
+
en: "No items found",
|
|
942
|
+
fr: "Aucun article trouvé",
|
|
943
|
+
es: "No se encontraron artículos",
|
|
944
|
+
}),
|
|
945
|
+
"1": t({
|
|
946
|
+
en: "One item found",
|
|
947
|
+
fr: "Un article trouvé",
|
|
948
|
+
es: "Se encontró un artículo",
|
|
949
|
+
}),
|
|
950
|
+
">1": t({
|
|
951
|
+
en: "Multiple items found",
|
|
952
|
+
fr: "Plusieurs articles trouvés",
|
|
953
|
+
es: "Se encontraron múltiples artículos",
|
|
954
|
+
}),
|
|
955
|
+
}),
|
|
956
|
+
false: t({
|
|
957
|
+
en: "No valid data available",
|
|
958
|
+
fr: "Aucune donnée valide disponible",
|
|
959
|
+
es: "No hay datos válidos disponibles",
|
|
960
|
+
}),
|
|
961
|
+
}),
|
|
962
|
+
},
|
|
963
|
+
};
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
967
|
+
{
|
|
968
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
969
|
+
"key": "page",
|
|
970
|
+
"content": {
|
|
971
|
+
"hiMessage": {
|
|
972
|
+
"nodeType": "composite",
|
|
973
|
+
"composite": [
|
|
974
|
+
{
|
|
975
|
+
"nodeType": "translation",
|
|
976
|
+
"translation": {
|
|
977
|
+
"en": "Hi",
|
|
978
|
+
"fr": "Salut",
|
|
979
|
+
"es": "Hola",
|
|
980
|
+
},
|
|
981
|
+
},
|
|
982
|
+
" ",
|
|
983
|
+
"John Doe",
|
|
984
|
+
],
|
|
985
|
+
},
|
|
986
|
+
"advancedContent": {
|
|
987
|
+
"nodeType": "condition",
|
|
988
|
+
"condition": {
|
|
989
|
+
"true": {
|
|
990
|
+
"nodeType": "enumeration",
|
|
991
|
+
"enumeration": {
|
|
992
|
+
"0": {
|
|
993
|
+
"nodeType": "translation",
|
|
994
|
+
"translation": {
|
|
995
|
+
"en": "No items found",
|
|
996
|
+
"fr": "Aucun article trouvé",
|
|
997
|
+
"es": "No se encontraron artículos",
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
"1": {
|
|
1001
|
+
"nodeType": "translation",
|
|
1002
|
+
"translation": {
|
|
1003
|
+
"en": "One item found",
|
|
1004
|
+
"fr": "Un article trouvé",
|
|
1005
|
+
"es": "Se encontró un artículo",
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
">1": {
|
|
1009
|
+
"nodeType": "translation",
|
|
1010
|
+
"translation": {
|
|
1011
|
+
"en": "Multiple items found",
|
|
1012
|
+
"fr": "Plusieurs articles trouvés",
|
|
1013
|
+
"es": "Se encontraron múltiples artículos",
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
},
|
|
1017
|
+
},
|
|
1018
|
+
"false": {
|
|
1019
|
+
"nodeType": "translation",
|
|
1020
|
+
"translation": {
|
|
1021
|
+
"en": "No valid data available",
|
|
1022
|
+
"fr": "Aucune donnée valide disponible",
|
|
1023
|
+
"es": "No hay datos válidos disponibles",
|
|
1024
|
+
},
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
}
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
### Best Practices
|
|
1033
|
+
|
|
1034
|
+
1. **Naming Conventions**:
|
|
1035
|
+
- Use kebab-case for dictionary keys (`"about-page-meta"`)
|
|
1036
|
+
- Group related content under the same key prefix
|
|
1037
|
+
|
|
1038
|
+
2. **Content Organization**:
|
|
1039
|
+
- Keep related content together in the same dictionary
|
|
1040
|
+
- Use nested objects to organize complex content structures
|
|
1041
|
+
- Leverage tags for categorization
|
|
1042
|
+
- Use the `autoFill` to automatically fill the missing translations
|
|
1043
|
+
|
|
1044
|
+
3. **Performance**:
|
|
1045
|
+
- Ajust the content configuration to limit the scope of watched files
|
|
1046
|
+
- Use live dictionaries only when real-time updates are necessary, (e.g. A/B testing, etc.)
|
|
1047
|
+
- Ensure the build transformation plugin (`@intlayer/swc`, or `@intlayer/babel`) is enabled to optimize the dictionary at build time
|
|
1048
|
+
|
|
1049
|
+
## Doc History
|
|
1050
|
+
|
|
1051
|
+
| Version | Date | Changes |
|
|
1052
|
+
| ------- | ---------- | ------------------------ |
|
|
1053
|
+
| 6.0.0 | 2025-09-20 | Add fields documentation |
|
|
1054
|
+
| 5.5.10 | 2025-06-29 | Init history |
|