@intlayer/docs 5.8.1-canary.0 → 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 +13 -13
- 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,1055 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-02-07
|
|
3
|
+
updatedAt: 2025-09-20
|
|
4
|
+
title: İçerik Dosyası
|
|
5
|
+
description: İçerik bildirim dosyalarınız için uzantıları nasıl özelleştireceğinizi öğrenin. Projenizde koşulları verimli bir şekilde uygulamak için bu dokümantasyonu takip edin.
|
|
6
|
+
keywords:
|
|
7
|
+
- İçerik Dosyası
|
|
8
|
+
- Dokümantasyon
|
|
9
|
+
- Intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- doc
|
|
12
|
+
- concept
|
|
13
|
+
- content
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# İçerik Dosyası
|
|
17
|
+
|
|
18
|
+
<iframe title="i18n, Markdown, JSON… hepsini yönetmek için tek bir çözüm | 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
|
+
## İçerik Dosyası Nedir?
|
|
21
|
+
|
|
22
|
+
Intlayer'da bir içerik dosyası, sözlük tanımlarını içeren bir dosyadır.
|
|
23
|
+
Bu dosyalar, uygulamanızın metin içeriğini, çevirilerini ve kaynaklarını bildirir.
|
|
24
|
+
İçerik dosyaları, sözlükler oluşturmak için Intlayer tarafından işlenir.
|
|
25
|
+
|
|
26
|
+
Sözlükler, uygulamanızın `useIntlayer` kancasını kullanarak içe aktaracağı nihai sonuç olacaktır.
|
|
27
|
+
|
|
28
|
+
### Temel Kavramlar
|
|
29
|
+
|
|
30
|
+
#### Sözlük
|
|
31
|
+
|
|
32
|
+
Sözlük, anahtarlar tarafından organize edilmiş yapılandırılmış bir içerik koleksiyonudur. Her sözlük şunları içerir:
|
|
33
|
+
|
|
34
|
+
- **Anahtar**: Sözlük için benzersiz bir tanımlayıcı
|
|
35
|
+
- **İçerik**: Gerçek içerik değerleri (metin, sayılar, nesneler, vb.)
|
|
36
|
+
- **Meta Veriler**: Başlık, açıklama, etiketler gibi ek bilgiler
|
|
37
|
+
|
|
38
|
+
#### İçerik Dosyası
|
|
39
|
+
|
|
40
|
+
İçerik dosyası örneği:
|
|
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: "Merhaba Dünya",
|
|
81
|
+
numberContent: 123,
|
|
82
|
+
booleanContent: true,
|
|
83
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
multilingualContent: t({
|
|
87
|
+
en: "İngilizce içerik",
|
|
88
|
+
"en-GB": "İngilizce içerik (İngiltere)",
|
|
89
|
+
fr: "Fransızca içerik",
|
|
90
|
+
es: "İspanyolca içerik",
|
|
91
|
+
}),
|
|
92
|
+
quantityContent: enu({
|
|
93
|
+
"<-1": "Eksi birden az araba",
|
|
94
|
+
"-1": "Eksi bir araba",
|
|
95
|
+
"0": "Araba yok",
|
|
96
|
+
"1": "Bir araba",
|
|
97
|
+
">5": "Birkaç araba",
|
|
98
|
+
">19": "Birçok araba",
|
|
99
|
+
}),
|
|
100
|
+
conditionalContent: cond({
|
|
101
|
+
true: "Doğrulama etkin",
|
|
102
|
+
false: "Doğrulama devre dışı",
|
|
103
|
+
}),
|
|
104
|
+
insertionContent: insert("Merhaba {{name}}!"),
|
|
105
|
+
nestedContent: nest(
|
|
106
|
+
"navbar", // İç içe yerleştirilecek sözlüğün anahtarı
|
|
107
|
+
"login.button" // [İsteğe bağlı] İç içe yerleştirilecek içeriğin yolu
|
|
108
|
+
),
|
|
109
|
+
fileContent: file("./path/to/file.txt"),
|
|
110
|
+
externalContent: fetch("https://example.com").then((res) => res.json()),
|
|
111
|
+
markdownContent: md("# Markdown Örneği"),
|
|
112
|
+
|
|
113
|
+
/*
|
|
114
|
+
* Sadece `react-intlayer` veya `next-intlayer` kullanılarak mevcuttur
|
|
115
|
+
*/
|
|
116
|
+
jsxContent: <h1>Başlığım</h1>,
|
|
117
|
+
},
|
|
118
|
+
} satisfies Dictionary<Content>; // [isteğe bağlı] Dictionary generiktir ve sözlüğünüzün biçimlendirmesini güçlendirmenize olanak tanır
|
|
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: "İngilizce içerik",
|
|
139
|
+
"en-GB": "İngilizce içerik (İngiltere)",
|
|
140
|
+
fr: "Fransızca içerik",
|
|
141
|
+
es: "İspanyolca içerik",
|
|
142
|
+
}),
|
|
143
|
+
quantityContent: enu({
|
|
144
|
+
"<-1": "Eksi birden az araba",
|
|
145
|
+
"-1": "Eksi bir araba",
|
|
146
|
+
"0": "Araba yok",
|
|
147
|
+
"1": "Bir araba",
|
|
148
|
+
">5": "Birkaç araba",
|
|
149
|
+
">19": "Birçok araba",
|
|
150
|
+
}),
|
|
151
|
+
conditionalContent: cond({
|
|
152
|
+
true: "Doğrulama etkin",
|
|
153
|
+
false: "Doğrulama devre dışı",
|
|
154
|
+
}),
|
|
155
|
+
insertionContent: insert("Merhaba {{name}}!"),
|
|
156
|
+
nestedContent: nest(
|
|
157
|
+
"navbar", // İç içe yerleştirilecek sözlüğün anahtarı
|
|
158
|
+
"login.button" // [İsteğe bağlı] İç içe yerleştirilecek içeriğin yolu
|
|
159
|
+
),
|
|
160
|
+
markdownContent: md("# Markdown Örneği"),
|
|
161
|
+
fileContent: file("./path/to/file.txt"),
|
|
162
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
163
|
+
|
|
164
|
+
// Sadece `react-intlayer` veya `next-intlayer` kullanılırken mevcuttur
|
|
165
|
+
jsxContent: <h1>Başlığım</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: "Merhaba Dünya",
|
|
180
|
+
numberContent: 123,
|
|
181
|
+
booleanContent: true,
|
|
182
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
183
|
+
},
|
|
184
|
+
imbricatedArray: [1, 2, 3],
|
|
185
|
+
},
|
|
186
|
+
multilingualContent: t({
|
|
187
|
+
tr: "Türkçe içerik",
|
|
188
|
+
en: "English content",
|
|
189
|
+
"en-GB": "English content (UK)",
|
|
190
|
+
fr: "French content",
|
|
191
|
+
es: "Spanish content",
|
|
192
|
+
}),
|
|
193
|
+
quantityContent: enu({
|
|
194
|
+
"<-1": "Eksi birden az araba",
|
|
195
|
+
"-1": "Eksi bir araba",
|
|
196
|
+
"0": "Araba yok",
|
|
197
|
+
"1": "Bir araba",
|
|
198
|
+
">5": "Birkaç araba",
|
|
199
|
+
">19": "Birçok araba",
|
|
200
|
+
}),
|
|
201
|
+
conditionalContent: cond({
|
|
202
|
+
true: "Doğrulama etkin",
|
|
203
|
+
false: "Doğrulama devre dışı",
|
|
204
|
+
}),
|
|
205
|
+
insertionContent: insert("Merhaba {{name}}!"),
|
|
206
|
+
nestedContent: nest(
|
|
207
|
+
"navbar", // İç içe yerleştirilecek sözlüğün anahtarı
|
|
208
|
+
"login.button" // [İsteğe bağlı] İç içe yerleştirilecek içeriğin yolu
|
|
209
|
+
),
|
|
210
|
+
markdownContent: md("# Markdown Örneği"),
|
|
211
|
+
fileContent: file("./path/to/file.txt"),
|
|
212
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
213
|
+
|
|
214
|
+
// Sadece `react-intlayer` veya `next-intlayer` kullanılırken mevcuttur
|
|
215
|
+
jsxContent: <h1>Başlığım</h1>,
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
221
|
+
{
|
|
222
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
223
|
+
"key": "page",
|
|
224
|
+
"content": {
|
|
225
|
+
"imbricatedContent": {
|
|
226
|
+
"imbricatedContent2": {
|
|
227
|
+
"stringContent": "Merhaba Dünya",
|
|
228
|
+
"numberContent": 123,
|
|
229
|
+
"booleanContent": true,
|
|
230
|
+
},
|
|
231
|
+
"imbricatedArray": [1, 2, 3],
|
|
232
|
+
},
|
|
233
|
+
"multilingualContent": {
|
|
234
|
+
"nodeType": "translation",
|
|
235
|
+
"translation": {
|
|
236
|
+
"en": "English content",
|
|
237
|
+
"en-GB": "English content (UK)",
|
|
238
|
+
"fr": "French content",
|
|
239
|
+
"es": "Spanish content",
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
"quantityContent": {
|
|
243
|
+
"nodeType": "enumeration",
|
|
244
|
+
"enumeration": {
|
|
245
|
+
"0": "Araba yok",
|
|
246
|
+
"1": "Bir araba",
|
|
247
|
+
"<-1": "Eksi bir arabadan az",
|
|
248
|
+
"-1": "Eksi bir araba",
|
|
249
|
+
">5": "Birkaç araba",
|
|
250
|
+
">19": "Birçok araba",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
"conditionalContent": {
|
|
254
|
+
"nodeType": "condition",
|
|
255
|
+
"condition": {
|
|
256
|
+
"true": "Doğrulama etkin",
|
|
257
|
+
"false": "Doğrulama devre dışı",
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
"insertionContent": {
|
|
261
|
+
"nodeType": "insertion",
|
|
262
|
+
"insertion": "Merhaba {{name}}!",
|
|
263
|
+
},
|
|
264
|
+
"nestedContent": {
|
|
265
|
+
"nodeType": "nested",
|
|
266
|
+
"nested": { "dictionaryKey": "app" },
|
|
267
|
+
},
|
|
268
|
+
"markdownContent": {
|
|
269
|
+
"nodeType": "markdown",
|
|
270
|
+
"markdown": "# Markdown Örneği",
|
|
271
|
+
},
|
|
272
|
+
"fileContent": {
|
|
273
|
+
"nodeType": "file",
|
|
274
|
+
"file": "./path/to/file.txt",
|
|
275
|
+
},
|
|
276
|
+
"jsxContent": {
|
|
277
|
+
"type": "h1",
|
|
278
|
+
"key": null,
|
|
279
|
+
"ref": null,
|
|
280
|
+
"props": {
|
|
281
|
+
"children": ["Başlığım"],
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
#### İçerik Düğümleri
|
|
289
|
+
|
|
290
|
+
İçerik düğümleri, sözlük içeriğinin yapı taşlarıdır. Şunlar olabilirler:
|
|
291
|
+
|
|
292
|
+
- **İlkel değerler**: stringler, sayılar, booleanlar, null, undefined
|
|
293
|
+
- **Tiplenmiş düğümler**: Çeviriler, koşullar, markdown gibi özel içerik türleri
|
|
294
|
+
- **Fonksiyonlar**: Çalışma zamanında değerlendirilebilen dinamik içerik [bkz. Fonksiyon Getirme](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/function_fetching.md)
|
|
295
|
+
- **İç içe içerik**: Diğer sözlüklere referanslar
|
|
296
|
+
|
|
297
|
+
#### İçerik Türleri
|
|
298
|
+
|
|
299
|
+
Intlayer, tiplenmiş düğümler aracılığıyla çeşitli içerik türlerini destekler:
|
|
300
|
+
|
|
301
|
+
- **Çeviri İçeriği**: Yerel dil değerlerine sahip çok dilli metinler [bkz. Çeviri İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/translation_content.md)
|
|
302
|
+
- **Koşul İçeriği**: Boolean ifadelerine dayalı koşullu içerik [bkz. Koşul İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/condition_content.md)
|
|
303
|
+
- **Numaralandırma İçeriği**: Numaralandırılmış değerlere göre değişen içerik [bkz. Numaralandırma İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/enumeration_content.md)
|
|
304
|
+
- **Ekleme İçeriği**: Diğer içeriklere eklenebilen içerik [bkz. Ekleme İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/insertion_content.md)
|
|
305
|
+
- **Markdown İçeriği**: Markdown formatında zengin metin içeriği [bkz. Markdown İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/markdown_content.md)
|
|
306
|
+
- **İç İçe İçerik**: Diğer sözlüklere referanslar [bkz. İç İçe İçerik](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/nested_content.md)
|
|
307
|
+
- **Cinsiyet İçeriği**: Cinsiyete göre değişen içerik [bkz. Cinsiyet İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/gender_content.md)
|
|
308
|
+
- **Dosya İçeriği**: Harici dosyalara referanslar [bkz. Dosya İçeriği](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/file_content.md)
|
|
309
|
+
|
|
310
|
+
## Sözlük Yapısı
|
|
311
|
+
|
|
312
|
+
Intlayer'da bir sözlük, `Dictionary` türü ile tanımlanır ve davranışını kontrol eden birkaç özelliğe sahiptir:
|
|
313
|
+
|
|
314
|
+
### Gerekli Özellikler
|
|
315
|
+
|
|
316
|
+
#### `key` (string)
|
|
317
|
+
|
|
318
|
+
Sözlüğün tanımlayıcısıdır. Birden fazla sözlük aynı anahtara sahipse, Intlayer bunları otomatik olarak birleştirir.
|
|
319
|
+
|
|
320
|
+
> Kebab-case adlandırma kuralını kullanın (örneğin, `"about-page-meta"`).
|
|
321
|
+
|
|
322
|
+
#### Content (string | number | boolean | object | array | function)
|
|
323
|
+
|
|
324
|
+
`content` özelliği, gerçek sözlük verisini içerir ve aşağıdakileri destekler:
|
|
325
|
+
|
|
326
|
+
- **İlkel değerler**: stringler, sayılar, booleanlar, null, undefined
|
|
327
|
+
- **Tipli düğümler**: Intlayer'ın yardımcı fonksiyonlarıyla oluşturulan özel içerik türleri
|
|
328
|
+
- **İç içe nesneler**: Karmaşık veri yapıları
|
|
329
|
+
- **Diziler**: İçerik koleksiyonları
|
|
330
|
+
- **Fonksiyonlar**: Dinamik içerik değerlendirmesi
|
|
331
|
+
|
|
332
|
+
### İsteğe Bağlı Özellikler
|
|
333
|
+
|
|
334
|
+
#### `title` (string)
|
|
335
|
+
|
|
336
|
+
Sözlüğü tanımlayıcı, insan tarafından okunabilir başlık. Bu, özellikle çok sayıda sözlük yönetirken veya içerik yönetim arayüzleriyle çalışırken faydalıdır.
|
|
337
|
+
|
|
338
|
+
**Örnek:**
|
|
339
|
+
|
|
340
|
+
```typescript
|
|
341
|
+
{
|
|
342
|
+
key: "about-page-meta",
|
|
343
|
+
title: "Hakkında Sayfası Meta Verileri",
|
|
344
|
+
content: { /* ... */ }
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### `description` (string)
|
|
349
|
+
|
|
350
|
+
Sözlüğün amacını, kullanım yönergelerini ve özel hususları açıklayan ayrıntılı açıklama. Bu açıklama, yapay zeka destekli çeviri üretimi için bağlam olarak da kullanılır ve çeviri kalitesi ile tutarlılığının korunmasında değerlidir.
|
|
351
|
+
|
|
352
|
+
**Örnek:**
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
{
|
|
356
|
+
key: "about-page-meta",
|
|
357
|
+
description: [
|
|
358
|
+
"Bu sözlük Hakkında Sayfasının meta verilerini yönetir",
|
|
359
|
+
"SEO için iyi uygulamalar göz önünde bulundurulmalı:",
|
|
360
|
+
"- Başlık 50 ile 60 karakter arasında olmalıdır",
|
|
361
|
+
"- Açıklama 150 ile 160 karakter arasında olmalıdır",
|
|
362
|
+
].join('\n'),
|
|
363
|
+
content: { /* ... */ }
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
#### `tags` (string[])
|
|
368
|
+
|
|
369
|
+
Sözlükleri kategorize etmek ve düzenlemek için kullanılan string dizisi. Etiketler, ek bağlam sağlar ve editörlerde veya içerik yönetim sistemlerinde filtreleme, arama veya düzenleme için kullanılabilir.
|
|
370
|
+
|
|
371
|
+
**Örnek:**
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
{
|
|
375
|
+
key: "about-page-meta",
|
|
376
|
+
tags: ["metadata", "about-page", "seo"],
|
|
377
|
+
content: { /* ... */ }
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
#### `locale` (LocalesValues)
|
|
382
|
+
|
|
383
|
+
Sözlüğü, içerikte bildirilen her alanın otomatik olarak bir çeviri düğümüne dönüştürüleceği yerel bazlı bir sözlüğe dönüştürür. Bu özellik ayarlandığında:
|
|
384
|
+
|
|
385
|
+
- Sözlük tek bir yerel dil sözlüğü olarak işlenir
|
|
386
|
+
- Her alan, o belirli yerel dil için bir çeviri düğümü haline gelir
|
|
387
|
+
- Bu özellik kullanılırken içerikte çeviri düğümleri (`t()`) kullanmamalısınız
|
|
388
|
+
- Eğer belirtilmezse, sözlük çok dilli bir sözlük olarak işlenir
|
|
389
|
+
|
|
390
|
+
> Daha fazla bilgi için [Intlayer'da Yerel Dil Bazlı İçerik Bildirimi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/per_locale_file.md) sayfasına bakınız.
|
|
391
|
+
|
|
392
|
+
**Örnek:**
|
|
393
|
+
|
|
394
|
+
```json
|
|
395
|
+
// Yerel dil bazlı sözlük
|
|
396
|
+
{
|
|
397
|
+
"key": "about-page",
|
|
398
|
+
"locale": "en",
|
|
399
|
+
"content": {
|
|
400
|
+
"title": "About Us", // Bu 'en' için bir çeviri düğümü olur
|
|
401
|
+
"description": "Learn more about our company"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
#### `autoFill` (AutoFill)
|
|
407
|
+
|
|
408
|
+
Sözlük içeriğini harici kaynaklardan otomatik olarak doldurma talimatları. Bu, `intlayer.config.ts` içinde global olarak veya sözlük bazında yapılandırılabilir. Birden fazla formatı destekler:
|
|
409
|
+
|
|
410
|
+
- **`true`**: Tüm yerel diller için otomatik doldurmayı etkinleştirir
|
|
411
|
+
- **`string`**: Tek bir dosya yolu veya değişkenlerle şablon
|
|
412
|
+
- **`object`**: Yerel dil bazında dosya yolları
|
|
413
|
+
|
|
414
|
+
**Örnekler:**
|
|
415
|
+
|
|
416
|
+
```json
|
|
417
|
+
// Tüm yerel diller için etkinleştir
|
|
418
|
+
{
|
|
419
|
+
"autoFill": true
|
|
420
|
+
}
|
|
421
|
+
// Tek dosya
|
|
422
|
+
{
|
|
423
|
+
"autoFill": "./translations/aboutPage.content.json"
|
|
424
|
+
}
|
|
425
|
+
// Değişkenlerle şablon
|
|
426
|
+
{
|
|
427
|
+
"autoFill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
|
|
428
|
+
}
|
|
429
|
+
// Yerel dil bazında detaylı yapılandırma
|
|
430
|
+
{
|
|
431
|
+
"autoFill": {
|
|
432
|
+
"en": "./translations/en/aboutPage.content.json",
|
|
433
|
+
"fr": "./translations/fr/aboutPage.content.json",
|
|
434
|
+
"es": "./translations/es/aboutPage.content.json"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Kullanılabilir değişkenler:**
|
|
440
|
+
|
|
441
|
+
- `{{locale}}` – Yerel dil kodu (örneğin `fr`, `es`)
|
|
442
|
+
- `{{fileName}}` – Dosya adı (örneğin `example`)
|
|
443
|
+
- `{{key}}` – Sözlük anahtarı (örneğin `example`)
|
|
444
|
+
|
|
445
|
+
> Daha fazla bilgi için [Intlayer'da Otomatik Doldurma Yapılandırması](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/autoFill.md) sayfasına bakınız.
|
|
446
|
+
|
|
447
|
+
##### `priority` (sayı)
|
|
448
|
+
|
|
449
|
+
Çakışma çözümlemesi için sözlüğün önceliğini belirtir. Birden fazla sözlük aynı anahtara sahip olduğunda, en yüksek öncelik numarasına sahip sözlük diğerlerinin üzerine yazacaktır. Bu, içerik hiyerarşilerini ve geçersiz kılmaları yönetmek için faydalıdır.
|
|
450
|
+
|
|
451
|
+
**Örnek:**
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
// Temel sözlük
|
|
455
|
+
{
|
|
456
|
+
key: "welcome-message",
|
|
457
|
+
priority: 1,
|
|
458
|
+
content: { message: "Hoş geldiniz!" }
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Geçersiz kılma sözlüğü
|
|
462
|
+
{
|
|
463
|
+
key: "welcome-message",
|
|
464
|
+
priority: 10,
|
|
465
|
+
content: { message: "Premium hizmetimize hoş geldiniz!" }
|
|
466
|
+
}
|
|
467
|
+
// Bu, temel sözlüğün üzerine yazacaktır
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
### CMS Özellikleri
|
|
471
|
+
|
|
472
|
+
##### `version` (string)
|
|
473
|
+
|
|
474
|
+
Uzak sözlükler için sürüm tanımlayıcısı. Hangi sürümün kullanıldığını takip etmeye yardımcı olur, özellikle uzak içerik yönetim sistemleri ile çalışırken faydalıdır.
|
|
475
|
+
|
|
476
|
+
##### `live` (boolean)
|
|
477
|
+
|
|
478
|
+
Uzak sözlükler için, sözlüğün çalışma zamanında canlı olarak getirilip getirilmemesi gerektiğini belirtir. Etkinleştirildiğinde:
|
|
479
|
+
|
|
480
|
+
- `intlayer.config.ts` dosyasında `importMode`'un "live" olarak ayarlanmasını gerektirir
|
|
481
|
+
- Canlı bir sunucunun çalışıyor olmasını gerektirir
|
|
482
|
+
- Sözlük, çalışma zamanında canlı senkronizasyon API'si kullanılarak getirilir
|
|
483
|
+
- Canlı modda ancak getirme başarısız olursa, dinamik değere geri döner
|
|
484
|
+
- Canlı değilse, sözlük optimal performans için derleme zamanında dönüştürülür
|
|
485
|
+
|
|
486
|
+
### Sistem Özellikleri (Otomatik Oluşturuldu)
|
|
487
|
+
|
|
488
|
+
Bu özellikler Intlayer tarafından otomatik olarak oluşturulur ve manuel olarak değiştirilmemelidir:
|
|
489
|
+
|
|
490
|
+
##### `$schema` (string)
|
|
491
|
+
|
|
492
|
+
Sözlük yapısının doğrulanması için kullanılan JSON şeması. Sözlük bütünlüğünü sağlamak için Intlayer tarafından otomatik olarak eklenir.
|
|
493
|
+
|
|
494
|
+
##### `id` (string)
|
|
495
|
+
|
|
496
|
+
Uzak sözlükler için, uzak sunucudaki sözlüğün benzersiz tanımlayıcısıdır. Uzak içeriğin getirilmesi ve yönetilmesi için kullanılır.
|
|
497
|
+
|
|
498
|
+
##### `localId` (LocalDictionaryId)
|
|
499
|
+
|
|
500
|
+
Yerel sözlükler için benzersiz tanımlayıcı. Sözlüğü tanımlamaya ve yerel mi yoksa uzak mı olduğunu, ayrıca konumunu belirlemeye yardımcı olmak için Intlayer tarafından otomatik olarak oluşturulur.
|
|
501
|
+
|
|
502
|
+
##### `localIds` (LocalDictionaryId[])
|
|
503
|
+
|
|
504
|
+
Birleştirilmiş sözlükler için, bu dizi birleştirilen tüm sözlüklerin kimliklerini içerir. Birleştirilmiş içeriğin kaynağını takip etmek için faydalıdır.
|
|
505
|
+
|
|
506
|
+
##### `filePath` (string)
|
|
507
|
+
|
|
508
|
+
Yerel sözlüğün dosya yolu, sözlüğün hangi `.content` dosyasından oluşturulduğunu gösterir. Hata ayıklama ve kaynak takibi için yardımcı olur.
|
|
509
|
+
|
|
510
|
+
##### `versions` (string[])
|
|
511
|
+
|
|
512
|
+
Uzak sözlükler için, bu dizi sözlüğün mevcut tüm sürümlerini içerir. Hangi sürümlerin kullanılabilir olduğunu takip etmeye yardımcı olur.
|
|
513
|
+
|
|
514
|
+
##### `autoFilled` (true)
|
|
515
|
+
|
|
516
|
+
Sözlüğün dış kaynaklardan otomatik olarak doldurulup doldurulmadığını belirtir. Çakışma durumunda, temel sözlükler otomatik doldurulan sözlüklerin üzerine yazacaktır.
|
|
517
|
+
|
|
518
|
+
##### `location` ('distant' | 'locale')
|
|
519
|
+
|
|
520
|
+
Sözlüğün konumunu belirtir:
|
|
521
|
+
|
|
522
|
+
- `'locale'`: Yerel sözlük (içerik dosyalarından)
|
|
523
|
+
- `'distant'`: Uzak sözlük (harici kaynaktan)
|
|
524
|
+
|
|
525
|
+
## İçerik Düğüm Türleri
|
|
526
|
+
|
|
527
|
+
Intlayer, temel ilkel değerleri genişleten birkaç özel içerik düğüm türü sağlar:
|
|
528
|
+
|
|
529
|
+
### Çeviri İçeriği (`t`)
|
|
530
|
+
|
|
531
|
+
Yerel dile göre değişen çok dilli içerik:
|
|
532
|
+
|
|
533
|
+
```typescript
|
|
534
|
+
import { t } from "intlayer";
|
|
535
|
+
|
|
536
|
+
// TypeScript/JavaScript
|
|
537
|
+
multilingualContent: t({
|
|
538
|
+
en: "Welcome to our website",
|
|
539
|
+
fr: "Bienvenue sur notre site web",
|
|
540
|
+
es: "Bienvenido a nuestro sitio web",
|
|
541
|
+
});
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Koşul İçeriği (`cond`)
|
|
545
|
+
|
|
546
|
+
Boolean koşullara göre değişen içerik:
|
|
547
|
+
|
|
548
|
+
```typescript
|
|
549
|
+
import { cond } from "intlayer";
|
|
550
|
+
|
|
551
|
+
conditionalContent: cond({
|
|
552
|
+
true: "User is logged in",
|
|
553
|
+
false: "Please log in to continue",
|
|
554
|
+
});
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
### Numaralandırma İçeriği (`enu`)
|
|
558
|
+
|
|
559
|
+
Numaralandırılmış değerlere göre değişen içerik:
|
|
560
|
+
|
|
561
|
+
```typescript
|
|
562
|
+
import { enu } from "intlayer";
|
|
563
|
+
|
|
564
|
+
statusContent: enu({
|
|
565
|
+
pending: "İsteğiniz beklemede",
|
|
566
|
+
approved: "İsteğiniz onaylandı",
|
|
567
|
+
rejected: "İsteğiniz reddedildi",
|
|
568
|
+
});
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Ekleme İçeriği (`insert`)
|
|
572
|
+
|
|
573
|
+
Başka içeriklere eklenebilen içerik:
|
|
574
|
+
|
|
575
|
+
```typescript
|
|
576
|
+
import { insert } from "intlayer";
|
|
577
|
+
|
|
578
|
+
insertionContent: insert("Bu metin herhangi bir yere eklenebilir");
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### İç İçe İçerik (`nest`)
|
|
582
|
+
|
|
583
|
+
Diğer sözlüklere referanslar:
|
|
584
|
+
|
|
585
|
+
```typescript
|
|
586
|
+
import { nest } from "intlayer";
|
|
587
|
+
|
|
588
|
+
nestedContent: nest("about-page");
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### Markdown İçeriği (`md`)
|
|
592
|
+
|
|
593
|
+
Markdown formatında zengin metin içeriği:
|
|
594
|
+
|
|
595
|
+
```typescript
|
|
596
|
+
import { md } from "intlayer";
|
|
597
|
+
|
|
598
|
+
markdownContent: md(
|
|
599
|
+
"# Hoşgeldiniz\n\nBu, [bağlantılar](https://example.com) içeren **kalın** metindir"
|
|
600
|
+
);
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### Cinsiyete Göre İçerik (`gender`)
|
|
604
|
+
|
|
605
|
+
Cinsiyete göre değişen içerik:
|
|
606
|
+
|
|
607
|
+
```typescript
|
|
608
|
+
import { gender } from "intlayer";
|
|
609
|
+
|
|
610
|
+
genderContent: gender({
|
|
611
|
+
male: "O bir geliştiricidir",
|
|
612
|
+
female: "O bir geliştiricidir",
|
|
613
|
+
other: "Onlar bir geliştiricidir",
|
|
614
|
+
});
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### Dosya İçeriği (`file`)
|
|
618
|
+
|
|
619
|
+
Harici dosyalara referanslar:
|
|
620
|
+
|
|
621
|
+
```typescript
|
|
622
|
+
import { file } from "intlayer";
|
|
623
|
+
|
|
624
|
+
fileContent: file("./path/to/content.txt");
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
## İçerik Dosyaları Oluşturma
|
|
628
|
+
|
|
629
|
+
### Temel İçerik Dosyası Yapısı
|
|
630
|
+
|
|
631
|
+
Bir içerik dosyası, `Dictionary` tipini karşılayan varsayılan bir nesne ihraç eder:
|
|
632
|
+
|
|
633
|
+
```typescript
|
|
634
|
+
// example.content.ts
|
|
635
|
+
import { t, cond, nest, md, insert, file } from "intlayer";
|
|
636
|
+
|
|
637
|
+
export default {
|
|
638
|
+
key: "welcome-page",
|
|
639
|
+
title: "Hoşgeldiniz Sayfası İçeriği",
|
|
640
|
+
description:
|
|
641
|
+
"Kahraman bölüm ve özellikler dahil olmak üzere ana karşılama sayfası için içerik",
|
|
642
|
+
tags: ["sayfa", "karşılama", "anasayfa"],
|
|
643
|
+
content: {
|
|
644
|
+
hero: {
|
|
645
|
+
title: t({
|
|
646
|
+
en: "Welcome to Our Platform",
|
|
647
|
+
fr: "Bienvenue sur Notre Plateforme",
|
|
648
|
+
es: "Bienvenido a Nuestra Plataforma",
|
|
649
|
+
}),
|
|
650
|
+
subtitle: t({
|
|
651
|
+
en: "Build amazing applications with ease",
|
|
652
|
+
fr: "Construisez des applications incroyables avec facilité",
|
|
653
|
+
es: "Construye aplicaciones increíbles con facilidad",
|
|
654
|
+
}),
|
|
655
|
+
cta: cond({
|
|
656
|
+
true: t({
|
|
657
|
+
en: "Get Started",
|
|
658
|
+
fr: "Commencer",
|
|
659
|
+
es: "Comenzar",
|
|
660
|
+
}),
|
|
661
|
+
false: t({
|
|
662
|
+
en: "Sign Up",
|
|
663
|
+
fr: "S'inscrire",
|
|
664
|
+
es: "Registrarse",
|
|
665
|
+
}),
|
|
666
|
+
}),
|
|
667
|
+
},
|
|
668
|
+
features: [
|
|
669
|
+
{
|
|
670
|
+
title: t({
|
|
671
|
+
en: "Easy to Use",
|
|
672
|
+
fr: "Facile à Utiliser",
|
|
673
|
+
es: "Fácil de Usar",
|
|
674
|
+
}),
|
|
675
|
+
description: t({
|
|
676
|
+
en: "Intuitive interface for all skill levels",
|
|
677
|
+
fr: "Interface intuitive pour tous les niveaux",
|
|
678
|
+
es: "Interfaz intuitiva para todos los niveles",
|
|
679
|
+
}),
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
documentation: nest("documentation"),
|
|
683
|
+
readme: file("./README.md"),
|
|
684
|
+
},
|
|
685
|
+
} satisfies Dictionary;
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
### JSON İçerik Dosyası
|
|
689
|
+
|
|
690
|
+
İçerik dosyalarını JSON formatında da oluşturabilirsiniz:
|
|
691
|
+
|
|
692
|
+
```json
|
|
693
|
+
{
|
|
694
|
+
"key": "welcome-page",
|
|
695
|
+
"title": "Hoşgeldiniz Sayfası İçeriği",
|
|
696
|
+
"description": "Ana karşılama sayfası için içerik",
|
|
697
|
+
"tags": ["sayfa", "karşılama"],
|
|
698
|
+
"content": {
|
|
699
|
+
"hero": {
|
|
700
|
+
"title": {
|
|
701
|
+
"nodeType": "translation",
|
|
702
|
+
"translation": {
|
|
703
|
+
"en": "Platformumuza Hoş Geldiniz",
|
|
704
|
+
"fr": "Bienvenue sur Notre Plateforme"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"subtitle": {
|
|
708
|
+
"nodeType": "translation",
|
|
709
|
+
"translation": {
|
|
710
|
+
"en": "Harika uygulamaları kolayca oluşturun",
|
|
711
|
+
"fr": "Construisez des applications incroyables avec facilité"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
### Yerel İçerik Dosyaları
|
|
720
|
+
|
|
721
|
+
Yerel sözlükler için `locale` özelliğini belirtin:
|
|
722
|
+
|
|
723
|
+
```typescript
|
|
724
|
+
// welcome-page.en.content.ts
|
|
725
|
+
export default {
|
|
726
|
+
key: "welcome-page",
|
|
727
|
+
locale: "en",
|
|
728
|
+
content: {
|
|
729
|
+
hero: {
|
|
730
|
+
title: "Platformumuza Hoş Geldiniz",
|
|
731
|
+
subtitle: "Harika uygulamaları kolayca oluşturun",
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
} satisfies Dictionary;
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
```typescript
|
|
738
|
+
// welcome-page.fr.content.ts
|
|
739
|
+
export default {
|
|
740
|
+
key: "welcome-page",
|
|
741
|
+
locale: "fr",
|
|
742
|
+
content: {
|
|
743
|
+
hero: {
|
|
744
|
+
title: "Bienvenue sur Notre Plateforme",
|
|
745
|
+
subtitle: "Construisez des applications incroyables avec facilité",
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
} satisfies Dictionary;
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
## İçerik Dosyası Uzantıları
|
|
752
|
+
|
|
753
|
+
Intlayer, içerik bildirim dosyalarınız için uzantıları özelleştirmenize olanak tanır. Bu özelleştirme, büyük ölçekli projeleri yönetmede esneklik sağlar ve diğer modüllerle çakışmaları önlemeye yardımcı olur.
|
|
754
|
+
|
|
755
|
+
### Varsayılan Uzantılar
|
|
756
|
+
|
|
757
|
+
Varsayılan olarak, Intlayer içerik bildirimleri için aşağıdaki uzantılara sahip tüm dosyaları izler:
|
|
758
|
+
|
|
759
|
+
- `.content.json`
|
|
760
|
+
- `.content.ts`
|
|
761
|
+
- `.content.tsx`
|
|
762
|
+
- `.content.js`
|
|
763
|
+
- `.content.jsx`
|
|
764
|
+
- `.content.mjs`
|
|
765
|
+
- `.content.mjx`
|
|
766
|
+
- `.content.cjs`
|
|
767
|
+
- `.content.cjx`
|
|
768
|
+
|
|
769
|
+
Bu varsayılan uzantılar çoğu uygulama için uygundur. Ancak, özel ihtiyaçlarınız olduğunda, derleme sürecini kolaylaştırmak ve diğer bileşenlerle çakışma riskini azaltmak için özel uzantılar tanımlayabilirsiniz.
|
|
770
|
+
|
|
771
|
+
> Intlayer'ın içerik bildirim dosyalarını tanımlamak için kullandığı dosya uzantılarını özelleştirmek için, bunları Intlayer yapılandırma dosyasında belirtebilirsiniz. Bu yaklaşım, izleme işleminin kapsamını sınırlamanın derleme performansını artırdığı büyük ölçekli projeler için faydalıdır.
|
|
772
|
+
|
|
773
|
+
## Gelişmiş Kavramlar
|
|
774
|
+
|
|
775
|
+
### Sözlük Birleştirme
|
|
776
|
+
|
|
777
|
+
Birden fazla sözlük aynı anahtara sahip olduğunda, Intlayer bunları otomatik olarak birleştirir. Birleştirme davranışı birkaç faktöre bağlıdır:
|
|
778
|
+
|
|
779
|
+
- **Öncelik**: Daha yüksek `priority` değerine sahip sözlükler, daha düşük değerlere sahip olanların yerine geçer
|
|
780
|
+
- **Otomatik doldurma vs Temel**: Temel sözlükler, otomatik doldurulan sözlüklerin üzerine yazar
|
|
781
|
+
- **Konum**: Yerel sözlükler, öncelikler eşit olduğunda uzak sözlüklerin üzerine yazar
|
|
782
|
+
|
|
783
|
+
### Tür Güvenliği
|
|
784
|
+
|
|
785
|
+
Intlayer, içerik dosyaları için tam TypeScript desteği sağlar:
|
|
786
|
+
|
|
787
|
+
```typescript
|
|
788
|
+
// İçerik türünüzü tanımlayın
|
|
789
|
+
interface WelcomePageContent {
|
|
790
|
+
hero: {
|
|
791
|
+
title: string;
|
|
792
|
+
subtitle: string;
|
|
793
|
+
cta: string;
|
|
794
|
+
};
|
|
795
|
+
features: Array<{
|
|
796
|
+
title: string;
|
|
797
|
+
description: string;
|
|
798
|
+
}>;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// Sözlüğünüzde kullanın
|
|
802
|
+
export default {
|
|
803
|
+
key: "welcome-page",
|
|
804
|
+
content: {
|
|
805
|
+
// TypeScript otomatik tamamlama ve tür denetimi sağlar
|
|
806
|
+
hero: {
|
|
807
|
+
title: "Hoşgeldiniz",
|
|
808
|
+
subtitle: "Harika uygulamalar geliştirin",
|
|
809
|
+
cta: "Başlayın",
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
} satisfies Dictionary<WelcomePageContent>;
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
### Düğüm İç İçe Geçirme
|
|
816
|
+
|
|
817
|
+
Fonksiyonları sorunsuzca birbirinin içine yerleştirebilirsiniz.
|
|
818
|
+
|
|
819
|
+
Örnek:
|
|
820
|
+
|
|
821
|
+
```javascript fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
|
|
822
|
+
import { t, enu, cond, nest, md, type Dictionary } from "intlayer";
|
|
823
|
+
|
|
824
|
+
const getName = async () => "John Doe";
|
|
825
|
+
|
|
826
|
+
export default {
|
|
827
|
+
key: "page",
|
|
828
|
+
content: {
|
|
829
|
+
// `getIntlayer('page','en').hiMessage` `['Hi', ' ', 'John Doe']` döner
|
|
830
|
+
hiMessage: [
|
|
831
|
+
t({
|
|
832
|
+
en: "Hi",
|
|
833
|
+
fr: "Salut",
|
|
834
|
+
es: "Hola",
|
|
835
|
+
}),
|
|
836
|
+
" ",
|
|
837
|
+
getName(),
|
|
838
|
+
],
|
|
839
|
+
// Koşul, numaralandırma ve çok dilli içeriği iç içe geçiren bileşik içerik
|
|
840
|
+
// `getIntlayer('page','en').advancedContent(true)(10)` 'Multiple items found' döner
|
|
841
|
+
advancedContent: cond({
|
|
842
|
+
true: enu({
|
|
843
|
+
"0": t({
|
|
844
|
+
en: "No items found",
|
|
845
|
+
fr: "Aucun article trouvé",
|
|
846
|
+
es: "No se encontraron artículos",
|
|
847
|
+
}),
|
|
848
|
+
"1": t({
|
|
849
|
+
en: "One item found",
|
|
850
|
+
fr: "Un article trouvé",
|
|
851
|
+
es: "Se encontró un artículo",
|
|
852
|
+
}),
|
|
853
|
+
">1": t({
|
|
854
|
+
en: "Multiple items found",
|
|
855
|
+
fr: "Plusieurs articles trouvés",
|
|
856
|
+
es: "Se encontraron múltiples artículos",
|
|
857
|
+
}),
|
|
858
|
+
}),
|
|
859
|
+
false: t({
|
|
860
|
+
en: "No valid data available",
|
|
861
|
+
fr: "Aucune donnée valide disponible",
|
|
862
|
+
es: "No hay datos válidos disponibles",
|
|
863
|
+
}),
|
|
864
|
+
}),
|
|
865
|
+
},
|
|
866
|
+
} satisfies Dictionary;
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
|
|
870
|
+
import { t, enu, cond, nest, md } from "intlayer";
|
|
871
|
+
|
|
872
|
+
const getName = async () => "John Doe";
|
|
873
|
+
|
|
874
|
+
/** @type {import('intlayer').Dictionary} */
|
|
875
|
+
export default {
|
|
876
|
+
key: "page",
|
|
877
|
+
content: {
|
|
878
|
+
// `getIntlayer('page','en').hiMessage` `['Hi', ' ', 'John Doe']` döner
|
|
879
|
+
hiMessage: [
|
|
880
|
+
t({
|
|
881
|
+
en: "Hi",
|
|
882
|
+
fr: "Salut",
|
|
883
|
+
es: "Hola",
|
|
884
|
+
}),
|
|
885
|
+
" ",
|
|
886
|
+
getName(),
|
|
887
|
+
],
|
|
888
|
+
// Koşul, numaralandırma ve çok dilli içeriği iç içe geçen bileşik içerik
|
|
889
|
+
// `getIntlayer('page','en').advancedContent(true)(10)` 'Multiple items found' döner
|
|
890
|
+
advancedContent: cond({
|
|
891
|
+
true: enu({
|
|
892
|
+
"0": t({
|
|
893
|
+
en: "No items found",
|
|
894
|
+
fr: "Aucun article trouvé",
|
|
895
|
+
es: "No se encontraron artículos",
|
|
896
|
+
}),
|
|
897
|
+
"1": t({
|
|
898
|
+
en: "One item found",
|
|
899
|
+
fr: "Un article trouvé",
|
|
900
|
+
es: "Se encontró un artículo",
|
|
901
|
+
}),
|
|
902
|
+
">1": t({
|
|
903
|
+
en: "Birden fazla öğe bulundu",
|
|
904
|
+
fr: "Plusieurs articles trouvés",
|
|
905
|
+
es: "Se encontraron múltiples artículos",
|
|
906
|
+
}),
|
|
907
|
+
}),
|
|
908
|
+
false: t({
|
|
909
|
+
en: "Geçerli veri yok",
|
|
910
|
+
fr: "Aucune donnée valide disponible",
|
|
911
|
+
es: "No hay datos válidos disponibles",
|
|
912
|
+
}),
|
|
913
|
+
}),
|
|
914
|
+
},
|
|
915
|
+
};
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
|
|
919
|
+
const { t, enu, cond, nest, md } = require("intlayer");
|
|
920
|
+
|
|
921
|
+
const getName = async () => "John Doe";
|
|
922
|
+
|
|
923
|
+
/** @type {import('intlayer').Dictionary} */
|
|
924
|
+
module.exports = {
|
|
925
|
+
key: "page",
|
|
926
|
+
content: {
|
|
927
|
+
// `getIntlayer('page','en').hiMessage` `['Hi', ' ', 'John Doe']` döner
|
|
928
|
+
hiMessage: [
|
|
929
|
+
t({
|
|
930
|
+
en: "Hi",
|
|
931
|
+
fr: "Salut",
|
|
932
|
+
es: "Hola",
|
|
933
|
+
}),
|
|
934
|
+
" ",
|
|
935
|
+
getName(),
|
|
936
|
+
],
|
|
937
|
+
// Koşul, numaralandırma ve çok dilli içeriği iç içe geçiren bileşik içerik
|
|
938
|
+
// `getIntlayer('page','en').advancedContent(true)(10)` 'Birden fazla öğe bulundu' döner
|
|
939
|
+
advancedContent: cond({
|
|
940
|
+
true: enu({
|
|
941
|
+
"0": t({
|
|
942
|
+
en: "Öğe bulunamadı",
|
|
943
|
+
fr: "Aucun article trouvé",
|
|
944
|
+
es: "No se encontraron artículos",
|
|
945
|
+
}),
|
|
946
|
+
"1": t({
|
|
947
|
+
en: "Bir öğe bulundu",
|
|
948
|
+
fr: "Un article trouvé",
|
|
949
|
+
es: "Se encontró un artículo",
|
|
950
|
+
}),
|
|
951
|
+
">1": t({
|
|
952
|
+
en: "Birden fazla öğe bulundu",
|
|
953
|
+
fr: "Plusieurs articles trouvés",
|
|
954
|
+
es: "Se encontraron múltiples artículos",
|
|
955
|
+
}),
|
|
956
|
+
}),
|
|
957
|
+
false: t({
|
|
958
|
+
en: "Geçerli veri yok",
|
|
959
|
+
fr: "Aucune donnée valide disponible",
|
|
960
|
+
es: "No hay datos válidos disponibles",
|
|
961
|
+
}),
|
|
962
|
+
}),
|
|
963
|
+
},
|
|
964
|
+
};
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
968
|
+
{
|
|
969
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
970
|
+
"key": "page",
|
|
971
|
+
"content": {
|
|
972
|
+
"hiMessage": {
|
|
973
|
+
"nodeType": "composite",
|
|
974
|
+
"composite": [
|
|
975
|
+
{
|
|
976
|
+
"nodeType": "translation",
|
|
977
|
+
"translation": {
|
|
978
|
+
en: "Merhaba",
|
|
979
|
+
fr: "Salut",
|
|
980
|
+
es: "Hola",
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
" ",
|
|
984
|
+
"John Doe",
|
|
985
|
+
],
|
|
986
|
+
},
|
|
987
|
+
"advancedContent": {
|
|
988
|
+
"nodeType": "condition",
|
|
989
|
+
"condition": {
|
|
990
|
+
"true": {
|
|
991
|
+
"nodeType": "enumeration",
|
|
992
|
+
"enumeration": {
|
|
993
|
+
"0": {
|
|
994
|
+
"nodeType": "translation",
|
|
995
|
+
"translation": {
|
|
996
|
+
"en": "Öğe bulunamadı",
|
|
997
|
+
"fr": "Aucun article trouvé",
|
|
998
|
+
"es": "No se encontraron artículos",
|
|
999
|
+
},
|
|
1000
|
+
},
|
|
1001
|
+
"1": {
|
|
1002
|
+
"nodeType": "translation",
|
|
1003
|
+
"translation": {
|
|
1004
|
+
"en": "Bir öğe bulundu",
|
|
1005
|
+
"fr": "Un article trouvé",
|
|
1006
|
+
"es": "Se encontró un artículo",
|
|
1007
|
+
},
|
|
1008
|
+
},
|
|
1009
|
+
">1": {
|
|
1010
|
+
"nodeType": "translation",
|
|
1011
|
+
"translation": {
|
|
1012
|
+
"en": "Birden fazla öğe bulundu",
|
|
1013
|
+
"fr": "Plusieurs articles trouvés",
|
|
1014
|
+
"es": "Se encontraron múltiples artículos",
|
|
1015
|
+
},
|
|
1016
|
+
},
|
|
1017
|
+
},
|
|
1018
|
+
},
|
|
1019
|
+
"false": {
|
|
1020
|
+
"nodeType": "translation",
|
|
1021
|
+
"translation": {
|
|
1022
|
+
"en": "Geçerli veri yok",
|
|
1023
|
+
"fr": "Aucune donnée valide disponible",
|
|
1024
|
+
"es": "No hay datos válidos disponibles",
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
},
|
|
1030
|
+
}
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
### En İyi Uygulamalar
|
|
1034
|
+
|
|
1035
|
+
1. **İsimlendirme Kuralları**:
|
|
1036
|
+
- Sözlük anahtarları için kebab-case kullanın (`"about-page-meta"`)
|
|
1037
|
+
- İlgili içeriği aynı anahtar ön eki altında gruplayın
|
|
1038
|
+
|
|
1039
|
+
2. **İçerik Organizasyonu**:
|
|
1040
|
+
- İlgili içeriği aynı sözlükte birlikte tutun
|
|
1041
|
+
- Karmaşık içerik yapıları için iç içe nesneler kullanın
|
|
1042
|
+
- Kategorilendirme için etiketlerden yararlanın
|
|
1043
|
+
- Eksik çevirileri otomatik doldurmak için `autoFill` kullanın
|
|
1044
|
+
|
|
1045
|
+
3. **Performans**:
|
|
1046
|
+
- İzlenen dosyaların kapsamını sınırlamak için içerik yapılandırmasını ayarlayın
|
|
1047
|
+
- Gerçek zamanlı güncellemeler gerektiğinde (örneğin A/B testi vb.) yalnızca canlı sözlükleri kullanın
|
|
1048
|
+
- Sözlüğü derleme zamanında optimize etmek için derleme dönüşüm eklentisinin (`@intlayer/swc` veya `@intlayer/babel`) etkin olduğundan emin olun
|
|
1049
|
+
|
|
1050
|
+
## Belge Geçmişi
|
|
1051
|
+
|
|
1052
|
+
| Sürüm | Tarih | Değişiklikler |
|
|
1053
|
+
| ------ | ---------- | ------------------------------ |
|
|
1054
|
+
| 6.0.0 | 2025-09-20 | Alanlar dokümantasyonu eklendi |
|
|
1055
|
+
| 5.5.10 | 2025-06-29 | Başlangıç geçmişi |
|