@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.
Files changed (378) hide show
  1. package/blog/ar/rag_powered_documentation_assistant.md +282 -0
  2. package/blog/de/rag_powered_documentation_assistant.md +282 -0
  3. package/blog/en/rag_powered_documentation_assistant.md +289 -0
  4. package/blog/en-GB/rag_powered_documentation_assistant.md +284 -0
  5. package/blog/es/rag_powered_documentation_assistant.md +308 -0
  6. package/blog/fr/rag_powered_documentation_assistant.md +308 -0
  7. package/blog/hi/rag_powered_documentation_assistant.md +284 -0
  8. package/blog/it/rag_powered_documentation_assistant.md +284 -0
  9. package/blog/ja/rag_powered_documentation_assistant.md +284 -0
  10. package/blog/ko/rag_powered_documentation_assistant.md +283 -0
  11. package/blog/pt/rag_powered_documentation_assistant.md +284 -0
  12. package/blog/ru/rag_powered_documentation_assistant.md +284 -0
  13. package/blog/tr/index.md +69 -0
  14. package/blog/tr/internationalization_and_SEO.md +273 -0
  15. package/blog/tr/intlayer_with_i18next.md +162 -0
  16. package/blog/tr/intlayer_with_next-i18next.md +367 -0
  17. package/blog/tr/intlayer_with_next-intl.md +392 -0
  18. package/blog/tr/intlayer_with_react-i18next.md +346 -0
  19. package/blog/tr/intlayer_with_react-intl.md +345 -0
  20. package/blog/tr/list_i18n_technologies/CMS/drupal.md +143 -0
  21. package/blog/tr/list_i18n_technologies/CMS/wix.md +167 -0
  22. package/blog/tr/list_i18n_technologies/CMS/wordpress.md +188 -0
  23. package/blog/tr/list_i18n_technologies/frameworks/angular.md +125 -0
  24. package/blog/tr/list_i18n_technologies/frameworks/flutter.md +150 -0
  25. package/blog/tr/list_i18n_technologies/frameworks/react-native.md +217 -0
  26. package/blog/tr/list_i18n_technologies/frameworks/react.md +155 -0
  27. package/blog/tr/list_i18n_technologies/frameworks/svelte.md +129 -0
  28. package/blog/tr/list_i18n_technologies/frameworks/vue.md +130 -0
  29. package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +170 -0
  30. package/blog/tr/rag_powered_documentation_assistant.md +284 -0
  31. package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +162 -0
  32. package/blog/tr/vue-i18n_vs_intlayer.md +276 -0
  33. package/blog/tr/what_is_internationalization.md +166 -0
  34. package/blog/zh/rag_powered_documentation_assistant.md +284 -0
  35. package/dist/cjs/generated/blog.entry.cjs +212 -0
  36. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  37. package/dist/cjs/generated/docs.entry.cjs +660 -132
  38. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  39. package/dist/cjs/generated/frequentQuestions.entry.cjs +84 -0
  40. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  41. package/dist/cjs/generated/legal.entry.cjs +6 -0
  42. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  43. package/dist/esm/generated/blog.entry.mjs +212 -0
  44. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  45. package/dist/esm/generated/docs.entry.mjs +660 -132
  46. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  47. package/dist/esm/generated/frequentQuestions.entry.mjs +84 -0
  48. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  49. package/dist/esm/generated/legal.entry.mjs +6 -0
  50. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  51. package/dist/types/generated/blog.entry.d.ts +1 -0
  52. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  53. package/dist/types/generated/docs.entry.d.ts +5 -2
  54. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  55. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  56. package/dist/types/generated/legal.entry.d.ts.map +1 -1
  57. package/docs/ar/autoFill.md +41 -40
  58. package/docs/ar/configuration.md +202 -199
  59. package/docs/ar/dictionary/content_file.md +1059 -0
  60. package/docs/ar/intlayer_CMS.md +4 -4
  61. package/docs/ar/intlayer_with_nestjs.md +271 -0
  62. package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
  63. package/docs/ar/intlayer_with_react_router_v7.md +533 -0
  64. package/docs/ar/intlayer_with_tanstack.md +465 -299
  65. package/docs/ar/intlayer_with_vite+preact.md +7 -7
  66. package/docs/ar/intlayer_with_vite+react.md +7 -7
  67. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  68. package/docs/ar/packages/vite-intlayer/index.md +3 -3
  69. package/docs/ar/readme.md +261 -0
  70. package/docs/ar/testing.md +199 -0
  71. package/docs/de/autoFill.md +42 -19
  72. package/docs/de/configuration.md +155 -147
  73. package/docs/de/dictionary/content_file.md +1059 -0
  74. package/docs/de/intlayer_CMS.md +4 -5
  75. package/docs/de/intlayer_with_nestjs.md +270 -0
  76. package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
  77. package/docs/de/intlayer_with_react_router_v7.md +537 -0
  78. package/docs/de/intlayer_with_tanstack.md +469 -302
  79. package/docs/de/intlayer_with_vite+preact.md +7 -7
  80. package/docs/de/intlayer_with_vite+react.md +7 -7
  81. package/docs/de/intlayer_with_vite+vue.md +9 -9
  82. package/docs/de/packages/vite-intlayer/index.md +3 -3
  83. package/docs/de/readme.md +261 -0
  84. package/docs/de/testing.md +200 -0
  85. package/docs/en/CI_CD.md +4 -6
  86. package/docs/en/autoFill.md +25 -5
  87. package/docs/en/configuration.md +45 -54
  88. package/docs/en/dictionary/content_file.md +1054 -0
  89. package/docs/en/intlayer_CMS.md +8 -7
  90. package/docs/en/intlayer_cli.md +112 -5
  91. package/docs/en/intlayer_with_nestjs.md +268 -0
  92. package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
  93. package/docs/en/intlayer_with_react_router_v7.md +531 -0
  94. package/docs/en/intlayer_with_tanstack.md +463 -294
  95. package/docs/en/intlayer_with_vite+preact.md +8 -8
  96. package/docs/en/intlayer_with_vite+react.md +8 -8
  97. package/docs/en/intlayer_with_vite+vue.md +8 -8
  98. package/docs/en/packages/intlayer/getLocalizedUrl.md +102 -25
  99. package/docs/en/packages/vite-intlayer/index.md +3 -3
  100. package/docs/en/readme.md +261 -0
  101. package/docs/en/testing.md +200 -0
  102. package/docs/en-GB/autoFill.md +29 -6
  103. package/docs/en-GB/configuration.md +79 -71
  104. package/docs/en-GB/dictionary/content_file.md +1084 -0
  105. package/docs/en-GB/intlayer_CMS.md +4 -5
  106. package/docs/en-GB/intlayer_with_nestjs.md +268 -0
  107. package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
  108. package/docs/en-GB/intlayer_with_react_router_v7.md +533 -0
  109. package/docs/en-GB/intlayer_with_tanstack.md +466 -299
  110. package/docs/en-GB/intlayer_with_vite+preact.md +7 -7
  111. package/docs/en-GB/intlayer_with_vite+react.md +7 -7
  112. package/docs/en-GB/intlayer_with_vite+vue.md +9 -9
  113. package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
  114. package/docs/en-GB/readme.md +261 -0
  115. package/docs/en-GB/testing.md +200 -0
  116. package/docs/es/autoFill.md +45 -23
  117. package/docs/es/configuration.md +171 -167
  118. package/docs/es/dictionary/content_file.md +1088 -0
  119. package/docs/es/intlayer_CMS.md +4 -5
  120. package/docs/es/intlayer_with_nestjs.md +268 -0
  121. package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
  122. package/docs/es/intlayer_with_react_router_v7.md +533 -0
  123. package/docs/es/intlayer_with_tanstack.md +469 -280
  124. package/docs/es/intlayer_with_vite+preact.md +7 -7
  125. package/docs/es/intlayer_with_vite+react.md +7 -7
  126. package/docs/es/intlayer_with_vite+vue.md +9 -9
  127. package/docs/es/packages/vite-intlayer/index.md +3 -3
  128. package/docs/es/readme.md +261 -0
  129. package/docs/es/testing.md +200 -0
  130. package/docs/fr/autoFill.md +47 -24
  131. package/docs/fr/configuration.md +213 -198
  132. package/docs/fr/dictionary/content_file.md +1054 -0
  133. package/docs/fr/intlayer_CMS.md +4 -5
  134. package/docs/fr/intlayer_with_nestjs.md +268 -0
  135. package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
  136. package/docs/fr/intlayer_with_react_router_v7.md +549 -0
  137. package/docs/fr/intlayer_with_tanstack.md +465 -279
  138. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  139. package/docs/fr/intlayer_with_vite+react.md +7 -7
  140. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  141. package/docs/fr/packages/vite-intlayer/index.md +3 -3
  142. package/docs/fr/readme.md +261 -0
  143. package/docs/fr/testing.md +200 -0
  144. package/docs/hi/autoFill.md +47 -25
  145. package/docs/hi/configuration.md +194 -189
  146. package/docs/hi/dictionary/content_file.md +1056 -0
  147. package/docs/hi/intlayer_CMS.md +4 -5
  148. package/docs/hi/intlayer_with_nestjs.md +269 -0
  149. package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
  150. package/docs/hi/intlayer_with_react_router_v7.md +533 -0
  151. package/docs/hi/intlayer_with_tanstack.md +467 -282
  152. package/docs/hi/intlayer_with_vite+preact.md +7 -7
  153. package/docs/hi/intlayer_with_vite+react.md +7 -7
  154. package/docs/hi/intlayer_with_vite+vue.md +9 -9
  155. package/docs/hi/packages/vite-intlayer/index.md +3 -3
  156. package/docs/hi/readme.md +261 -0
  157. package/docs/hi/testing.md +200 -0
  158. package/docs/it/autoFill.md +46 -24
  159. package/docs/it/configuration.md +169 -161
  160. package/docs/it/dictionary/content_file.md +1061 -0
  161. package/docs/it/intlayer_CMS.md +4 -5
  162. package/docs/it/intlayer_with_nestjs.md +268 -0
  163. package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
  164. package/docs/it/intlayer_with_react_router_v7.md +535 -0
  165. package/docs/it/intlayer_with_tanstack.md +467 -301
  166. package/docs/it/intlayer_with_vite+preact.md +7 -7
  167. package/docs/it/intlayer_with_vite+react.md +7 -7
  168. package/docs/it/intlayer_with_vite+vue.md +9 -9
  169. package/docs/it/packages/vite-intlayer/index.md +3 -3
  170. package/docs/it/readme.md +261 -0
  171. package/docs/it/testing.md +200 -0
  172. package/docs/ja/autoFill.md +45 -23
  173. package/docs/ja/configuration.md +243 -204
  174. package/docs/ja/dictionary/content_file.md +1064 -0
  175. package/docs/ja/intlayer_CMS.md +4 -5
  176. package/docs/ja/intlayer_with_nestjs.md +268 -0
  177. package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
  178. package/docs/ja/intlayer_with_react_router_v7.md +534 -0
  179. package/docs/ja/intlayer_with_tanstack.md +467 -303
  180. package/docs/ja/intlayer_with_vite+preact.md +7 -7
  181. package/docs/ja/intlayer_with_vite+react.md +7 -7
  182. package/docs/ja/intlayer_with_vite+vue.md +9 -9
  183. package/docs/ja/packages/vite-intlayer/index.md +3 -3
  184. package/docs/ja/readme.md +263 -0
  185. package/docs/ja/testing.md +200 -0
  186. package/docs/ko/autoFill.md +39 -16
  187. package/docs/ko/configuration.md +217 -197
  188. package/docs/ko/dictionary/content_file.md +1060 -0
  189. package/docs/ko/intlayer_CMS.md +4 -5
  190. package/docs/ko/intlayer_with_nestjs.md +268 -0
  191. package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
  192. package/docs/ko/intlayer_with_react_router_v7.md +540 -0
  193. package/docs/ko/intlayer_with_tanstack.md +466 -302
  194. package/docs/ko/intlayer_with_vite+preact.md +7 -7
  195. package/docs/ko/intlayer_with_vite+react.md +7 -7
  196. package/docs/ko/intlayer_with_vite+vue.md +9 -9
  197. package/docs/ko/packages/vite-intlayer/index.md +3 -3
  198. package/docs/ko/readme.md +261 -0
  199. package/docs/ko/testing.md +200 -0
  200. package/docs/pt/autoFill.md +39 -15
  201. package/docs/pt/configuration.md +165 -147
  202. package/docs/pt/dictionary/content_file.md +1062 -0
  203. package/docs/pt/intlayer_CMS.md +4 -5
  204. package/docs/pt/intlayer_with_nestjs.md +271 -0
  205. package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
  206. package/docs/pt/intlayer_with_react_router_v7.md +535 -0
  207. package/docs/pt/intlayer_with_tanstack.md +469 -300
  208. package/docs/pt/intlayer_with_vite+preact.md +7 -7
  209. package/docs/pt/intlayer_with_vite+react.md +7 -7
  210. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  211. package/docs/pt/packages/vite-intlayer/index.md +3 -3
  212. package/docs/pt/readme.md +261 -0
  213. package/docs/pt/testing.md +200 -0
  214. package/docs/ru/autoFill.md +52 -30
  215. package/docs/ru/configuration.md +164 -117
  216. package/docs/ru/dictionary/content_file.md +1064 -0
  217. package/docs/ru/intlayer_CMS.md +4 -4
  218. package/docs/ru/intlayer_with_nestjs.md +270 -0
  219. package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
  220. package/docs/ru/intlayer_with_react_router_v7.md +534 -0
  221. package/docs/ru/intlayer_with_tanstack.md +470 -305
  222. package/docs/ru/intlayer_with_vite+preact.md +7 -7
  223. package/docs/ru/intlayer_with_vite+react.md +7 -7
  224. package/docs/ru/intlayer_with_vite+vue.md +9 -9
  225. package/docs/ru/packages/vite-intlayer/index.md +3 -3
  226. package/docs/ru/readme.md +261 -0
  227. package/docs/ru/testing.md +202 -0
  228. package/docs/tr/CI_CD.md +198 -0
  229. package/docs/tr/autoFill.md +201 -0
  230. package/docs/tr/configuration.md +585 -0
  231. package/docs/tr/dictionary/condition.md +243 -0
  232. package/docs/tr/dictionary/content_file.md +1055 -0
  233. package/docs/tr/dictionary/enumeration.md +251 -0
  234. package/docs/tr/dictionary/file.md +228 -0
  235. package/docs/tr/dictionary/function_fetching.md +218 -0
  236. package/docs/tr/dictionary/gender.md +279 -0
  237. package/docs/tr/dictionary/insertion.md +191 -0
  238. package/docs/tr/dictionary/markdown.md +385 -0
  239. package/docs/tr/dictionary/nesting.md +279 -0
  240. package/docs/tr/dictionary/translation.md +315 -0
  241. package/docs/tr/formatters.md +618 -0
  242. package/docs/tr/how_works_intlayer.md +254 -0
  243. package/docs/tr/index.md +168 -0
  244. package/docs/tr/interest_of_intlayer.md +288 -0
  245. package/docs/tr/intlayer_CMS.md +347 -0
  246. package/docs/tr/intlayer_cli.md +570 -0
  247. package/docs/tr/intlayer_visual_editor.md +269 -0
  248. package/docs/tr/intlayer_with_angular.md +694 -0
  249. package/docs/tr/intlayer_with_create_react_app.md +1218 -0
  250. package/docs/tr/intlayer_with_express.md +415 -0
  251. package/docs/tr/intlayer_with_lynx+react.md +511 -0
  252. package/docs/tr/intlayer_with_nestjs.md +268 -0
  253. package/docs/tr/intlayer_with_nextjs_14.md +1029 -0
  254. package/docs/tr/intlayer_with_nextjs_15.md +1506 -0
  255. package/docs/tr/intlayer_with_nextjs_page_router.md +1484 -0
  256. package/docs/tr/intlayer_with_nuxt.md +773 -0
  257. package/docs/tr/intlayer_with_react_native+expo.md +660 -0
  258. package/docs/tr/intlayer_with_react_router_v7.md +531 -0
  259. package/docs/tr/intlayer_with_tanstack.md +452 -0
  260. package/docs/tr/intlayer_with_vite+preact.md +1673 -0
  261. package/docs/tr/intlayer_with_vite+react.md +1632 -0
  262. package/docs/tr/intlayer_with_vite+solid.md +288 -0
  263. package/docs/tr/intlayer_with_vite+svelte.md +288 -0
  264. package/docs/tr/intlayer_with_vite+vue.md +1042 -0
  265. package/docs/tr/introduction.md +209 -0
  266. package/docs/tr/locale_mapper.md +244 -0
  267. package/docs/tr/mcp_server.md +207 -0
  268. package/docs/tr/packages/@intlayer/api/index.md +58 -0
  269. package/docs/tr/packages/@intlayer/chokidar/index.md +57 -0
  270. package/docs/tr/packages/@intlayer/cli/index.md +47 -0
  271. package/docs/tr/packages/@intlayer/config/index.md +142 -0
  272. package/docs/tr/packages/@intlayer/core/index.md +51 -0
  273. package/docs/tr/packages/@intlayer/design-system/index.md +47 -0
  274. package/docs/tr/packages/@intlayer/dictionary-entry/index.md +53 -0
  275. package/docs/tr/packages/@intlayer/editor/index.md +47 -0
  276. package/docs/tr/packages/@intlayer/editor-react/index.md +47 -0
  277. package/docs/tr/packages/@intlayer/webpack/index.md +61 -0
  278. package/docs/tr/packages/angular-intlayer/index.md +59 -0
  279. package/docs/tr/packages/express-intlayer/index.md +258 -0
  280. package/docs/tr/packages/express-intlayer/t.md +459 -0
  281. package/docs/tr/packages/intlayer/getConfiguration.md +151 -0
  282. package/docs/tr/packages/intlayer/getEnumeration.md +165 -0
  283. package/docs/tr/packages/intlayer/getHTMLTextDir.md +127 -0
  284. package/docs/tr/packages/intlayer/getLocaleLang.md +87 -0
  285. package/docs/tr/packages/intlayer/getLocaleName.md +124 -0
  286. package/docs/tr/packages/intlayer/getLocalizedUrl.md +324 -0
  287. package/docs/tr/packages/intlayer/getMultilingualUrls.md +225 -0
  288. package/docs/tr/packages/intlayer/getPathWithoutLocale.md +81 -0
  289. package/docs/tr/packages/intlayer/getTranslation.md +196 -0
  290. package/docs/tr/packages/intlayer/getTranslationContent.md +195 -0
  291. package/docs/tr/packages/intlayer/index.md +505 -0
  292. package/docs/tr/packages/intlayer-cli/index.md +71 -0
  293. package/docs/tr/packages/intlayer-editor/index.md +139 -0
  294. package/docs/tr/packages/lynx-intlayer/index.md +85 -0
  295. package/docs/tr/packages/next-intlayer/index.md +154 -0
  296. package/docs/tr/packages/next-intlayer/t.md +354 -0
  297. package/docs/tr/packages/next-intlayer/useDictionary.md +270 -0
  298. package/docs/tr/packages/next-intlayer/useIntlayer.md +265 -0
  299. package/docs/tr/packages/next-intlayer/useLocale.md +133 -0
  300. package/docs/tr/packages/nuxt-intlayer/index.md +59 -0
  301. package/docs/tr/packages/preact-intlayer/index.md +55 -0
  302. package/docs/tr/packages/react-intlayer/index.md +148 -0
  303. package/docs/tr/packages/react-intlayer/t.md +304 -0
  304. package/docs/tr/packages/react-intlayer/useDictionary.md +554 -0
  305. package/docs/tr/packages/react-intlayer/useI18n.md +478 -0
  306. package/docs/tr/packages/react-intlayer/useIntlayer.md +253 -0
  307. package/docs/tr/packages/react-intlayer/useLocale.md +212 -0
  308. package/docs/tr/packages/react-native-intlayer/index.md +85 -0
  309. package/docs/tr/packages/react-scripts-intlayer/index.md +82 -0
  310. package/docs/tr/packages/solid-intlayer/index.md +56 -0
  311. package/docs/tr/packages/svelte-intlayer/index.md +55 -0
  312. package/docs/tr/packages/vite-intlayer/index.md +82 -0
  313. package/docs/tr/packages/vue-intlayer/index.md +59 -0
  314. package/docs/tr/per_locale_file.md +321 -0
  315. package/docs/tr/readme.md +261 -0
  316. package/docs/tr/roadmap.md +338 -0
  317. package/docs/tr/testing.md +200 -0
  318. package/docs/tr/vs_code_extension.md +154 -0
  319. package/docs/zh/autoFill.md +40 -18
  320. package/docs/zh/configuration.md +245 -226
  321. package/docs/zh/dictionary/content_file.md +1064 -0
  322. package/docs/zh/intlayer_CMS.md +4 -5
  323. package/docs/zh/intlayer_with_nestjs.md +268 -0
  324. package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
  325. package/docs/zh/intlayer_with_react_router_v7.md +535 -0
  326. package/docs/zh/intlayer_with_tanstack.md +468 -278
  327. package/docs/zh/intlayer_with_vite+preact.md +7 -7
  328. package/docs/zh/intlayer_with_vite+react.md +7 -7
  329. package/docs/zh/intlayer_with_vite+vue.md +7 -7
  330. package/docs/zh/packages/vite-intlayer/index.md +3 -3
  331. package/docs/zh/readme.md +261 -0
  332. package/docs/zh/testing.md +198 -0
  333. package/frequent_questions/tr/SSR_Next_no_[locale].md +105 -0
  334. package/frequent_questions/tr/array_as_content_declaration.md +72 -0
  335. package/frequent_questions/tr/build_dictionaries.md +59 -0
  336. package/frequent_questions/tr/build_error_CI_CD.md +75 -0
  337. package/frequent_questions/tr/customized_locale_list.md +65 -0
  338. package/frequent_questions/tr/domain_routing.md +114 -0
  339. package/frequent_questions/tr/esbuild_error.md +30 -0
  340. package/frequent_questions/tr/get_locale_cookie.md +142 -0
  341. package/frequent_questions/tr/intlayer_command_undefined.md +156 -0
  342. package/frequent_questions/tr/locale_incorect_in_url.md +74 -0
  343. package/frequent_questions/tr/static_rendering.md +45 -0
  344. package/frequent_questions/tr/translated_path_url.md +56 -0
  345. package/frequent_questions/tr/unknown_command.md +98 -0
  346. package/legal/tr/privacy_notice.md +83 -0
  347. package/legal/tr/terms_of_service.md +55 -0
  348. package/package.json +13 -13
  349. package/src/generated/blog.entry.ts +212 -0
  350. package/src/generated/docs.entry.ts +663 -135
  351. package/src/generated/frequentQuestions.entry.ts +85 -1
  352. package/src/generated/legal.entry.ts +7 -1
  353. package/docs/ar/dictionary/content_extention_customization.md +0 -100
  354. package/docs/ar/dictionary/get_started.md +0 -527
  355. package/docs/de/dictionary/content_extention_customization.md +0 -100
  356. package/docs/de/dictionary/get_started.md +0 -531
  357. package/docs/en/dictionary/content_extention_customization.md +0 -102
  358. package/docs/en/dictionary/get_started.md +0 -529
  359. package/docs/en-GB/dictionary/content_extention_customization.md +0 -100
  360. package/docs/en-GB/dictionary/get_started.md +0 -591
  361. package/docs/es/dictionary/content_extention_customization.md +0 -100
  362. package/docs/es/dictionary/get_started.md +0 -527
  363. package/docs/fr/dictionary/content_extention_customization.md +0 -100
  364. package/docs/fr/dictionary/get_started.md +0 -527
  365. package/docs/hi/dictionary/content_extention_customization.md +0 -100
  366. package/docs/hi/dictionary/get_started.md +0 -527
  367. package/docs/it/dictionary/content_extention_customization.md +0 -113
  368. package/docs/it/dictionary/get_started.md +0 -573
  369. package/docs/ja/dictionary/content_extention_customization.md +0 -113
  370. package/docs/ja/dictionary/get_started.md +0 -576
  371. package/docs/ko/dictionary/content_extention_customization.md +0 -100
  372. package/docs/ko/dictionary/get_started.md +0 -530
  373. package/docs/pt/dictionary/content_extention_customization.md +0 -100
  374. package/docs/pt/dictionary/get_started.md +0 -532
  375. package/docs/ru/dictionary/content_extention_customization.md +0 -100
  376. package/docs/ru/dictionary/get_started.md +0 -575
  377. package/docs/zh/dictionary/content_extention_customization.md +0 -117
  378. package/docs/zh/dictionary/get_started.md +0 -533
@@ -0,0 +1,1029 @@
1
+ ---
2
+ title: Intlayer ile Next.js 14
3
+ description: Next.js 14 ile Intlayer entegrasyonu. Next.js 14 uygulamanızda çok dilli içerik yönetimi için Intlayer'ı nasıl kuracağınızı ve kullanacağınızı öğrenin.
4
+ keywords:
5
+ - nextjs
6
+ - intlayer
7
+ - internationalization
8
+ - i18n
9
+ - typescript
10
+ - react
11
+ - nextjs-14
12
+ slugs:
13
+ - doc
14
+ - environment
15
+ - nextjs
16
+ - 14
17
+ ---
18
+
19
+ # Intlayer ile Next.js 14
20
+
21
+ Bu kılavuz, Next.js 14 uygulamanızda Intlayer'ı nasıl kuracağınızı ve kullanacağınızı adım adım açıklar. Intlayer, Next.js 14 ile sorunsuz bir şekilde entegre olur ve çok dilli içerik yönetimi sağlar.
22
+
23
+ ## Ön Koşullar
24
+
25
+ Bu kılavuzu takip etmek için aşağıdaki araçlara ihtiyacınız olacak:
26
+
27
+ - Node.js 18 veya üzeri
28
+ - npm, pnpm veya yarn paket yöneticisi
29
+ - Next.js 14 projesi
30
+
31
+ ## Adım 1: Intlayer Paketlerini Kurma
32
+
33
+ İlk olarak, Intlayer paketlerini projenize kurun:
34
+
35
+ ```bash packageManager="npm"
36
+ npm install next-intlayer intlayer --save
37
+ ```
38
+
39
+ ```bash packageManager="pnpm"
40
+ pnpm add next-intlayer intlayer
41
+ ```
42
+
43
+ ```bash packageManager="yarn"
44
+ yarn add next-intlayer intlayer
45
+ ```
46
+
47
+ ## Adım 2: Intlayer Yapılandırma Dosyası Oluşturma
48
+
49
+ Proje kök dizininizde `intlayer.config.ts` dosyasını oluşturun:
50
+
51
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
52
+ import { Locales } from "intlayer";
53
+ import { type IntlayerConfig } from "intlayer";
54
+
55
+ const config: IntlayerConfig = {
56
+ internationalization: {
57
+ locales: [
58
+ Locales.ENGLISH,
59
+ Locales.FRENCH,
60
+ Locales.SPANISH,
61
+ Locales.TURKISH,
62
+ ],
63
+ defaultLocale: Locales.ENGLISH,
64
+ },
65
+ content: {
66
+ // İçerik dosyalarınızın bulunduğu dizin
67
+ fileExtensions: [".content.ts", ".content.js", ".content.json"],
68
+ baseDir: "./src",
69
+ contentDirName: "content",
70
+ // İçerik dosyalarınızın türlerini belirtin
71
+ types: {
72
+ filePath: "./types/intlayer.d.ts",
73
+ moduleAugmentation: true,
74
+ },
75
+ },
76
+ };
77
+
78
+ export default config;
79
+ ```
80
+
81
+ ```javascript fileName="intlayer.config.js" codeFormat="esm"
82
+ import { Locales } from "intlayer";
83
+
84
+ const config = {
85
+ internationalization: {
86
+ locales: [
87
+ Locales.ENGLISH,
88
+ Locales.FRENCH,
89
+ Locales.SPANISH,
90
+ Locales.TURKISH,
91
+ ],
92
+ defaultLocale: Locales.ENGLISH,
93
+ },
94
+ content: {
95
+ // İçerik dosyalarınızın bulunduğu dizin
96
+ fileExtensions: [".content.ts", ".content.js", ".content.json"],
97
+ baseDir: "./src",
98
+ contentDirName: "content",
99
+ // İçerik dosyalarınızın türlerini belirtin
100
+ types: {
101
+ filePath: "./types/intlayer.d.ts",
102
+ moduleAugmentation: true,
103
+ },
104
+ },
105
+ };
106
+
107
+ export default config;
108
+ ```
109
+
110
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
111
+ const { Locales } = require("intlayer");
112
+
113
+ const config = {
114
+ internationalization: {
115
+ locales: [
116
+ Locales.ENGLISH,
117
+ Locales.FRENCH,
118
+ Locales.SPANISH,
119
+ Locales.TURKISH,
120
+ ],
121
+ defaultLocale: Locales.ENGLISH,
122
+ },
123
+ content: {
124
+ // İçerik dosyalarınızın bulunduğu dizin
125
+ fileExtensions: [".content.ts", ".content.js", ".content.json"],
126
+ baseDir: "./src",
127
+ contentDirName: "content",
128
+ // İçerik dosyalarınızın türlerini belirtin
129
+ types: {
130
+ filePath: "./types/intlayer.d.ts",
131
+ moduleAugmentation: true,
132
+ },
133
+ },
134
+ };
135
+
136
+ module.exports = default = config;
137
+ ```
138
+
139
+ ## Adım 3: Next.js Yapılandırmasını Güncelleme
140
+
141
+ Next.js yapılandırma dosyanızı Intlayer ile uyumlu hale getirin:
142
+
143
+ ```typescript fileName="next.config.mjs" codeFormat="esm"
144
+ import { withIntlayer } from "next-intlayer/async";
145
+
146
+ const config = {
147
+ // ... Mevcut Next.js yapılandırmanız
148
+ };
149
+
150
+ export default withIntlayer(config);
151
+ ```
152
+
153
+ ```javascript fileName="next.config.js" codeFormat="esm"
154
+ import { withIntlayer } from "next-intlayer/async";
155
+
156
+ const config = {
157
+ // ... Mevcut Next.js yapılandırmanız
158
+ };
159
+
160
+ export default withIntlayer(config);
161
+ ```
162
+
163
+ ```javascript fileName="next.config.cjs" codeFormat="commonjs"
164
+ const { withIntlayer } = require("next-intlayer/async");
165
+
166
+ const config = {
167
+ // ... Mevcut Next.js yapılandırmanız
168
+ };
169
+
170
+ module.exports = withIntlayer(config);
171
+ ```
172
+
173
+ ## Adım 4: İçerik Bildirimi
174
+
175
+ İçerik dosyalarınızı oluşturun. Bu dosyalar, uygulamanızdaki çok dilli içeriği tanımlar.
176
+
177
+ ```typescript fileName="src/content/home.content.ts" codeFormat="typescript"
178
+ import { t } from "intlayer";
179
+ import { type ILocaleContent } from "intlayer";
180
+
181
+ const homeContent = {
182
+ title: t({
183
+ en: "Welcome to My App",
184
+ fr: "Bienvenue dans mon application",
185
+ es: "Bienvenido a mi aplicación",
186
+ tr: "Uygulamama Hoş Geldiniz",
187
+ }),
188
+ description: t({
189
+ en: "This is a sample Next.js application with Intlayer",
190
+ fr: "Ceci est un exemple d'application Next.js avec Intlayer",
191
+ es: "Esta es una aplicación de ejemplo de Next.js con Intlayer",
192
+ tr: "Bu, Intlayer ile örnek bir Next.js uygulamasıdır",
193
+ }),
194
+ } satisfies ILocaleContent;
195
+
196
+ export default homeContent;
197
+ ```
198
+
199
+ ```javascript fileName="src/content/home.content.js" codeFormat="esm"
200
+ import { t } from "intlayer";
201
+
202
+ const homeContent = {
203
+ title: t({
204
+ en: "Welcome to My App",
205
+ fr: "Bienvenue dans mon application",
206
+ es: "Bienvenido a mi aplicación",
207
+ tr: "Uygulamama Hoş Geldiniz",
208
+ }),
209
+ description: t({
210
+ en: "This is a sample Next.js application with Intlayer",
211
+ fr: "Ceci est un exemple d'application Next.js avec Intlayer",
212
+ es: "Esta es una aplicación de ejemplo de Next.js con Intlayer",
213
+ tr: "Bu, Intlayer ile örnek bir Next.js uygulamasıdır",
214
+ }),
215
+ };
216
+
217
+ export default homeContent;
218
+ ```
219
+
220
+ ```json fileName="src/content/home.content.json"
221
+ {
222
+ "title": {
223
+ "en": "Welcome to My App",
224
+ "fr": "Bienvenue dans mon application",
225
+ "es": "Bienvenido a mi aplicación",
226
+ "tr": "Uygulamama Hoş Geldiniz"
227
+ },
228
+ "description": {
229
+ "en": "This is a sample Next.js application with Intlayer",
230
+ "fr": "Ceci est un exemple d'application Next.js avec Intlayer",
231
+ "es": "Esta es una aplicación de ejemplo de Next.js con Intlayer",
232
+ "tr": "Bu, Intlayer ile örnek bir Next.js uygulamasıdır"
233
+ }
234
+ }
235
+ ```
236
+
237
+ ## Adım 5: İçerik Kullanımı
238
+
239
+ İçeriğinizi bileşenlerinizde kullanın:
240
+
241
+ ```tsx fileName="src/app/page.tsx" codeFormat="typescript"
242
+ import { useIntlayer } from "next-intlayer";
243
+ import { Locales } from "intlayer";
244
+
245
+ export default function HomePage() {
246
+ const content = useIntlayer("home");
247
+
248
+ return (
249
+ <div>
250
+ <h1>{content.title}</h1>
251
+ <p>{content.description}</p>
252
+ </div>
253
+ );
254
+ }
255
+ ```
256
+
257
+ ```jsx fileName="src/app/page.jsx" codeFormat="esm"
258
+ import { useIntlayer } from "next-intlayer";
259
+
260
+ export default function HomePage() {
261
+ const content = useIntlayer("home");
262
+
263
+ return (
264
+ <div>
265
+ <h1>{content.title}</h1>
266
+ <p>{content.description}</p>
267
+ </div>
268
+ );
269
+ }
270
+ ```
271
+
272
+ ## Adım 6: Middleware Kurulumu
273
+
274
+ Next.js 14'te çok dilli yönlendirme için middleware kurun:
275
+
276
+ ```typescript fileName="src/middleware.ts" codeFormat="typescript"
277
+ import { createMiddleware } from "next-intlayer/middleware";
278
+ import { type NextRequest } from "next/server";
279
+
280
+ export default createMiddleware({
281
+ // Alternatif olarak, middleware seçeneklerini özelleştirebilirsiniz
282
+ // locales: ['en', 'fr', 'es'],
283
+ // defaultLocale: 'en',
284
+ });
285
+
286
+ export const config = {
287
+ matcher: ["/((?!api|_next|_vercel|.*\\..*).*)"],
288
+ };
289
+ ```
290
+
291
+ ```javascript fileName="src/middleware.js" codeFormat="esm"
292
+ import { createMiddleware } from "next-intlayer/middleware";
293
+
294
+ export default createMiddleware({
295
+ // Alternatif olarak, middleware seçeneklerini özelleştirebilirsiniz
296
+ // locales: ['en', 'fr', 'es'],
297
+ // defaultLocale: 'en',
298
+ });
299
+
300
+ export const config = {
301
+ matcher: ["/((?!api|_next|_vercel|.*\\..*).*)"],
302
+ };
303
+ ```
304
+
305
+ ```javascript fileName="src/middleware.cjs" codeFormat="commonjs"
306
+ const { createMiddleware } = require("next-intlayer/middleware");
307
+
308
+ module.exports = createMiddleware({
309
+ // Alternatif olarak, middleware seçeneklerini özelleştirebilirsiniz
310
+ // locales: ['en', 'fr', 'es'],
311
+ // defaultLocale: 'en',
312
+ });
313
+
314
+ module.exports.config = {
315
+ matcher: ["/((?!api|_next|_vercel|.*\\..*).*)"],
316
+ };
317
+ ```
318
+
319
+ ## Adım 7: Düzen Dosyası (Layout)
320
+
321
+ Kök düzen dosyanızı çok dilli hale getirin:
322
+
323
+ ```tsx fileName="src/app/layout.tsx" codeFormat="typescript"
324
+ import { getHTMLTextDir } from "intlayer";
325
+ import { getLocaleName } from "intlayer";
326
+ import { Inter } from "next/font/google";
327
+ import { type Metadata } from "next/types";
328
+ import { getIntlayer } from "next-intlayer/server";
329
+ import { type Locales } from "intlayer";
330
+
331
+ const inter = Inter({ subsets: ["latin"] });
332
+
333
+ export const generateMetadata = (params: {
334
+ params: { locale: Locales };
335
+ }): Metadata => {
336
+ const { locale } = params.params;
337
+ const t = getIntlayer(locale);
338
+
339
+ return {
340
+ title: t({
341
+ en: "My App",
342
+ fr: "Mon Application",
343
+ es: "Mi Aplicación",
344
+ tr: "Uygulamam",
345
+ }),
346
+ description: t({
347
+ en: "This is my Next.js app with Intlayer",
348
+ fr: "Ceci est mon application Next.js avec Intlayer",
349
+ es: "Esta es mi aplicación Next.js con Intlayer",
350
+ tr: "Bu, Intlayer ile Next.js uygulamamdır",
351
+ }),
352
+ };
353
+ };
354
+
355
+ export default function RootLayout({
356
+ children,
357
+ params,
358
+ }: {
359
+ children: React.ReactNode;
360
+ params: { locale: Locales };
361
+ }) {
362
+ const { locale } = params;
363
+ const localeName = getLocaleName(locale);
364
+ const textDirection = getHTMLTextDir(locale);
365
+
366
+ return (
367
+ <html lang={locale} dir={textDirection}>
368
+ <body className={inter.className}>
369
+ <header>
370
+ <h1>{localeName}</h1>
371
+ </header>
372
+ {children}
373
+ </body>
374
+ </html>
375
+ );
376
+ }
377
+ ```
378
+
379
+ ```jsx fileName="src/app/layout.jsx" codeFormat="esm"
380
+ import { getHTMLTextDir } from "intlayer";
381
+ import { getLocaleName } from "intlayer";
382
+ import { Inter } from "next/font/google";
383
+ import { getIntlayer } from "next-intlayer/server";
384
+
385
+ const inter = Inter({ subsets: ["latin"] });
386
+
387
+ export const generateMetadata = (params) => {
388
+ const { locale } = params.params;
389
+ const t = getIntlayer(locale);
390
+
391
+ return {
392
+ title: t({
393
+ en: "My App",
394
+ fr: "Mon Application",
395
+ es: "Mi Aplicación",
396
+ tr: "Uygulamam",
397
+ }),
398
+ description: t({
399
+ en: "This is my Next.js app with Intlayer",
400
+ fr: "Ceci est mon application Next.js avec Intlayer",
401
+ es: "Esta es mi aplicación Next.js con Intlayer",
402
+ tr: "Bu, Intlayer ile Next.js uygulamamdır",
403
+ }),
404
+ };
405
+ };
406
+
407
+ export default function RootLayout({ children, params }) {
408
+ const { locale } = params;
409
+ const localeName = getLocaleName(locale);
410
+ const textDirection = getHTMLTextDir(locale);
411
+
412
+ return (
413
+ <html lang={locale} dir={textDirection}>
414
+ <body className={inter.className}>
415
+ <header>
416
+ <h1>{localeName}</h1>
417
+ </header>
418
+ {children}
419
+ </body>
420
+ </html>
421
+ );
422
+ }
423
+ ```
424
+
425
+ ## Adım 8: Sayfa Yönlendirme
426
+
427
+ Sayfa yönlendirmelerini çok dilli hale getirin:
428
+
429
+ ```tsx fileName="src/app/[locale]/page.tsx" codeFormat="typescript"
430
+ import { useIntlayer } from "next-intlayer";
431
+ import { Locales } from "intlayer";
432
+
433
+ export default function HomePage() {
434
+ const content = useIntlayer("home");
435
+
436
+ return (
437
+ <div>
438
+ <h1>{content.title}</h1>
439
+ <p>{content.description}</p>
440
+ </div>
441
+ );
442
+ }
443
+ ```
444
+
445
+ ```jsx fileName="src/app/[locale]/page.jsx" codeFormat="esm"
446
+ import { useIntlayer } from "next-intlayer";
447
+
448
+ export default function HomePage() {
449
+ const content = useIntlayer("home");
450
+
451
+ return (
452
+ <div>
453
+ <h1>{content.title}</h1>
454
+ <p>{content.description}</p>
455
+ </div>
456
+ );
457
+ }
458
+ ```
459
+
460
+ ## Adım 9: Meta Verilerin Uluslararasılaştırılması
461
+
462
+ Sayfa meta verilerini uluslararasılaştırın:
463
+
464
+ ```tsx fileName="src/app/[locale]/page.tsx" codeFormat="typescript"
465
+ import { getIntlayer } from "next-intlayer/server";
466
+ import { type Locales } from "intlayer";
467
+ import { type Metadata } from "next/types";
468
+
469
+ export const generateMetadata = (params: {
470
+ params: { locale: Locales };
471
+ }): Metadata => {
472
+ const { locale } = params.params;
473
+ const t = getIntlayer(locale);
474
+
475
+ return {
476
+ title: t({
477
+ en: "Home Page",
478
+ fr: "Page d'accueil",
479
+ es: "Página de inicio",
480
+ tr: "Ana Sayfa",
481
+ }),
482
+ description: t({
483
+ en: "Welcome to the home page",
484
+ fr: "Bienvenue sur la page d'accueil",
485
+ es: "Bienvenido a la página de inicio",
486
+ tr: "Ana sayfaya hoş geldiniz",
487
+ }),
488
+ };
489
+ };
490
+
491
+ export default function HomePage() {
492
+ const content = getIntlayer("home");
493
+
494
+ return (
495
+ <div>
496
+ <h1>{content.title}</h1>
497
+ <p>{content.description}</p>
498
+ </div>
499
+ );
500
+ }
501
+ ```
502
+
503
+ ```jsx fileName="src/app/[locale]/page.jsx" codeFormat="esm"
504
+ import { getIntlayer } from "next-intlayer/server";
505
+
506
+ export const generateMetadata = (params) => {
507
+ const { locale } = params.params;
508
+ const t = getIntlayer(locale);
509
+
510
+ return {
511
+ title: t({
512
+ en: "Home Page",
513
+ fr: "Page d'accueil",
514
+ es: "Página de inicio",
515
+ tr: "Ana Sayfa",
516
+ }),
517
+ description: t({
518
+ en: "Welcome to the home page",
519
+ fr: "Bienvenue sur la page d'accueil",
520
+ es: "Bienvenido a la página de inicio",
521
+ tr: "Ana sayfaya hoş geldiniz",
522
+ }),
523
+ };
524
+ };
525
+
526
+ export default function HomePage() {
527
+ const content = getIntlayer("home");
528
+
529
+ return (
530
+ <div>
531
+ <h1>{content.title}</h1>
532
+ <p>{content.description}</p>
533
+ </div>
534
+ );
535
+ }
536
+ ```
537
+
538
+ ## Adım 10: Site Haritası ve Robots.txt Kurulumu
539
+
540
+ Site haritanızı ve robots.txt dosyanızı çok dilli hale getirin:
541
+
542
+ ```typescript fileName="src/app/[locale]/sitemap.ts" codeFormat="typescript"
543
+ import { getLocalizedUrl } from "intlayer";
544
+ import { Locales } from "intlayer";
545
+ import { type MetadataRoute } from "next";
546
+
547
+ export default function sitemap(): MetadataRoute.Sitemap {
548
+ const locales = [
549
+ Locales.ENGLISH,
550
+ Locales.FRENCH,
551
+ Locales.SPANISH,
552
+ Locales.TURKISH,
553
+ ];
554
+
555
+ return [
556
+ {
557
+ url: getLocalizedUrl("/", Locales.ENGLISH),
558
+ lastModified: new Date(),
559
+ changeFrequency: "yearly",
560
+ priority: 1,
561
+ alternates: {
562
+ languages: locales.reduce(
563
+ (acc, locale) => ({
564
+ ...acc,
565
+ [locale]: getLocalizedUrl("/", locale),
566
+ }),
567
+ {}
568
+ ),
569
+ },
570
+ },
571
+ ];
572
+ }
573
+ ```
574
+
575
+ ```javascript fileName="src/app/[locale]/sitemap.js" codeFormat="esm"
576
+ import { getLocalizedUrl } from "intlayer";
577
+ import { Locales } from "intlayer";
578
+
579
+ export default function sitemap() {
580
+ const locales = [
581
+ Locales.ENGLISH,
582
+ Locales.FRENCH,
583
+ Locales.SPANISH,
584
+ Locales.TURKISH,
585
+ ];
586
+
587
+ return [
588
+ {
589
+ url: getLocalizedUrl("/", Locales.ENGLISH),
590
+ lastModified: new Date(),
591
+ changeFrequency: "yearly",
592
+ priority: 1,
593
+ alternates: {
594
+ languages: locales.reduce(
595
+ (acc, locale) => ({
596
+ ...acc,
597
+ [locale]: getLocalizedUrl("/", locale),
598
+ }),
599
+ {}
600
+ ),
601
+ },
602
+ },
603
+ ];
604
+ }
605
+ ```
606
+
607
+ ```typescript fileName="src/app/[locale]/robots.ts" codeFormat="typescript"
608
+ import { getLocalizedUrl } from "intlayer";
609
+ import { Locales } from "intlayer";
610
+ import { type MetadataRoute } from "next";
611
+
612
+ export default function robots(): MetadataRoute.Robots {
613
+ return {
614
+ rules: {
615
+ userAgent: "*",
616
+ allow: "/",
617
+ disallow: "/private/",
618
+ },
619
+ sitemap: getLocalizedUrl("/sitemap.xml", Locales.ENGLISH),
620
+ };
621
+ }
622
+ ```
623
+
624
+ ```javascript fileName="src/app/[locale]/robots.js" codeFormat="esm"
625
+ import { getLocalizedUrl } from "intlayer";
626
+ import { Locales } from "intlayer";
627
+
628
+ export default function robots() {
629
+ return {
630
+ rules: {
631
+ userAgent: "*",
632
+ allow: "/",
633
+ disallow: "/private/",
634
+ },
635
+ sitemap: getLocalizedUrl("/sitemap.xml", Locales.ENGLISH),
636
+ };
637
+ }
638
+ ```
639
+
640
+ ## (İsteğe Bağlı) Adım 11: Yerel Anahtarlayıcı Bileşeni Oluşturma
641
+
642
+ Uygulamanızın mevcut yerel ayarı saygı göstermesini sağlamak için, bir yerel anahtarlayıcı bileşeni oluşturabilirsiniz. Bu bileşen, dahili URL'leri otomatik olarak mevcut dille önekler, böylece örneğin Fransızca konuşan bir kullanıcı "Hakkında" sayfasına bir bağlantıya tıkladığında, `/fr/hakkinda` yerine `/hakkinda`ya yönlendirilir.
643
+
644
+ Bu davranış birkaç nedenden dolayı kullanışlıdır:
645
+
646
+ - **SEO ve Kullanıcı Deneyimi**: Yerelleştirilmiş URL'ler, arama motorlarının dil özel sayfalarını doğru şekilde indekslemesine yardımcı olur ve kullanıcılara tercih ettikleri dilde içerik sağlar.
647
+ - **Tutarlılık**: Uygulamanız boyunca yerelleştirilmiş bir bağlantı kullanarak, navigasyonun mevcut yerel ayar içinde kalmasını garanti edersiniz, beklenmedik dil anahtarlarını önlersiniz.
648
+ - **Bakım Kolaylığı**: URL yönetim mantığını tek bir bileşende merkezileştirmek, kod tabanınızı yönetmeyi ve uygulamanız büyüdükçe genişletmeyi basitleştirir.
649
+
650
+ Aşağıda, TypeScript'te yerelleştirilmiş bir `Link` bileşeninin uygulanması bulunmaktadır:
651
+
652
+ ```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat="typescript"
653
+ "use client";
654
+
655
+ import { useRouter } from "next/navigation";
656
+ import { useLocale } from "next-intlayer";
657
+ import { getLocalizedUrl } from "intlayer";
658
+ import { Locales } from "intlayer";
659
+
660
+ const LocaleSwitcher = () => {
661
+ const router = useRouter();
662
+ const { locale } = useLocale();
663
+
664
+ const handleLocaleChange = (newLocale: Locales) => {
665
+ const pathWithoutLocale = window.location.pathname.replace(
666
+ /^\/[a-z]{2}/,
667
+ ""
668
+ );
669
+ router.push(getLocalizedUrl(pathWithoutLocale, newLocale));
670
+ };
671
+
672
+ return (
673
+ <div>
674
+ <h2>Dil Seçin</h2>
675
+ <div>
676
+ {Object.values(Locales).map((localeItem) => (
677
+ <button
678
+ key={localeItem}
679
+ onClick={() => handleLocaleChange(localeItem)}
680
+ disabled={locale === localeItem}
681
+ >
682
+ {localeItem.toUpperCase()}
683
+ </button>
684
+ ))}
685
+ </div>
686
+ </div>
687
+ );
688
+ };
689
+
690
+ export default LocaleSwitcher;
691
+ ```
692
+
693
+ ```jsx fileName="src/components/LocaleSwitcher.jsx" codeFormat="esm"
694
+ "use client";
695
+
696
+ import { useRouter } from "next/navigation";
697
+ import { useLocale } from "next-intlayer";
698
+ import { getLocalizedUrl } from "intlayer";
699
+ import { Locales } from "intlayer";
700
+
701
+ const LocaleSwitcher = () => {
702
+ const router = useRouter();
703
+ const { locale } = useLocale();
704
+
705
+ const handleLocaleChange = (newLocale) => {
706
+ const pathWithoutLocale = window.location.pathname.replace(
707
+ /^\/[a-z]{2}/,
708
+ ""
709
+ );
710
+ router.push(getLocalizedUrl(pathWithoutLocale, newLocale));
711
+ };
712
+
713
+ return (
714
+ <div>
715
+ <h2>Dil Seçin</h2>
716
+ <div>
717
+ {Object.values(Locales).map((localeItem) => (
718
+ <button
719
+ key={localeItem}
720
+ onClick={() => handleLocaleChange(localeItem)}
721
+ disabled={locale === localeItem}
722
+ >
723
+ {localeItem.toUpperCase()}
724
+ </button>
725
+ ))}
726
+ </div>
727
+ </div>
728
+ );
729
+ };
730
+
731
+ export default LocaleSwitcher;
732
+ ```
733
+
734
+ ```jsx fileName="src/components/LocaleSwitcher.cjs" codeFormat="commonjs"
735
+ "use client";
736
+
737
+ const { useRouter } = require("next/navigation");
738
+ const { useLocale } = require("next-intlayer");
739
+ const { getLocalizedUrl } = require("intlayer");
740
+ const { Locales } = require("intlayer");
741
+
742
+ const LocaleSwitcher = () => {
743
+ const router = useRouter();
744
+ const { locale } = useLocale();
745
+
746
+ const handleLocaleChange = (newLocale) => {
747
+ const pathWithoutLocale = window.location.pathname.replace(
748
+ /^\/[a-z]{2}/,
749
+ ""
750
+ );
751
+ router.push(getLocalizedUrl(pathWithoutLocale, newLocale));
752
+ };
753
+
754
+ return (
755
+ <div>
756
+ <h2>Dil Seçin</h2>
757
+ <div>
758
+ {Object.values(Locales).map((localeItem) => (
759
+ <button
760
+ key={localeItem}
761
+ onClick={() => handleLocaleChange(localeItem)}
762
+ disabled={locale === localeItem}
763
+ >
764
+ {localeItem.toUpperCase()}
765
+ </button>
766
+ ))}
767
+ </div>
768
+ </div>
769
+ );
770
+ };
771
+
772
+ module.exports = LocaleSwitcher;
773
+ ```
774
+
775
+ > Alternatif bir yol, `useLocale` kancası tarafından sağlanan `setLocale` fonksiyonunu kullanmaktır. Bu fonksiyon, sayfa ön yüklemesine izin vermez ve sayfayı yeniden yükler.
776
+
777
+ > Bu durumda, `router.push` kullanarak yönlendirme olmadan, sadece sunucu tarafı kodunuz içeriğin yerel ayarını değiştirecektir.
778
+
779
+ ```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat="typescript"
780
+ "use client";
781
+
782
+ import { useRouter } from "next/navigation";
783
+ import { useLocale } from "next-intlayer";
784
+ import { getLocalizedUrl } from "intlayer";
785
+
786
+ // ... Geri kalan kod
787
+
788
+ const router = useRouter();
789
+ const { setLocale } = useLocale({
790
+ onLocaleChange: (locale) => {
791
+ router.push(getLocalizedUrl(pathWithoutLocale, locale));
792
+ },
793
+ });
794
+
795
+ return (
796
+ <button onClick={() => setLocale(Locales.FRENCH)}>Fransızca'ya Geç</button>
797
+ );
798
+ ```
799
+
800
+ > Dokümantasyon referansları:
801
+ >
802
+ > - [`useLocale` kancası](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/next-intlayer/useLocale.md)
803
+ > - [`getLocaleName` kancası](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/intlayer/getLocaleName.md)
804
+ > - [`getLocalizedUrl` kancası](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/intlayer/getLocalizedUrl.md)
805
+ > - [`getHTMLTextDir` kancası](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/intlayer/getHTMLTextDir.md)
806
+ > - [`hrefLang` özelliği](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
807
+ > - [`lang` özelliği](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
808
+ > - [`dir` özelliği](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
809
+ > - [`aria-current` özelliği](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
810
+
811
+ ### (İsteğe Bağlı) Adım 12: Yerelleştirilmiş Bağlantı Bileşeni Oluşturma
812
+
813
+ Uygulamanızın navigasyonunun mevcut yerel ayarı saygı göstermesini sağlamak için, özel bir `Link` bileşeni oluşturabilirsiniz. Bu bileşen, dahili URL'leri otomatik olarak mevcut dille önekler, böylece örneğin Fransızca konuşan bir kullanıcı "Hakkında" sayfasına bir bağlantıya tıkladığında, `/fr/hakkinda` yerine `/hakkinda`ya yönlendirilir.
814
+
815
+ Bu davranış birkaç nedenden dolayı kullanışlıdır:
816
+
817
+ - **SEO ve Kullanıcı Deneyimi**: Yerelleştirilmiş URL'ler, arama motorlarının dil özel sayfalarını doğru şekilde indekslemesine yardımcı olur ve kullanıcılara tercih ettikleri dilde içerik sağlar.
818
+ - **Tutarlılık**: Uygulamanız boyunca yerelleştirilmiş bir bağlantı kullanarak, navigasyonun mevcut yerel ayar içinde kalmasını garanti edersiniz, beklenmedik dil anahtarlarını önlersiniz.
819
+ - **Bakım Kolaylığı**: URL yönetim mantığını tek bir bileşende merkezileştirmek, kod tabanınızı yönetmeyi ve uygulamanız büyüdükçe genişletmeyi basitleştirir.
820
+
821
+ Aşağıda, TypeScript'te yerelleştirilmiş bir `Link` bileşeninin uygulanması bulunmaktadır:
822
+
823
+ ```tsx fileName="src/components/Link.tsx" codeFormat="typescript"
824
+ "use client";
825
+
826
+ import { getLocalizedUrl } from "intlayer";
827
+ import NextLink, { type LinkProps as NextLinkProps } from "next/link";
828
+ import { useLocale } from "next-intlayer";
829
+ import { forwardRef, PropsWithChildren, type ForwardedRef } from "react";
830
+
831
+ /**
832
+ * Verilen bir URL'nin harici olup olmadığını kontrol eden yardımcı fonksiyon.
833
+ * URL http:// veya https:// ile başlıyorsa, harici olarak kabul edilir.
834
+ */
835
+ export const checkIsExternalLink = (href?: string): boolean =>
836
+ /^https?:\/\//.test(href ?? "");
837
+
838
+ /**
839
+ * Href özelliğini mevcut yerel ayar temelinde uyarlayan özel bir Link bileşeni.
840
+ * Dahili bağlantılar için, `getLocalizedUrl` kullanarak URL'yi yerel ayar ile önekler (örneğin, /fr/hakkinda).
841
+ * Bu, navigasyonun aynı yerel ayar bağlamında kalmasını sağlar.
842
+ */
843
+ export const Link = forwardRef<
844
+ HTMLAnchorElement,
845
+ PropsWithChildren<NextLinkProps>
846
+ >(({ href, children, ...props }, ref: ForwardedRef<HTMLAnchorElement>) => {
847
+ const { locale } = useLocale();
848
+ const isExternalLink = checkIsExternalLink(href.toString());
849
+
850
+ // Bağlantı dahili ise ve geçerli bir href sağlanmışsa, yerelleştirilmiş URL'yi alın.
851
+ const hrefI18n: NextLinkProps["href"] =
852
+ href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
853
+
854
+ return (
855
+ <NextLink href={hrefI18n} ref={ref} {...props}>
856
+ {children}
857
+ </NextLink>
858
+ );
859
+ });
860
+
861
+ Link.displayName = "Link";
862
+ ```
863
+
864
+ ```jsx fileName="src/components/Link.mjx" codeFormat="esm"
865
+ 'use client';
866
+
867
+ import { getLocalizedUrl } from 'intlayer';
868
+ import NextLink, { type LinkProps as NextLinkProps } from 'next/link';
869
+ import { useLocale } from 'next-intlayer';
870
+ import { forwardRef, PropsWithChildren, type ForwardedRef } from 'react';
871
+
872
+ /**
873
+ * Verilen bir URL'nin harici olup olmadığını kontrol eden yardımcı fonksiyon.
874
+ * URL http:// veya https:// ile başlıyorsa, harici olarak kabul edilir.
875
+ */
876
+ export const checkIsExternalLink = (href) =>
877
+ /^https?:\/\//.test(href ?? '');
878
+
879
+ /**
880
+ * Href özelliğini mevcut yerel ayar temelinde uyarlayan özel bir Link bileşeni.
881
+ * Dahili bağlantılar için, `getLocalizedUrl` kullanarak URL'yi yerel ayar ile önekler (örneğin, /fr/hakkinda).
882
+ * Bu, navigasyonun aynı yerel ayar bağlamında kalmasını sağlar.
883
+ */
884
+ export const Link = forwardRef(({ href, children, ...props }, ref) => {
885
+ const { locale } = useLocale();
886
+ const isExternalLink = checkIsExternalLink(href.toString());
887
+
888
+ // Bağlantı dahili ise ve geçerli bir href sağlanmışsa, yerelleştirilmiş URL'yi alın.
889
+ const hrefI18n =
890
+ href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
891
+
892
+ return (
893
+ <NextLink href={hrefI18n} ref={ref} {...props}>
894
+ {children}
895
+ </NextLink>
896
+ );
897
+ });
898
+
899
+ Link.displayName = 'Link';
900
+ ```
901
+
902
+ ```jsx fileName="src/components/Link.csx" codeFormat="commonjs"
903
+ 'use client';
904
+
905
+ const { getLocalizedUrl } = require("intlayer");
906
+ const NextLink = require("next/link");
907
+ const { useLocale } = require("next-intlayer");
908
+ const { forwardRef } = require("react");
909
+
910
+ /**
911
+ * Verilen bir URL'nin harici olup olmadığını kontrol eden yardımcı fonksiyon.
912
+ * URL http:// veya https:// ile başlıyorsa, harici olarak kabul edilir.
913
+ */
914
+ const checkIsExternalLink = (href) =>
915
+ /^https?:\/\//.test(href ?? '');
916
+
917
+
918
+ const Link = forwardRef(({ href, children, ...props }, ref) => {
919
+ const { locale } = useLocale();
920
+ const isExternalLink = checkIsExternalLink(href.toString());
921
+
922
+ // Bağlantı dahili ise ve geçerli bir href sağlanmışsa, yerelleştirilmiş URL'yi alın.
923
+ const hrefI18n: NextLinkProps['href'] =
924
+ href && !isExternalLink ? getLocalizedUrl(href.toString(), locale) : href;
925
+
926
+ return (
927
+ <NextLink href={hrefI18n} ref={ref} {...props}>
928
+ {children}
929
+ </NextLink>
930
+ );
931
+ });
932
+
933
+ Link.displayName = 'Link';
934
+ ```
935
+
936
+ #### Nasıl Çalışır
937
+
938
+ - **Harici Bağlantıları Algılama**:
939
+ Yardımcı fonksiyon `checkIsExternalLink`, bir URL'nin harici olup olmadığını belirler. Harici bağlantılar değişmeden bırakılır çünkü yerelleştirmeye ihtiyaçları yoktur.
940
+
941
+ - **Mevcut Yerel Ayarı Alma**:
942
+ `useLocale` kancası mevcut yerel ayarı sağlar (örneğin, Fransızca için `fr`).
943
+
944
+ - **URL'yi Yerelleştirme**:
945
+ Dahili bağlantılar (yani harici olmayan) için, `getLocalizedUrl` kullanarak URL'yi otomatik olarak mevcut yerel ayar ile önekler. Bu, kullanıcınız Fransızca ise, `/hakkinda` href'ini geçmek onu `/fr/hakkinda`ya dönüştürür.
946
+
947
+ - **Bağlantıyı Döndürme**:
948
+ Bileşen, yerelleştirilmiş URL ile bir `<a>` elementi döndürür, böylece navigasyon yerel ayar ile tutarlı olur.
949
+
950
+ Bu `Link` bileşenini uygulamanız boyunca entegre ederek, tutarlı ve dil bilincine sahip bir kullanıcı deneyimi sürdürürsünüzken aynı zamanda gelişmiş SEO ve kullanılabilirlikten de yararlanırsınız.
951
+
952
+ ### (İsteğe Bağlı) Adım 13: Paket Boyutunuzu Optimize Edin
953
+
954
+ `next-intlayer` kullanırken, sözlükler varsayılan olarak her sayfa için pakete dahil edilir. Paket boyutunu optimize etmek için, Intlayer isteğe bağlı bir SWC eklentisi sağlar ki bu, `useIntlayer` çağrılarını akıllıca makrolar kullanarak değiştirir. Bu, sözlüklerin sadece onları gerçekten kullanan sayfalar için paketlere dahil edilmesini sağlar.
955
+
956
+ Bu optimizasyonu etkinleştirmek için, `@intlayer/swc` paketini kurun. Kurulduktan sonra, `next-intlayer` eklentiyi otomatik olarak algılayacak ve kullanacaktır:
957
+
958
+ ```bash packageManager="npm"
959
+ npm install @intlayer/swc --save-dev
960
+ ```
961
+
962
+ ```bash packageManager="pnpm"
963
+ pnpm add @intlayer/swc --save-dev
964
+ ```
965
+
966
+ ```bash packageManager="yarn"
967
+ yarn add @intlayer/swc --save-dev
968
+ ```
969
+
970
+ > Not: Bu optimizasyon sadece Next.js 13 ve üzeri için kullanılabilir.
971
+
972
+ > Not: Bu paket varsayılan olarak kurulmaz çünkü SWC eklentileri Next.js'te hala deneyseldir. Gelecekte değişebilir.
973
+
974
+ ### TypeScript Yapılandırma
975
+
976
+ Intlayer, TypeScript'ten faydalanmak ve kod tabanınızı daha güçlü hale getirmek için modül genişletmesi kullanır.
977
+
978
+ ![alt text](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png)
979
+
980
+ ![alt text](https://github.com/aymericzip/intlayer/blob/main/docs/assets/translation_error.png)
981
+
982
+ TypeScript yapılandırmanızın otomatik olarak oluşturulan türleri içerdiğinden emin olun.
983
+
984
+ ```json5 fileName="tsconfig.json"
985
+ {
986
+ // ... Mevcut TypeScript yapılandırmalarınız
987
+ "include": [
988
+ // ... Mevcut TypeScript yapılandırmalarınız
989
+ ".intlayer/**/*.ts", // Otomatik olarak oluşturulan türleri dahil edin
990
+ ],
991
+ }
992
+ ```
993
+
994
+ ### Git Yapılandırma
995
+
996
+ Intlayer tarafından oluşturulan dosyaları yok saymanız önerilir. Bu, onları Git deposuna göndermemenizi sağlar.
997
+
998
+ Bunu yapmak için, `.gitignore` dosyanıza aşağıdaki talimatları ekleyebilirsiniz:
999
+
1000
+ ```plaintext fileName=".gitignore"
1001
+ # Intlayer tarafından oluşturulan dosyaları yok say
1002
+ .intlayer
1003
+ ```
1004
+
1005
+ ### VS Code Uzantısı
1006
+
1007
+ Intlayer ile geliştirme deneyiminizi geliştirmek için, resmi **Intlayer VS Code Uzantısı**'nı kurabilirsiniz.
1008
+
1009
+ [VS Code Marketplace'ten Kurun](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
1010
+
1011
+ Bu uzantı şunları sağlar:
1012
+
1013
+ - **Çeviri anahtarları için otomatik tamamlama**.
1014
+ - **Eksik çeviriler için gerçek zamanlı hata algılama**.
1015
+ - **Çevrilmiş içeriğin satır içi önizlemeleri**.
1016
+ - **Çevirileri kolayca oluşturmak ve güncellemek için hızlı eylemler**.
1017
+
1018
+ Uzantının nasıl kullanılacağı hakkında daha fazla detay için, [Intlayer VS Code Uzantısı dokümantasyonu](https://intlayer.org/doc/vs-code-extension)na bakın.
1019
+
1020
+ ### Daha Fazla Bilgi Edinin
1021
+
1022
+ Daha fazla ilerlemek için, [görsel düzenleyici](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md)yi uygulayabilir veya içeriğinizi [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md) kullanarak harici hale getirebilirsiniz.
1023
+
1024
+ ## Dokümantasyon Geçmişi
1025
+
1026
+ | Sürüm | Tarih | Değişiklikler |
1027
+ | ------ | ---------- | ----------------------------------------------------------------- |
1028
+ | 5.6.0 | 2025-07-06 | `withIntlayer()` fonksiyonunu promise tabanlı fonksiyona dönüştür |
1029
+ | 5.5.10 | 2025-06-29 | Geçmişi başlat |