@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,354 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-09-07
|
|
3
|
+
updatedAt: 2025-09-07
|
|
4
|
+
title: t Fonksiyonu Dokümantasyonu | next-intlayer
|
|
5
|
+
description: next-intlayer paketi için t fonksiyonunun nasıl kullanılacağını görün
|
|
6
|
+
keywords:
|
|
7
|
+
- t
|
|
8
|
+
- çeviri
|
|
9
|
+
- Intlayer
|
|
10
|
+
- next-intlayer
|
|
11
|
+
- Uluslararasılaştırma
|
|
12
|
+
- Dokümantasyon
|
|
13
|
+
- Next.js
|
|
14
|
+
- JavaScript
|
|
15
|
+
- React
|
|
16
|
+
slugs:
|
|
17
|
+
- doc
|
|
18
|
+
- packages
|
|
19
|
+
- next-intlayer
|
|
20
|
+
- t
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Dokümantasyon: `next-intlayer` Paketinde `t` Fonksiyonu
|
|
24
|
+
|
|
25
|
+
`next-intlayer` paketindeki `t` fonksiyonu, Next.js uygulamanızda satır içi uluslararasılaştırma için temel bir araçtır. Bileşenlerinizde doğrudan çevirileri tanımlamanıza olanak tanır, mevcut yerel ayara göre yerelleştirilmiş içeriği görüntülemeyi basitleştirir.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Genel Bakış
|
|
30
|
+
|
|
31
|
+
`t` fonksiyonu, bileşenlerinizde farklı yerel ayarlar için çevirileri doğrudan sağlamak için kullanılır. Desteklenen her yerel ayar için çeviriler içeren bir nesne geçirerek, `t` Next.js uygulamanızdaki mevcut yerel bağlamına göre uygun çeviriyi döndürür.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Temel Özellikler
|
|
36
|
+
|
|
37
|
+
- **Satır İçi Çeviriler**: Ayrı bir içerik bildirimi gerektirmeyen hızlı, satır içi metin için idealdir.
|
|
38
|
+
- **Otomatik Yerel Seçim**: Mevcut yerel ayara karşılık gelen çeviriyi otomatik olarak döndürür.
|
|
39
|
+
- **TypeScript Desteği**: TypeScript ile kullanıldığında tür güvenliği ve otomatik tamamlama sağlar.
|
|
40
|
+
- **Kolay Entegrasyon**: Next.js'te hem istemci hem de sunucu bileşenlerinde sorunsuz çalışır.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Fonksiyon İmzası
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
t<T extends string>(content: Record<LocalesValues, T>, locale?: Locales): string
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parametreler
|
|
51
|
+
|
|
52
|
+
- `translations`: Anahtarların yerel kodlar (örneğin `en`, `fr`, `es`) ve değerlerin karşılık gelen çevrilmiş dizeler olduğu bir nesne.
|
|
53
|
+
|
|
54
|
+
### Döndürür
|
|
55
|
+
|
|
56
|
+
- Mevcut yerel ayar için çevrilmiş içeriği temsil eden bir dize.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Kullanım Örnekleri
|
|
61
|
+
|
|
62
|
+
### İstemci Bileşeninde `t` Kullanımı
|
|
63
|
+
|
|
64
|
+
İstemci tarafı bileşeninde `t` kullanırken, dosyanızın en üstüne `'use client';` yönergesini eklediğinizden emin olun.
|
|
65
|
+
|
|
66
|
+
```tsx codeFormat="typescript"
|
|
67
|
+
"use client";
|
|
68
|
+
|
|
69
|
+
import type { FC } from "react";
|
|
70
|
+
import { t } from "next-intlayer";
|
|
71
|
+
|
|
72
|
+
export const ClientComponentExample: FC = () => (
|
|
73
|
+
<p>
|
|
74
|
+
{t({
|
|
75
|
+
en: "This is the content of a client component example",
|
|
76
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
77
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
78
|
+
})}
|
|
79
|
+
</p>
|
|
80
|
+
);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```javascript codeFormat="esm"
|
|
84
|
+
import { t } from "next-intlayer";
|
|
85
|
+
|
|
86
|
+
const ClientComponentExample = () => (
|
|
87
|
+
<p>
|
|
88
|
+
{t({
|
|
89
|
+
en: "This is the content of a client component example",
|
|
90
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
91
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
92
|
+
})}
|
|
93
|
+
</p>
|
|
94
|
+
);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```javascript codeFormat="commonjs"
|
|
98
|
+
const { t } = require("next-intlayer");
|
|
99
|
+
|
|
100
|
+
const ClientComponentExample = () => (
|
|
101
|
+
<p>
|
|
102
|
+
{t({
|
|
103
|
+
en: "This is the content of a client component example",
|
|
104
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
105
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
106
|
+
})}
|
|
107
|
+
</p>
|
|
108
|
+
);
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Sunucu Bileşeninde `t` Kullanımı
|
|
112
|
+
|
|
113
|
+
```tsx codeFormat="typescript"
|
|
114
|
+
import type { FC } from "react";
|
|
115
|
+
import { t } from "next-intlayer/server";
|
|
116
|
+
|
|
117
|
+
export const ServerComponentExample: FC = () => (
|
|
118
|
+
<p>
|
|
119
|
+
{t({
|
|
120
|
+
en: "This is the content of a server component example",
|
|
121
|
+
fr: "Ceci est le contenu d'un exemple de composant serveur",
|
|
122
|
+
es: "Este es el contenido de un ejemplo de componente servidor",
|
|
123
|
+
})}
|
|
124
|
+
</p>
|
|
125
|
+
);
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```javascript codeFormat="esm"
|
|
129
|
+
import { t } from "next-intlayer/server";
|
|
130
|
+
|
|
131
|
+
const ServerComponentExample = () => (
|
|
132
|
+
<p>
|
|
133
|
+
{t({
|
|
134
|
+
en: "This is the content of a server component example",
|
|
135
|
+
fr: "Ceci est le contenu d'un exemple de composant serveur",
|
|
136
|
+
es: "Este es el contenido de un ejemplo de componente servidor",
|
|
137
|
+
})}
|
|
138
|
+
</p>
|
|
139
|
+
);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```javascript codeFormat="commonjs"
|
|
143
|
+
const { t } = require("next-intlayer/server");
|
|
144
|
+
|
|
145
|
+
const ServerComponentExample = () => (
|
|
146
|
+
<p>
|
|
147
|
+
{t({
|
|
148
|
+
en: "This is the content of a server component example",
|
|
149
|
+
fr: "Ceci est le contenu d'un exemple de composant serveur",
|
|
150
|
+
es: "Este es el contenido de un ejemplo de componente servidor",
|
|
151
|
+
})}
|
|
152
|
+
</p>
|
|
153
|
+
);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Özelliklerde Satır İçi Çeviriler
|
|
157
|
+
|
|
158
|
+
`t` fonksiyonu, JSX özelliklerinde satır içi çeviriler için özellikle kullanışlıdır.
|
|
159
|
+
`alt`, `title`, `href` veya `aria-label` gibi özellikleri yerelleştirirken, `t`'yi doğrudan özellik içinde kullanabilirsiniz.
|
|
160
|
+
|
|
161
|
+
```jsx
|
|
162
|
+
<button
|
|
163
|
+
aria-label={t({
|
|
164
|
+
en: "Submit",
|
|
165
|
+
fr: "Soumettre",
|
|
166
|
+
es: "Enviar",
|
|
167
|
+
})}
|
|
168
|
+
>
|
|
169
|
+
{t({
|
|
170
|
+
en: "Submit",
|
|
171
|
+
fr: "Soumettre",
|
|
172
|
+
es: "Enviar",
|
|
173
|
+
})}
|
|
174
|
+
<img
|
|
175
|
+
src="/path/to/image"
|
|
176
|
+
alt={t({
|
|
177
|
+
en: "A beautiful scenery",
|
|
178
|
+
fr: "Un beau paysage",
|
|
179
|
+
es: "Un hermoso paisaje",
|
|
180
|
+
})}
|
|
181
|
+
/>
|
|
182
|
+
</button>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Gelişmiş Konular
|
|
188
|
+
|
|
189
|
+
### TypeScript Entegrasyonu
|
|
190
|
+
|
|
191
|
+
`t` fonksiyonu TypeScript ile kullanıldığında tür güvenlidir, tüm gerekli yerel ayarların sağlandığından emin olur.
|
|
192
|
+
|
|
193
|
+
```typescript codeFormat="typescript"
|
|
194
|
+
import type { IConfigLocales } from "intlayer";
|
|
195
|
+
import { t } from "next-intlayer";
|
|
196
|
+
|
|
197
|
+
const translations: IConfigLocales<string> = {
|
|
198
|
+
en: "Welcome",
|
|
199
|
+
fr: "Bienvenue",
|
|
200
|
+
es: "Bienvenido",
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const greeting = t(translations);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```javascript codeFormat="esm"
|
|
207
|
+
import type { IConfigLocales } from "intlayer";
|
|
208
|
+
import { t } from "next-intlayer";
|
|
209
|
+
|
|
210
|
+
/** @type {import('next-intlayer').IConfigLocales<string>} */
|
|
211
|
+
const translations = {
|
|
212
|
+
en: "Welcome",
|
|
213
|
+
fr: "Bienvenue",
|
|
214
|
+
es: "Bienvenido",
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const greeting = t(translations);
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```javascript codeFormat="commonjs"
|
|
221
|
+
const { t } = require("next-intlayer");
|
|
222
|
+
|
|
223
|
+
/** @type {import('next-intlayer').IConfigLocales<string>} */
|
|
224
|
+
const translations = {
|
|
225
|
+
en: "Welcome",
|
|
226
|
+
fr: "Bienvenue",
|
|
227
|
+
es: "Bienvenido",
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const greeting = t(translations);
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Yerel Algılama ve Bağlam
|
|
234
|
+
|
|
235
|
+
`next-intlayer`'da, mevcut yerel ayar bağlam sağlayıcıları aracılığıyla yönetilir: `IntlayerClientProvider` ve `IntlayerServerProvider`. Bileşenlerinizi bu sağlayıcıların sardığından ve `locale` özelliğinin doğru şekilde geçirildiğinden emin olun.
|
|
236
|
+
|
|
237
|
+
#### Örnek:
|
|
238
|
+
|
|
239
|
+
```tsx codeFormat="typescript"
|
|
240
|
+
import type { FC } from "react";
|
|
241
|
+
import type { Locales } from "intlayer";
|
|
242
|
+
import { IntlayerClientProvider } from "next-intlayer";
|
|
243
|
+
import { IntlayerServerProvider } from "next-intlayer/server";
|
|
244
|
+
|
|
245
|
+
const Page: FC<{ locale: Locales }> = ({ locale }) => (
|
|
246
|
+
<IntlayerServerProvider locale={locale}>
|
|
247
|
+
<IntlayerClientProvider locale={locale}>
|
|
248
|
+
{/* Bileşenleriniz burada */}
|
|
249
|
+
</IntlayerClientProvider>
|
|
250
|
+
</IntlayerServerProvider>
|
|
251
|
+
);
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
```javascript codeFormat="esm"
|
|
255
|
+
import { IntlayerClientProvider } from "next-intlayer";
|
|
256
|
+
import { IntlayerServerProvider } from "next-intlayer/server";
|
|
257
|
+
|
|
258
|
+
const Page = ({ locale }) => (
|
|
259
|
+
<IntlayerServerProvider locale={locale}>
|
|
260
|
+
<IntlayerClientProvider locale={locale}>
|
|
261
|
+
{/* Bileşenleriniz burada */}
|
|
262
|
+
</IntlayerClientProvider>
|
|
263
|
+
</IntlayerServerProvider>
|
|
264
|
+
);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
```javascript codeFormat="commonjs"
|
|
268
|
+
const { IntlayerClientProvider } = require("next-intlayer");
|
|
269
|
+
const { IntlayerServerProvider } = require("next-intlayer/server");
|
|
270
|
+
|
|
271
|
+
const Page = ({ locale }) => (
|
|
272
|
+
<IntlayerServerProvider locale={locale}>
|
|
273
|
+
<IntlayerClientProvider locale={locale}>
|
|
274
|
+
{/* Bileşenleriniz burada */}
|
|
275
|
+
</IntlayerClientProvider>
|
|
276
|
+
</IntlayerServerProvider>
|
|
277
|
+
);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Yaygın Hatalar ve Sorun Giderme
|
|
283
|
+
|
|
284
|
+
### `t` Tanımsız veya Yanlış Çeviri Döndürüyor
|
|
285
|
+
|
|
286
|
+
- **Neden**: Mevcut yerel ayar doğru şekilde ayarlanmamış veya mevcut yerel ayar için çeviri eksik.
|
|
287
|
+
- **Çözüm**:
|
|
288
|
+
- `IntlayerClientProvider` veya `IntlayerServerProvider`'ın uygun `locale` ile doğru şekilde kurulduğunu doğrulayın.
|
|
289
|
+
- Çeviriler nesnenizin gerekli tüm yerel ayarları içerdiğinden emin olun.
|
|
290
|
+
|
|
291
|
+
### TypeScript'te Eksik Çeviriler
|
|
292
|
+
|
|
293
|
+
- **Neden**: Çeviriler nesnesi gerekli yerel ayarları karşılamıyor, TypeScript hatalarına yol açıyor.
|
|
294
|
+
- **Çözüm**: Çevirilerinizin eksiksizliğini zorunlu kılmak için `IConfigLocales` türünü kullanın.
|
|
295
|
+
|
|
296
|
+
```typescript codeFormat="typescript"
|
|
297
|
+
const translations: IConfigLocales<string> = {
|
|
298
|
+
en: "Text",
|
|
299
|
+
fr: "Texte",
|
|
300
|
+
// es: 'Texto', // Eksik 'es' TypeScript hatasına neden olur [!code error]
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
const text = t(translations);
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
```javascript codeFormat="esm"
|
|
307
|
+
const translations = {
|
|
308
|
+
en: "Text",
|
|
309
|
+
fr: "Texte",
|
|
310
|
+
// es: 'Texto', // Eksik 'es' TypeScript hatasına neden olur [!code error]
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
const text = t(translations);
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
```javascript codeFormat="commonjs"
|
|
317
|
+
const { t } = require("next-intlayer");
|
|
318
|
+
|
|
319
|
+
/** @type {import('next-intlayer').IConfigLocales<string>} */
|
|
320
|
+
const translations = {
|
|
321
|
+
en: "Text",
|
|
322
|
+
fr: "Texte",
|
|
323
|
+
// es: 'Texto', // Eksik 'es' TypeScript hatasına neden olur [!code error]
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
const text = t(translations);
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Etkili Kullanım İçin İpuçları
|
|
332
|
+
|
|
333
|
+
1. **Basit Satır İçi Çeviriler İçin `t` Kullanın**: Bileşenlerinizde doğrudan küçük metin parçalarını çevirmek için idealdir.
|
|
334
|
+
2. **Yapılandırılmış İçerik İçin `useIntlayer` Tercih Edin**: Daha karmaşık çeviriler ve içerik yeniden kullanımı için, içeriği bildirim dosyalarında tanımlayın ve `useIntlayer` kullanın.
|
|
335
|
+
3. **Tutarlı Yerel Sağlama**: Uygulamanızda yerel ayarınızın uygun sağlayıcılar aracılığıyla tutarlı şekilde sağlandığından emin olun.
|
|
336
|
+
4. **TypeScript'i Kullanın**: Eksik çevirileri yakalamak ve tür güvenliğini sağlamak için TypeScript türlerini kullanın.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Sonuç
|
|
341
|
+
|
|
342
|
+
`next-intlayer`'daki `t` fonksiyonu, Next.js uygulamalarınızda satır içi çevirileri yönetmek için güçlü ve kullanışlı bir araçtır. Bunu etkili bir şekilde entegre ederek, uygulamanızın uluslararasılaştırma yeteneklerini geliştirir, dünya çapındaki kullanıcılar için daha iyi bir deneyim sağlar.
|
|
343
|
+
|
|
344
|
+
Daha detaylı kullanım ve gelişmiş özellikler için [next-intlayer dokümantasyonuna](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/intlayer_visual_editor.md) bakın.
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
**Not**: `t` fonksiyonunun doğru çevirileri döndürmesi için mevcut yerel ayarınızın bileşenlerinize doğru şekilde aktarıldığından emin olun. Bu, `IntlayerClientProvider` ve `IntlayerServerProvider`'ı düzgün şekilde kurmak için çok önemlidir.
|
|
349
|
+
|
|
350
|
+
## Doküman Geçmişi
|
|
351
|
+
|
|
352
|
+
| Sürüm | Tarih | Değişiklikler |
|
|
353
|
+
| ------ | ---------- | ----------------- |
|
|
354
|
+
| 5.5.10 | 2025-06-29 | Geçmiş başlatıldı |
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-09-07
|
|
3
|
+
updatedAt: 2025-09-07
|
|
4
|
+
title: useDictionary Hook Dokümantasyonu | next-intlayer
|
|
5
|
+
description: next-intlayer paketi için useDictionary hook'unun nasıl kullanılacağını görün
|
|
6
|
+
keywords:
|
|
7
|
+
- useDictionary
|
|
8
|
+
- dictionary
|
|
9
|
+
- key
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Uluslararasılaştırma
|
|
12
|
+
- Dokümantasyon
|
|
13
|
+
- Next.js
|
|
14
|
+
- JavaScript
|
|
15
|
+
- React
|
|
16
|
+
slugs:
|
|
17
|
+
- doc
|
|
18
|
+
- packages
|
|
19
|
+
- next-intlayer
|
|
20
|
+
- useDictionary
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# React Entegrasyonu: `useDictionary` Hook Dokümantasyonu
|
|
24
|
+
|
|
25
|
+
Bu bölüm, görsel düzenleyici olmadan yerelleştirilmiş içeriği verimli bir şekilde yönetmek için React uygulamalarında `useDictionary` hook'unun kullanımına ilişkin detaylı rehberlik sağlar.
|
|
26
|
+
|
|
27
|
+
## React'te `useDictionary` İçe Aktarma
|
|
28
|
+
|
|
29
|
+
`useDictionary` hook'u, bağlama göre içe aktararak React uygulamalarına entegre edilebilir:
|
|
30
|
+
|
|
31
|
+
- **İstemci Bileşeni:**
|
|
32
|
+
|
|
33
|
+
```typescript codeFormat="typescript"
|
|
34
|
+
import { useDictionary } from "next-intlayer"; // İstemci tarafı React bileşenlerinde kullanılır
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```javascript codeFormat="esm"
|
|
38
|
+
import { useDictionary } from "next-intlayer"; // İstemci tarafı React bileşenlerinde kullanılır
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```javascript codeFormat="commonjs"
|
|
42
|
+
const { useDictionary } = require("next-intlayer"); // İstemci tarafı React bileşenlerinde kullanılır
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- **Sunucu Bileşeni:**
|
|
46
|
+
|
|
47
|
+
```typescript codeFormat="typescript"
|
|
48
|
+
import { useDictionary } from "next-intlayer/server"; // Sunucu tarafı React bileşenlerinde kullanılır
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```javascript codeFormat="esm"
|
|
52
|
+
import { useDictionary } from "next-intlayer/server"; // Sunucu tarafı React bileşenlerinde kullanılır
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```javascript codeFormat="commonjs"
|
|
56
|
+
const { useDictionary } = require("next-intlayer/server"); // Sunucu tarafı React bileşenlerinde kullanılır
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Parametreler
|
|
60
|
+
|
|
61
|
+
Hook iki parametre kabul eder:
|
|
62
|
+
|
|
63
|
+
1. **`dictionary`**: Belirli anahtarlar için yerelleştirilmiş içerik içeren bildirilen bir sözlük nesnesi.
|
|
64
|
+
2. **`locale`** (isteğe bağlı): İstenen yerel ayar. Belirtilmezse, mevcut bağlamın yerel ayarına varsayılan olur.
|
|
65
|
+
|
|
66
|
+
## Sözlük
|
|
67
|
+
|
|
68
|
+
Tüm sözlük nesneleri, tür güvenliğini sağlamak ve çalışma zamanı hatalarını önlemek için yapılandırılmış içerik dosyalarında bildirilmelidir. [Kurulum talimatlarını burada](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/get_started.md) bulabilirsiniz. İşte içerik bildirimi örneği:
|
|
69
|
+
|
|
70
|
+
```typescript fileName="component.content.ts" codeFormat="typescript"
|
|
71
|
+
import { t, type Dictionary } from "intlayer";
|
|
72
|
+
|
|
73
|
+
const exampleContent = {
|
|
74
|
+
key: "component-example",
|
|
75
|
+
content: {
|
|
76
|
+
title: t({
|
|
77
|
+
en: "Client Component Example",
|
|
78
|
+
fr: "Exemple de composant client",
|
|
79
|
+
es: "Ejemplo de componente cliente",
|
|
80
|
+
}),
|
|
81
|
+
content: t({
|
|
82
|
+
en: "This is the content of a client component example",
|
|
83
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
84
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
85
|
+
}),
|
|
86
|
+
},
|
|
87
|
+
} satisfies Dictionary;
|
|
88
|
+
|
|
89
|
+
export default exampleContent;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```javascript fileName="component.content.mjs" contentDeclarationFormat="esm"
|
|
93
|
+
import { t } from "intlayer";
|
|
94
|
+
|
|
95
|
+
/** @type {import('intlayer').Dictionary} */
|
|
96
|
+
const exampleContent = {
|
|
97
|
+
key: "component-example",
|
|
98
|
+
content: {
|
|
99
|
+
title: t({
|
|
100
|
+
en: "Client Component Example",
|
|
101
|
+
fr: "Exemple de composant client",
|
|
102
|
+
es: "Ejemplo de componente cliente",
|
|
103
|
+
}),
|
|
104
|
+
content: t({
|
|
105
|
+
en: "This is the content of a client component example",
|
|
106
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
107
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
108
|
+
}),
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default exampleContent;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```javascript fileName="component.content.cjs" contentDeclarationFormat="commonjs"
|
|
116
|
+
const { t } = require("intlayer");
|
|
117
|
+
|
|
118
|
+
/** @type {import('intlayer').Dictionary} */
|
|
119
|
+
const exampleContent = {
|
|
120
|
+
key: "component-example",
|
|
121
|
+
content: {
|
|
122
|
+
title: t({
|
|
123
|
+
en: "Client Component Example",
|
|
124
|
+
fr: "Exemple de composant client",
|
|
125
|
+
es: "Ejemplo de componente cliente",
|
|
126
|
+
}),
|
|
127
|
+
content: t({
|
|
128
|
+
en: "This is the content of a client component example",
|
|
129
|
+
fr: "Ceci est le contenu d'un exemple de composant client",
|
|
130
|
+
es: "Este es el contenido de un ejemplo de componente cliente",
|
|
131
|
+
}),
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
module.exports = exampleContent;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## React İstemci Bileşeninde Örnek Kullanım
|
|
139
|
+
|
|
140
|
+
Aşağıda `useDictionary` hook'unun bir React bileşeninde nasıl kullanılacağına ilişkin bir örnek verilmiştir:
|
|
141
|
+
|
|
142
|
+
```tsx fileName="ClientComponentExample.tsx" codeFormat="typescript"
|
|
143
|
+
"use client";
|
|
144
|
+
|
|
145
|
+
import type { FC } from "react";
|
|
146
|
+
import { useDictionary } from "next-intlayer";
|
|
147
|
+
import clientComponentExampleContent from "./component.content";
|
|
148
|
+
|
|
149
|
+
const ClientComponentExample: FC = () => {
|
|
150
|
+
const { title, content } = useDictionary(clientComponentExampleContent);
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<div>
|
|
154
|
+
<h1>{title}</h1>
|
|
155
|
+
<p>{content}</p>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```javascript fileName="ClientComponentExample.mjs" codeFormat="esm"
|
|
162
|
+
"use client";
|
|
163
|
+
|
|
164
|
+
import type { FC } from "react";
|
|
165
|
+
import { useDictionary } from "next-intlayer";
|
|
166
|
+
import exampleContent from "./component.content";
|
|
167
|
+
|
|
168
|
+
const ClientComponentExample: FC = () => {
|
|
169
|
+
const { title, content } = useDictionary(exampleContent);
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<div>
|
|
173
|
+
<h1>{title}</h1>
|
|
174
|
+
<p>{content}</p>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
```javascript fileName="ClientComponentExample.cjs" codeFormat="commonjs"
|
|
181
|
+
"use client";
|
|
182
|
+
|
|
183
|
+
const { useDictionary } = require("next-intlayer");
|
|
184
|
+
const exampleContent = require("./component.content");
|
|
185
|
+
|
|
186
|
+
const ClientComponentExample = () => {
|
|
187
|
+
const { title, content } = useDictionary(exampleContent);
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<div>
|
|
191
|
+
<h1>{title}</h1>
|
|
192
|
+
<p>{content}</p>
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## React Sunucu Bileşeninde Örnek Kullanım
|
|
199
|
+
|
|
200
|
+
`useDictionary` hook'unu `IntlayerServerProvider` dışında kullanıyorsanız, bileşeni işlerken yerel ayar açıkça parametre olarak sağlanmalıdır:
|
|
201
|
+
|
|
202
|
+
```tsx fileName="ServerComponentExample.tsx" codeFormat="typescript"
|
|
203
|
+
import type { FC } from "react";
|
|
204
|
+
import { useDictionary } from "next-intlayer/server";
|
|
205
|
+
import clientComponentExampleContent from "./component.content";
|
|
206
|
+
|
|
207
|
+
const ServerComponentExample: FC = () => {
|
|
208
|
+
const { content } = useDictionary(clientComponentExampleContent);
|
|
209
|
+
|
|
210
|
+
return (
|
|
211
|
+
<div>
|
|
212
|
+
<h1>{content.title}</h1>
|
|
213
|
+
<p>{content.content}</p>
|
|
214
|
+
</div>
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```javascript fileName="ServerComponentExample.mjs" codeFormat="esm"
|
|
220
|
+
import { useDictionary } from "next-intlayer/server";
|
|
221
|
+
import clientComponentExampleContent from "./component.content";
|
|
222
|
+
|
|
223
|
+
const ServerComponentExample = () => {
|
|
224
|
+
const { content } = useDictionary(clientComponentExampleContent);
|
|
225
|
+
|
|
226
|
+
return (
|
|
227
|
+
<div>
|
|
228
|
+
<h1>{content.title}</h1>
|
|
229
|
+
<p>{content.content}</p>
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
```javascript fileName="ServerComponentExample.cjs" codeFormat="commonjs"
|
|
236
|
+
import { useDictionary } from "next-intlayer/server";
|
|
237
|
+
import clientComponentExampleContent from "./component.content";
|
|
238
|
+
|
|
239
|
+
const ServerComponentExample = () => {
|
|
240
|
+
const { content } = useDictionary(clientComponentExampleContent);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
<div>
|
|
244
|
+
<h1>{content.title}</h1>
|
|
245
|
+
<p>{content.content}</p>
|
|
246
|
+
</div>
|
|
247
|
+
);
|
|
248
|
+
};
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Özellikler Hakkında Notlar
|
|
252
|
+
|
|
253
|
+
Görsel düzenleyiciler kullanan entegrasyonların aksine, `buttonTitle.value` gibi özellikler burada uygulanmaz. Bunun yerine, içeriği doğrudan bildirildiğiniz gibi erişin.
|
|
254
|
+
|
|
255
|
+
```jsx
|
|
256
|
+
<button title={content.title}>{content.content}</button>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Ek İpuçları
|
|
260
|
+
|
|
261
|
+
- **Tür Güvenliği**: Tür güvenliğini sağlamak için her zaman sözlüklerinizi tanımlamak üzere `Dictionary` kullanın.
|
|
262
|
+
- **Yerelleştirme Güncellemeleri**: İçeriği güncellerken, eksik çevirileri önlemek için tüm yerel ayarların tutarlı olduğundan emin olun.
|
|
263
|
+
|
|
264
|
+
Bu dokümantasyon, `useDictionary` hook'unun entegrasyonuna odaklanır, görsel düzenleyici işlevlerine güvenmeden yerelleştirilmiş içeriği yönetmek için akıcı bir yaklaşım sağlar.
|
|
265
|
+
|
|
266
|
+
## Doküman Geçmişi
|
|
267
|
+
|
|
268
|
+
| Sürüm | Tarih | Değişiklikler |
|
|
269
|
+
| ------ | ---------- | ----------------- |
|
|
270
|
+
| 5.5.10 | 2025-06-29 | Geçmiş başlatıldı |
|