@intlayer/docs 7.4.0 → 7.5.0-canary.1

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 (298) hide show
  1. package/blog/ar/intlayer_with_i18next.md +2 -0
  2. package/blog/ar/intlayer_with_next-i18next.md +2 -0
  3. package/blog/ar/intlayer_with_next-intl.md +2 -0
  4. package/blog/ar/intlayer_with_react-i18next.md +2 -0
  5. package/blog/ar/intlayer_with_react-intl.md +2 -0
  6. package/blog/ar/intlayer_with_vue-i18n.md +2 -0
  7. package/blog/de/intlayer_with_i18next.md +2 -0
  8. package/blog/de/intlayer_with_next-i18next.md +1 -0
  9. package/blog/de/intlayer_with_next-intl.md +2 -0
  10. package/blog/de/intlayer_with_react-i18next.md +2 -0
  11. package/blog/de/intlayer_with_react-intl.md +2 -0
  12. package/blog/de/intlayer_with_vue-i18n.md +2 -0
  13. package/blog/en/intlayer_with_i18next.md +6 -0
  14. package/blog/en/intlayer_with_next-i18next.md +3 -0
  15. package/blog/en/intlayer_with_next-intl.md +3 -0
  16. package/blog/en/intlayer_with_react-i18next.md +3 -0
  17. package/blog/en/intlayer_with_react-intl.md +3 -0
  18. package/blog/en/intlayer_with_vue-i18n.md +3 -0
  19. package/blog/en-GB/intlayer_with_i18next.md +2 -0
  20. package/blog/en-GB/intlayer_with_next-i18next.md +2 -0
  21. package/blog/en-GB/intlayer_with_next-intl.md +2 -0
  22. package/blog/en-GB/intlayer_with_react-i18next.md +2 -0
  23. package/blog/en-GB/intlayer_with_react-intl.md +2 -0
  24. package/blog/en-GB/intlayer_with_vue-i18n.md +2 -0
  25. package/blog/es/intlayer_with_i18next.md +2 -0
  26. package/blog/es/intlayer_with_next-i18next.md +2 -0
  27. package/blog/es/intlayer_with_next-intl.md +2 -0
  28. package/blog/es/intlayer_with_react-i18next.md +2 -0
  29. package/blog/es/intlayer_with_react-intl.md +2 -0
  30. package/blog/es/intlayer_with_vue-i18n.md +2 -0
  31. package/blog/fr/intlayer_with_i18next.md +2 -0
  32. package/blog/fr/intlayer_with_next-i18next.md +2 -0
  33. package/blog/fr/intlayer_with_next-intl.md +2 -0
  34. package/blog/fr/intlayer_with_react-i18next.md +2 -0
  35. package/blog/fr/intlayer_with_react-intl.md +2 -0
  36. package/blog/fr/intlayer_with_vue-i18n.md +2 -0
  37. package/blog/hi/intlayer_with_i18next.md +2 -0
  38. package/blog/hi/intlayer_with_next-i18next.md +2 -0
  39. package/blog/hi/intlayer_with_next-intl.md +2 -0
  40. package/blog/hi/intlayer_with_react-i18next.md +2 -0
  41. package/blog/hi/intlayer_with_react-intl.md +2 -0
  42. package/blog/hi/intlayer_with_vue-i18n.md +2 -0
  43. package/blog/id/intlayer_with_i18next.md +2 -0
  44. package/blog/id/intlayer_with_next-i18next.md +2 -0
  45. package/blog/id/intlayer_with_next-intl.md +2 -0
  46. package/blog/id/intlayer_with_react-i18next.md +2 -0
  47. package/blog/id/intlayer_with_react-intl.md +2 -0
  48. package/blog/id/intlayer_with_vue-i18n.md +2 -0
  49. package/blog/it/intlayer_with_i18next.md +2 -0
  50. package/blog/it/intlayer_with_next-i18next.md +2 -0
  51. package/blog/it/intlayer_with_next-intl.md +2 -0
  52. package/blog/it/intlayer_with_react-i18next.md +2 -0
  53. package/blog/it/intlayer_with_react-intl.md +2 -0
  54. package/blog/it/intlayer_with_vue-i18n.md +2 -0
  55. package/blog/ja/intlayer_with_i18next.md +2 -0
  56. package/blog/ja/intlayer_with_next-i18next.md +1 -0
  57. package/blog/ja/intlayer_with_next-intl.md +2 -0
  58. package/blog/ja/intlayer_with_react-i18next.md +2 -0
  59. package/blog/ja/intlayer_with_react-intl.md +2 -0
  60. package/blog/ja/intlayer_with_vue-i18n.md +2 -0
  61. package/blog/ko/intlayer_with_i18next.md +2 -0
  62. package/blog/ko/intlayer_with_next-i18next.md +2 -0
  63. package/blog/ko/intlayer_with_next-intl.md +2 -0
  64. package/blog/ko/intlayer_with_react-i18next.md +2 -0
  65. package/blog/ko/intlayer_with_react-intl.md +2 -0
  66. package/blog/ko/intlayer_with_vue-i18n.md +2 -0
  67. package/blog/pl/intlayer_with_i18next.md +2 -0
  68. package/blog/pl/intlayer_with_next-i18next.md +2 -0
  69. package/blog/pl/intlayer_with_next-intl.md +2 -0
  70. package/blog/pl/intlayer_with_react-i18next.md +2 -0
  71. package/blog/pl/intlayer_with_react-intl.md +2 -0
  72. package/blog/pl/intlayer_with_vue-i18n.md +2 -0
  73. package/blog/pt/intlayer_with_i18next.md +2 -0
  74. package/blog/pt/intlayer_with_next-i18next.md +2 -0
  75. package/blog/pt/intlayer_with_next-intl.md +2 -0
  76. package/blog/pt/intlayer_with_react-i18next.md +2 -0
  77. package/blog/pt/intlayer_with_react-intl.md +2 -0
  78. package/blog/pt/intlayer_with_vue-i18n.md +2 -0
  79. package/blog/ru/intlayer_with_i18next.md +2 -0
  80. package/blog/ru/intlayer_with_next-i18next.md +2 -0
  81. package/blog/ru/intlayer_with_next-intl.md +2 -0
  82. package/blog/ru/intlayer_with_react-i18next.md +2 -0
  83. package/blog/ru/intlayer_with_react-intl.md +2 -0
  84. package/blog/ru/intlayer_with_vue-i18n.md +2 -0
  85. package/blog/tr/intlayer_with_i18next.md +2 -0
  86. package/blog/tr/intlayer_with_next-i18next.md +2 -0
  87. package/blog/tr/intlayer_with_next-intl.md +2 -0
  88. package/blog/tr/intlayer_with_react-i18next.md +2 -0
  89. package/blog/tr/intlayer_with_react-intl.md +2 -0
  90. package/blog/tr/intlayer_with_vue-i18n.md +2 -0
  91. package/blog/vi/intlayer_with_i18next.md +2 -0
  92. package/blog/vi/intlayer_with_next-i18next.md +2 -0
  93. package/blog/vi/intlayer_with_next-intl.md +2 -0
  94. package/blog/vi/intlayer_with_react-i18next.md +2 -0
  95. package/blog/vi/intlayer_with_react-intl.md +2 -0
  96. package/blog/vi/intlayer_with_vue-i18n.md +2 -0
  97. package/blog/zh/intlayer_with_i18next.md +2 -0
  98. package/blog/zh/intlayer_with_next-i18next.md +2 -0
  99. package/blog/zh/intlayer_with_next-intl.md +2 -0
  100. package/blog/zh/intlayer_with_react-i18next.md +2 -0
  101. package/blog/zh/intlayer_with_react-intl.md +2 -0
  102. package/blog/zh/intlayer_with_vue-i18n.md +2 -0
  103. package/dist/cjs/generated/docs.entry.cjs +19 -0
  104. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  105. package/dist/esm/generated/docs.entry.mjs +19 -0
  106. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  107. package/dist/types/generated/docs.entry.d.ts +1 -0
  108. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  109. package/docs/ar/cli/index.md +5 -0
  110. package/docs/ar/cli/login.md +157 -0
  111. package/docs/ar/configuration.md +12 -0
  112. package/docs/ar/dictionary/content_file.md +24 -1
  113. package/docs/ar/intlayer_with_astro.md +1 -1
  114. package/docs/ar/intlayer_with_express.md +1 -1
  115. package/docs/ar/intlayer_with_nestjs.md +1 -1
  116. package/docs/ar/intlayer_with_next-i18next.md +1 -0
  117. package/docs/ar/intlayer_with_next-intl.md +1 -0
  118. package/docs/ar/intlayer_with_tanstack.md +1 -12
  119. package/docs/ar/plugins/sync-json.md +27 -2
  120. package/docs/de/cli/index.md +5 -0
  121. package/docs/de/cli/login.md +160 -0
  122. package/docs/de/configuration.md +12 -0
  123. package/docs/de/dictionary/content_file.md +24 -1
  124. package/docs/de/intlayer_with_astro.md +1 -1
  125. package/docs/de/intlayer_with_express.md +1 -1
  126. package/docs/de/intlayer_with_nestjs.md +1 -1
  127. package/docs/de/intlayer_with_next-i18next.md +1 -0
  128. package/docs/de/intlayer_with_next-intl.md +1 -0
  129. package/docs/de/intlayer_with_tanstack.md +1 -12
  130. package/docs/de/plugins/sync-json.md +27 -2
  131. package/docs/en/cli/index.md +5 -0
  132. package/docs/en/cli/login.md +157 -0
  133. package/docs/en/configuration.md +13 -0
  134. package/docs/en/dictionary/content_file.md +24 -1
  135. package/docs/en/index.md +1 -0
  136. package/docs/en/intlayer_with_astro.md +1 -1
  137. package/docs/en/intlayer_with_express.md +1 -1
  138. package/docs/en/intlayer_with_nestjs.md +1 -2
  139. package/docs/en/intlayer_with_next-i18next.md +1 -0
  140. package/docs/en/intlayer_with_next-intl.md +1 -0
  141. package/docs/en/intlayer_with_tanstack.md +7 -17
  142. package/docs/en/plugins/sync-json.md +53 -2
  143. package/docs/en-GB/cli/index.md +5 -0
  144. package/docs/en-GB/cli/login.md +181 -0
  145. package/docs/en-GB/configuration.md +12 -0
  146. package/docs/en-GB/dictionary/content_file.md +24 -1
  147. package/docs/en-GB/intlayer_with_astro.md +1 -1
  148. package/docs/en-GB/intlayer_with_express.md +1 -1
  149. package/docs/en-GB/intlayer_with_nestjs.md +1 -1
  150. package/docs/en-GB/intlayer_with_next-i18next.md +1 -0
  151. package/docs/en-GB/intlayer_with_next-intl.md +1 -0
  152. package/docs/en-GB/intlayer_with_tanstack.md +1 -12
  153. package/docs/en-GB/plugins/sync-json.md +26 -1
  154. package/docs/es/cli/index.md +5 -0
  155. package/docs/es/cli/login.md +182 -0
  156. package/docs/es/configuration.md +12 -0
  157. package/docs/es/dictionary/content_file.md +24 -1
  158. package/docs/es/intlayer_with_astro.md +1 -1
  159. package/docs/es/intlayer_with_express.md +1 -1
  160. package/docs/es/intlayer_with_nestjs.md +1 -1
  161. package/docs/es/intlayer_with_next-i18next.md +1 -0
  162. package/docs/es/intlayer_with_next-intl.md +1 -0
  163. package/docs/es/intlayer_with_tanstack.md +1 -12
  164. package/docs/es/plugins/sync-json.md +27 -2
  165. package/docs/fr/cli/index.md +5 -0
  166. package/docs/fr/cli/login.md +185 -0
  167. package/docs/fr/configuration.md +12 -0
  168. package/docs/fr/dictionary/content_file.md +24 -1
  169. package/docs/fr/intlayer_with_astro.md +1 -1
  170. package/docs/fr/intlayer_with_express.md +1 -1
  171. package/docs/fr/intlayer_with_nestjs.md +1 -1
  172. package/docs/fr/intlayer_with_next-i18next.md +1 -0
  173. package/docs/fr/intlayer_with_next-intl.md +1 -0
  174. package/docs/fr/intlayer_with_tanstack.md +1 -12
  175. package/docs/fr/plugins/sync-json.md +27 -2
  176. package/docs/hi/cli/index.md +5 -0
  177. package/docs/hi/cli/login.md +181 -0
  178. package/docs/hi/configuration.md +12 -0
  179. package/docs/hi/dictionary/content_file.md +24 -1
  180. package/docs/hi/intlayer_with_astro.md +1 -1
  181. package/docs/hi/intlayer_with_express.md +1 -1
  182. package/docs/hi/intlayer_with_nestjs.md +1 -1
  183. package/docs/hi/intlayer_with_next-i18next.md +1 -0
  184. package/docs/hi/intlayer_with_next-intl.md +1 -0
  185. package/docs/hi/intlayer_with_tanstack.md +1 -12
  186. package/docs/hi/plugins/sync-json.md +27 -2
  187. package/docs/id/cli/index.md +5 -0
  188. package/docs/id/cli/login.md +157 -0
  189. package/docs/id/configuration.md +12 -0
  190. package/docs/id/dictionary/content_file.md +24 -1
  191. package/docs/id/intlayer_with_astro.md +1 -1
  192. package/docs/id/intlayer_with_express.md +1 -1
  193. package/docs/id/intlayer_with_nestjs.md +1 -1
  194. package/docs/id/intlayer_with_next-i18next.md +1 -0
  195. package/docs/id/intlayer_with_next-intl.md +1 -0
  196. package/docs/id/intlayer_with_tanstack.md +1 -12
  197. package/docs/id/plugins/sync-json.md +27 -2
  198. package/docs/it/cli/index.md +5 -0
  199. package/docs/it/cli/login.md +157 -0
  200. package/docs/it/configuration.md +12 -0
  201. package/docs/it/dictionary/content_file.md +24 -1
  202. package/docs/it/intlayer_with_astro.md +1 -1
  203. package/docs/it/intlayer_with_express.md +1 -1
  204. package/docs/it/intlayer_with_nestjs.md +1 -1
  205. package/docs/it/intlayer_with_next-i18next.md +1 -0
  206. package/docs/it/intlayer_with_next-intl.md +1 -0
  207. package/docs/it/intlayer_with_tanstack.md +1 -12
  208. package/docs/it/plugins/sync-json.md +27 -2
  209. package/docs/ja/cli/index.md +5 -0
  210. package/docs/ja/cli/login.md +159 -0
  211. package/docs/ja/configuration.md +12 -0
  212. package/docs/ja/dictionary/content_file.md +24 -1
  213. package/docs/ja/intlayer_with_astro.md +1 -1
  214. package/docs/ja/intlayer_with_express.md +1 -1
  215. package/docs/ja/intlayer_with_nestjs.md +1 -1
  216. package/docs/ja/intlayer_with_next-i18next.md +1 -0
  217. package/docs/ja/intlayer_with_next-intl.md +1 -0
  218. package/docs/ja/intlayer_with_tanstack.md +1 -12
  219. package/docs/ja/plugins/sync-json.md +27 -2
  220. package/docs/ko/cli/index.md +5 -0
  221. package/docs/ko/cli/login.md +188 -0
  222. package/docs/ko/configuration.md +12 -0
  223. package/docs/ko/dictionary/content_file.md +44 -1
  224. package/docs/ko/intlayer_with_astro.md +1 -1
  225. package/docs/ko/intlayer_with_express.md +1 -1
  226. package/docs/ko/intlayer_with_nestjs.md +1 -1
  227. package/docs/ko/intlayer_with_next-i18next.md +1 -0
  228. package/docs/ko/intlayer_with_next-intl.md +1 -0
  229. package/docs/ko/intlayer_with_tanstack.md +1 -12
  230. package/docs/ko/plugins/sync-json.md +27 -2
  231. package/docs/pl/cli/index.md +5 -0
  232. package/docs/pl/cli/login.md +187 -0
  233. package/docs/pl/configuration.md +12 -0
  234. package/docs/pl/dictionary/content_file.md +24 -1
  235. package/docs/pl/intlayer_with_astro.md +2 -2
  236. package/docs/pl/intlayer_with_express.md +1 -1
  237. package/docs/pl/intlayer_with_nestjs.md +1 -1
  238. package/docs/pl/intlayer_with_next-i18next.md +1 -0
  239. package/docs/pl/intlayer_with_next-intl.md +1 -0
  240. package/docs/pl/intlayer_with_tanstack.md +1 -12
  241. package/docs/pl/plugins/sync-json.md +24 -2
  242. package/docs/pt/cli/index.md +5 -0
  243. package/docs/pt/cli/login.md +186 -0
  244. package/docs/pt/configuration.md +12 -0
  245. package/docs/pt/dictionary/content_file.md +24 -1
  246. package/docs/pt/intlayer_with_astro.md +1 -1
  247. package/docs/pt/intlayer_with_express.md +1 -1
  248. package/docs/pt/intlayer_with_nestjs.md +1 -1
  249. package/docs/pt/intlayer_with_next-i18next.md +1 -0
  250. package/docs/pt/intlayer_with_next-intl.md +1 -0
  251. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +570 -0
  252. package/docs/pt/intlayer_with_tanstack.md +1 -12
  253. package/docs/pt/plugins/sync-json.md +27 -2
  254. package/docs/ru/cli/index.md +5 -0
  255. package/docs/ru/cli/login.md +181 -0
  256. package/docs/ru/configuration.md +12 -0
  257. package/docs/ru/dictionary/content_file.md +44 -1
  258. package/docs/ru/intlayer_with_astro.md +1 -1
  259. package/docs/ru/intlayer_with_express.md +1 -1
  260. package/docs/ru/intlayer_with_nestjs.md +1 -1
  261. package/docs/ru/intlayer_with_next-i18next.md +1 -0
  262. package/docs/ru/intlayer_with_next-intl.md +1 -0
  263. package/docs/ru/intlayer_with_tanstack.md +1 -12
  264. package/docs/ru/plugins/sync-json.md +27 -2
  265. package/docs/tr/cli/index.md +5 -0
  266. package/docs/tr/cli/login.md +171 -0
  267. package/docs/tr/configuration.md +12 -0
  268. package/docs/tr/dictionary/content_file.md +44 -1
  269. package/docs/tr/intlayer_with_astro.md +1 -1
  270. package/docs/tr/intlayer_with_express.md +1 -1
  271. package/docs/tr/intlayer_with_next-i18next.md +1 -0
  272. package/docs/tr/intlayer_with_next-intl.md +1 -0
  273. package/docs/tr/intlayer_with_tanstack.md +1 -12
  274. package/docs/tr/plugins/sync-json.md +27 -2
  275. package/docs/vi/cli/index.md +5 -0
  276. package/docs/vi/cli/login.md +186 -0
  277. package/docs/vi/configuration.md +12 -0
  278. package/docs/vi/dictionary/content_file.md +24 -1
  279. package/docs/vi/intlayer_with_astro.md +1 -1
  280. package/docs/vi/intlayer_with_express.md +1 -1
  281. package/docs/vi/intlayer_with_nestjs.md +1 -1
  282. package/docs/vi/intlayer_with_next-i18next.md +1 -0
  283. package/docs/vi/intlayer_with_next-intl.md +1 -0
  284. package/docs/vi/intlayer_with_tanstack.md +1 -12
  285. package/docs/vi/plugins/sync-json.md +27 -2
  286. package/docs/zh/cli/index.md +5 -0
  287. package/docs/zh/cli/login.md +182 -0
  288. package/docs/zh/configuration.md +12 -0
  289. package/docs/zh/dictionary/content_file.md +44 -1
  290. package/docs/zh/intlayer_with_astro.md +1 -1
  291. package/docs/zh/intlayer_with_express.md +1 -1
  292. package/docs/zh/intlayer_with_nestjs.md +1 -1
  293. package/docs/zh/intlayer_with_next-i18next.md +1 -0
  294. package/docs/zh/intlayer_with_next-intl.md +1 -0
  295. package/docs/zh/intlayer_with_tanstack.md +1 -12
  296. package/docs/zh/plugins/sync-json.md +27 -2
  297. package/package.json +9 -9
  298. package/src/generated/docs.entry.ts +19 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-02-07
3
- updatedAt: 2025-09-20
3
+ updatedAt: 2025-12-13
4
4
  title: İçerik Dosyası
5
5
  description: İçerik bildirim dosyalarınız için uzantıları nasıl özelleştireceğinizi öğrenin. Projenizde koşulları verimli bir şekilde uygulamak için bu dokümantasyonu takip edin.
6
6
  keywords:
@@ -12,6 +12,9 @@ slugs:
12
12
  - concept
13
13
  - content
14
14
  history:
15
+ - version: 7.5.0
16
+ date: 2025-12-13
17
+ changes: ICU ve i18next format desteği eklendi
15
18
  - version: 6.0.0
16
19
  date: 2025-09-20
17
20
  changes: Alanlar dokümantasyonu eklendi
@@ -385,6 +388,46 @@ Sözlükleri kategorize etmek ve düzenlemek için kullanılan string dizisi. Et
385
388
  }
386
389
  ```
387
390
 
391
+ #### `format` ('intlayer' | 'icu' | 'i18next')
392
+
393
+ Sözlük içeriği için kullanılacak formatlayıcıyı belirtir. Bu, farklı mesaj formatlama sözdizimlerini kullanmanıza olanak tanır.
394
+
395
+ - `'intlayer'`: Varsayılan Intlayer formatlayıcısı.
396
+ - `'icu'`: ICU mesaj formatlamasını kullanır.
397
+ - `'i18next'`: i18next mesaj formatlamasını kullanır.
398
+
399
+ **Örnek:**
400
+
401
+ ```typescript
402
+ {
403
+ key: "my-dictionary",
404
+ format: "icu",
405
+ content: {
406
+ message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
407
+ }
408
+ }
409
+ ```
410
+
411
+ #### `format` ('intlayer' | 'icu' | 'i18next')
412
+
413
+ Sözlük içeriği için kullanılacak formatörü belirtir. Bu, farklı mesaj formatlama sözdizimlerini kullanmaya olanak tanır.
414
+
415
+ - `'intlayer'`: Varsayılan Intlayer formatörü.
416
+ - `'icu'`: ICU mesaj formatlamasını kullanır.
417
+ - `'i18next'`: i18next mesaj formatlamasını kullanır.
418
+
419
+ **Örnek:**
420
+
421
+ ```typescript
422
+ {
423
+ key: "my-dictionary",
424
+ format: "icu",
425
+ content: {
426
+ message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
427
+ }
428
+ }
429
+ ```
430
+
388
431
  #### `locale` (LocalesValues)
389
432
 
390
433
  Sözlüğü, içerikte bildirilen her alanın otomatik olarak bir çeviri düğümüne dönüştürüleceği yerel bazlı bir sözlüğe dönüştürür. Bu özellik ayarlandığında:
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-03-07
3
3
  updatedAt: 2025-10-03
4
4
  title: Astro uygulamanızı nasıl çevirirsiniz – i18n rehberi 2025
5
- description: Intlayer kullanarak Vite ve React uygulamanıza uluslararasılaştırma (i18n) nasıl eklenir öğrenin. Uygulamanızı çok dilli yapmak için bu kılavuzu takip edin.
5
+ description: Intlayer kullanarak Astro web sitenize uluslararasılaştırma (i18n) nasıl eklenir öğrenin. Sitenizi çok dilli yapmak için bu kılavuzu takip edin.
6
6
  keywords:
7
7
  - Uluslararasılaştırma
8
8
  - Dokümantasyon
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-09-07
3
3
  updatedAt: 2025-09-07
4
4
  title: Express backend uygulamanızı nasıl çevirirsiniz – i18n rehberi 2025
5
- description: Vite arka ucunuzu çok dilli hale getirmeyi keşfedin. Dokümantasyonu takip ederek uluslararasılaştırma (i18n) yapın ve çevirin.
5
+ description: Express arka ucunuzu çok dilli hale getirmeyi keşfedin. Dokümantasyonu takip ederek uluslararasılaştırma (i18n) yapın ve çevirin.
6
6
  keywords:
7
7
  - Uluslararasılaştırma
8
8
  - Dokümantasyon
@@ -580,6 +580,7 @@ const config: IntlayerConfig = {
580
580
  },
581
581
  plugins: [
582
582
  syncJSON({
583
+ format: "i18next",
583
584
  source: ({ locale }) => `./locales/${locale}.json`,
584
585
  }),
585
586
  ],
@@ -419,6 +419,7 @@ const config: IntlayerConfig = {
419
419
  plugins: [
420
420
  // Namespace başına klasör yapınızı Intlayer ile senkronize tutun
421
421
  syncJSON({
422
+ format: "icu",
422
423
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
423
424
  }),
424
425
  ],
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-09-09
3
- updatedAt: 2025-09-09
3
+ updatedAt: 2025-12-11
4
4
  title: Tanstack Start uygulamanızı nasıl çevirirsiniz – i18n rehberi 2025
5
5
  description: Tanstack Start uygulamanıza Intlayer kullanarak uluslararasılaştırma (i18n) nasıl eklenir öğrenin. Uygulamanızı yerel dil yönlendirmesi ile çok dilli hale getirmek için bu kapsamlı rehberi takip edin.
6
6
  keywords:
@@ -638,17 +638,6 @@ export function NotFoundComponent() {
638
638
  }
639
639
  ```
640
640
 
641
- ```tsx fileName="src/routes/__root.tsx"
642
- import { createRootRoute } from "@tanstack/react-router";
643
-
644
- // Kök rota, en üst düzey düzen olarak hizmet eder
645
- // 404'leri doğrudan işlemez - bu, alt rotalara devredilir
646
- // Bu, kökü basit tutar ve yerel ayar farkında rotaların kendi 404 mantığını yönetmesine izin verir
647
- export const Route = createRootRoute({
648
- component: Outlet,
649
- });
650
- ```
651
-
652
641
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
653
642
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
654
643
  import { validatePrefix } from "intlayer";
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-03-13
3
- updatedAt: 2025-10-05
3
+ updatedAt: 2025-12-13
4
4
  title: JSON Senkronizasyon Eklentisi
5
5
  description: Intlayer sözlüklerini üçüncü taraf i18n JSON dosyalarıyla (i18next, next-intl, react-intl, vue-i18n ve daha fazlası) senkronize edin. Mevcut i18n yapınızı koruyarak Intlayer ile mesajlarınızı yönetin, çevirin ve test edin.
6
6
  keywords:
@@ -24,12 +24,15 @@ slugs:
24
24
  - sync-json
25
25
  youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
26
26
  history:
27
+ - version: 7.5.0
28
+ date: 2025-12-13
29
+ changes: ICU ve i18next format desteği eklendi
27
30
  - version: 6.1.6
28
31
  date: 2025-10-05
29
32
  changes: İlk JSON Senkronizasyon Eklentisi dokümantasyonu
30
33
  ---
31
34
 
32
- # JSON Senkronizasyonu (i18n köprüleri)
35
+ # JSON Senkronizasyonu (i18n köprüleri) - ICU / i18next desteği ile JSON Senkronizasyonu
33
36
 
34
37
  <iframe title="JSON çevirilerinizi Intlayer ile nasıl senkronize tutarsınız" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/MpGMxniDHNg?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
35
38
 
@@ -105,9 +108,27 @@ syncJSON({
105
108
  source: ({ key, locale }) => string, // zorunlu
106
109
  location?: string, // isteğe bağlı etiket, varsayılan: "plugin"
107
110
  priority?: number, // isteğe bağlı öncelik, çakışma çözümü için, varsayılan: 0
111
+ format?: 'intlayer' | 'icu' | 'i18next', // isteğe bağlı formatlayıcı, varsayılan: 'intlayer'
108
112
  });
109
113
  ```
110
114
 
115
+ #### `format` ('intlayer' | 'icu' | 'i18next')
116
+
117
+ JSON dosyalarını senkronize ederken sözlük içeriği için kullanılacak formatlayıcıyı belirtir. Bu, çeşitli i18n kütüphaneleriyle uyumlu farklı mesaj formatlama sözdizimlerini kullanmanıza olanak tanır.
118
+
119
+ - `'intlayer'`: Varsayılan Intlayer formatlayıcısı (varsayılan).
120
+ - `'icu'`: ICU mesaj formatlamasını kullanır (react-intl, vue-i18n gibi kütüphanelerle uyumlu).
121
+ - `'i18next'`: i18next mesaj formatlamasını kullanır (i18next, next-i18next, Solid-i18next ile uyumlu).
122
+
123
+ **Örnek:**
124
+
125
+ ```ts
126
+ syncJSON({
127
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
128
+ format: "i18next", // Uyumluluk için i18next formatlaması kullan
129
+ }),
130
+ ```
131
+
111
132
  ## Birden fazla JSON kaynağı ve öncelik
112
133
 
113
134
  Farklı JSON kaynaklarını senkronize etmek için birden fazla `syncJSON` eklentisi ekleyebilirsiniz. Bu, projenizde birden fazla i18n kütüphanesi veya farklı JSON yapıları olduğunda faydalıdır.
@@ -135,6 +156,7 @@ export default defineConfig({
135
156
  plugins: [
136
157
  // Birincil JSON kaynağı (en yüksek öncelik)
137
158
  syncJSON({
159
+ format: "i18next",
138
160
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
139
161
  location: "main-translations",
140
162
  priority: 10,
@@ -142,6 +164,7 @@ export default defineConfig({
142
164
 
143
165
  // Yedek JSON kaynağı (daha düşük öncelik)
144
166
  syncJSON({
167
+ format: "i18next",
145
168
  source: ({ locale }) => `./fallback-locales/${locale}.json`,
146
169
  location: "fallback-translations",
147
170
  priority: 5,
@@ -149,6 +172,7 @@ export default defineConfig({
149
172
 
150
173
  // Eski JSON kaynağı (en düşük öncelik)
151
174
  syncJSON({
175
+ format: "i18next",
152
176
  source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
153
177
  location: "legacy-translations",
154
178
  priority: 1,
@@ -179,6 +203,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
179
203
  export default {
180
204
  plugins: [
181
205
  syncJSON({
206
+ format: "i18next",
182
207
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
183
208
  }),
184
209
  ],
@@ -103,6 +103,10 @@ Intlayer chấp nhận nhiều định dạng tệp cấu hình:
103
103
 
104
104
  ## Chạy các lệnh intlayer
105
105
 
106
+ ### Xác thực
107
+
108
+ - **[Đăng nhập](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/login.md)** - Xác thực với Intlayer CMS và lấy thông tin đăng nhập
109
+
106
110
  ### Các Lệnh Cơ Bản
107
111
 
108
112
  - **[Xây dựng Từ điển](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/build.md)** - Xây dựng từ điển của bạn từ các tệp khai báo nội dung
@@ -144,6 +148,7 @@ Intlayer chấp nhận nhiều định dạng tệp cấu hình:
144
148
 
145
149
  ```json fileName="package.json"
146
150
  "scripts": {
151
+ "intlayer:login": "npx intlayer login",
147
152
  "intlayer:build": "npx intlayer build",
148
153
  "intlayer:watch": "npx intlayer build --watch",
149
154
  "intlayer:push": "npx intlayer push",
@@ -0,0 +1,186 @@
1
+ ---
2
+ createdAt: 2025-12-16
3
+ updatedAt: 2025-12-16
4
+ title: CLI - Đăng nhập
5
+ description: Tìm hiểu cách sử dụng lệnh login của Intlayer CLI để xác thực với Intlayer CMS và lấy thông tin truy cập.
6
+ keywords:
7
+ - CLI
8
+ - Login
9
+ - Authentication
10
+ - CMS
11
+ - Intlayer
12
+ - Credentials
13
+ slugs:
14
+ - doc
15
+ - concept
16
+ - cli
17
+ - login
18
+ ---
19
+
20
+ # Lệnh Login của Intlayer CLI
21
+
22
+ ---
23
+
24
+ ## Mô tả
25
+
26
+ Lệnh `login` của Intlayer CLI cho phép bạn xác thực với Intlayer CMS. Lệnh này tự động mở trình duyệt mặc định của bạn để hoàn tất quá trình xác thực và nhận các thông tin xác thực cần thiết (Client ID và Client Secret) để sử dụng dịch vụ Intlayer.
27
+
28
+ ## Cách sử dụng
29
+
30
+ ```bash
31
+ npx intlayer login [options]
32
+ ```
33
+
34
+ hoặc
35
+
36
+ ```bash
37
+ intlayer login [options]
38
+ ```
39
+
40
+ ## Tùy chọn
41
+
42
+ ### `--cms-url <url>`
43
+
44
+ Chỉ định URL của Intlayer CMS để kết nối và thực hiện xác thực.
45
+
46
+ - **Loại**: `string`
47
+ - **Mặc định**: Giá trị cấu hình trong `intlayer.config.*` hoặc `https://intlayer.org`
48
+ - **Ví dụ**:
49
+
50
+ ```bash
51
+ npx intlayer login --cms-url https://intlayer.org
52
+ ```
53
+
54
+ ### Tùy chọn cấu hình
55
+
56
+ Bạn cũng có thể sử dụng các tùy chọn cấu hình chung sau:
57
+
58
+ - `--env-file <path>`: Đường dẫn tới file môi trường
59
+ - `-e, --env <env>`: Môi trường thực thi
60
+ - `--base-dir <dir>`: Thư mục gốc của dự án
61
+ - `--verbose`: Bật đầu ra chi tiết (mặc định: true)
62
+ - `--prefix <prefix>`: Tiền tố cho logs
63
+
64
+ ## Cách hoạt động
65
+
66
+ 1. **Khởi động máy chủ cục bộ**: Lệnh khởi động một máy chủ HTTP cục bộ trên một cổng ngẫu nhiên để nhận thông tin xác thực từ CMS
67
+
68
+ Chỉ định URL của Intlayer CMS để kết nối xác thực.
69
+
70
+ - **Loại**: `string`
71
+ - **Mặc định**: Giá trị được cấu hình trong `intlayer.config.*` hoặc `https://intlayer.org`
72
+ - **Ví dụ**:
73
+
74
+ ```bash
75
+ npx intlayer login --cms-url https://intlayer.org
76
+ ```
77
+
78
+ ### Tùy chọn cấu hình
79
+
80
+ Bạn cũng có thể sử dụng các tùy chọn cấu hình chung:
81
+
82
+ - `--env-file <path>`: Đường dẫn tới file môi trường
83
+ - `-e, --env <env>`: Môi trường thực thi
84
+ - `--base-dir <dir>`: Thư mục gốc của dự án
85
+ - `--verbose`: Bật hiển thị chi tiết (mặc định: true)
86
+ - `--prefix <prefix>`: Tiền tố cho các log
87
+
88
+ ## Cách hoạt động
89
+
90
+ 1. **Khởi động máy chủ cục bộ**: Lệnh khởi động một HTTP server cục bộ trên một cổng ngẫu nhiên để nhận thông tin xác thực từ CMS
91
+ 2. **Mở trình duyệt**: Lệnh tự động mở trình duyệt mặc định của bạn tới URL đăng nhập của CMS
92
+ 3. **Xác thực**: Hoàn tất xác thực trong trình duyệt bằng tài khoản Intlayer của bạn
93
+ 4. **Nhận thông tin xác thực**: Máy chủ cục bộ nhận Client ID và Client Secret từ CMS
94
+ 5. **Hướng dẫn**: Lệnh hiển thị hướng dẫn để cấu hình thông tin xác thực trong dự án của bạn
95
+
96
+ ## Đầu ra
97
+
98
+ Sau khi đăng nhập thành công, lệnh sẽ hiển thị:
99
+
100
+ 1. **Thông tin xác thực nhận được** (Client ID và Client Secret)
101
+ 2. **Hướng dẫn cho file `.env`**:
102
+
103
+ ```bash
104
+ INTLAYER_CLIENT_ID=your_client_id
105
+ INTLAYER_CLIENT_SECRET=your_client_secret
106
+ ```
107
+
108
+ 3. **Hướng dẫn cho file cấu hình Intlayer**:
109
+
110
+ ```typescript
111
+ {
112
+ editor: {
113
+ cmsURL: 'https://intlayer.org',
114
+ clientId: process.env.INTLAYER_CLIENT_ID,
115
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
116
+ },
117
+ }
118
+ clientId: process.env.INTLAYER_CLIENT_ID,
119
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
120
+ },
121
+ }
122
+ ```
123
+
124
+ ## Cấu hình thủ công
125
+
126
+ Nếu trình duyệt không tự mở, bạn có thể truy cập thủ công URL hiển thị trong terminal.
127
+
128
+ ## Ví dụ
129
+
130
+ ### Đăng nhập với URL CMS tùy chỉnh
131
+
132
+ ```bash
133
+ npx intlayer login --cms-url https://custom-cms.example.com
134
+ ```
135
+
136
+ ### Đăng nhập với file môi trường cụ thể
137
+
138
+ ```bash
139
+ npx intlayer login --env-file .env.production
140
+ ```
141
+
142
+ ### Đăng nhập ở chế độ verbose
143
+
144
+ ```bash
145
+ npx intlayer login --verbose
146
+ ```
147
+
148
+ ## Khắc phục sự cố
149
+
150
+ ### Trình duyệt không tự mở
151
+
152
+ Nếu trình duyệt không tự mở, sao chép URL hiển thị trong terminal và mở thủ công trên trình duyệt của bạn.
153
+
154
+ ### Sự cố kết nối
155
+
156
+ Nếu bạn gặp sự cố kết nối, kiểm tra:
157
+
158
+ 1. Đảm bảo URL của CMS là chính xác
159
+ 2. Kết nối Internet của bạn đang hoạt động bình thường
160
+ 3. Không có tường lửa nào chặn kết nối
161
+
162
+ ### Không nhận được thông tin xác thực
163
+
164
+ Nếu không nhận được thông tin xác thực:
165
+
166
+ 1. Đảm bảo bạn đã hoàn tất quy trình xác thực trong trình duyệt
167
+ 2. Xác nhận rằng cổng cục bộ không bị chặn
168
+ 3. Thử chạy lại lệnh
169
+
170
+ ## Các bước tiếp theo
171
+
172
+ Sau khi hoàn tất đăng nhập:
173
+
174
+ 1. Thêm thông tin xác thực vào file `.env` của bạn
175
+ 2. Cấu hình file `intlayer.config.*` của bạn với thông tin xác thực
176
+ 3. Sử dụng các lệnh CLI để quản lý các từ điển của bạn:
177
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/push.md) - Đẩy từ điển lên CMS
178
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/pull.md) - Kéo từ điển từ CMS
179
+
180
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/fill.md) - Điền các bản dịch còn thiếu
181
+
182
+ ## Xem thêm
183
+
184
+ - [Tài liệu CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/index.md)
185
+ - [Cấu hình Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md)
186
+ - [CMS của Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_CMS.md)
@@ -14,6 +14,9 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 7.5.0
18
+ date: 2025-12-17
19
+ changes: Thêm tùy chọn `buildMode`
17
20
  - version: 7.0.0
18
21
  date: 2025-10-25
19
22
  changes: Thêm cấu hình `dictionary`
@@ -666,6 +669,15 @@ Các tùy chọn build áp dụng cho các plugin `@intlayer/babel` và `@intlay
666
669
 
667
670
  #### Thuộc tính
668
671
 
672
+ - **mode**:
673
+ - _Kiểu_: `'auto' | 'manual'`
674
+ - _Mặc định_: `'auto'`
675
+ - _Mô tả_: Điều khiển chế độ build.
676
+ - _Ví dụ_: `'manual'`
677
+ - _Lưu ý_: Nếu 'auto', build sẽ được bật tự động khi ứng dụng được build.
678
+ - _Lưu ý_: Nếu 'manual', build sẽ chỉ được đặt khi lệnh build được thực thi.
679
+ - _Lưu ý_: Có thể được sử dụng để vô hiệu hóa build từ điển, ví dụ khi nên tránh thực thi trong môi trường Node.js.
680
+
669
681
  - **optimize**:
670
682
  - _Kiểu_: `boolean`
671
683
  - _Mặc định_: `process.env.NODE_ENV === 'production'`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-02-07
3
- updatedAt: 2025-09-20
3
+ updatedAt: 2025-12-13
4
4
  title: Tệp Nội Dung
5
5
  description: Tìm hiểu cách tùy chỉnh các phần mở rộng cho các tệp khai báo nội dung của bạn. Theo dõi tài liệu này để triển khai các điều kiện một cách hiệu quả trong dự án của bạn.
6
6
  keywords:
@@ -12,6 +12,9 @@ slugs:
12
12
  - concept
13
13
  - content
14
14
  history:
15
+ - version: 7.5.0
16
+ date: 2025-12-13
17
+ changes: Thêm hỗ trợ định dạng ICU và i18next
15
18
  - version: 7.0.0
16
19
  date: 2025-10-23
17
20
  changes: Đổi tên `autoFill` thành `fill`
@@ -387,6 +390,26 @@ Mảng các chuỗi dùng để phân loại và tổ chức các từ điển.
387
390
  }
388
391
  ```
389
392
 
393
+ #### `format` ('intlayer' | 'icu' | 'i18next')
394
+
395
+ Chỉ định bộ định dạng để sử dụng cho nội dung từ điển. Điều này cho phép sử dụng các cú pháp định dạng thông báo khác nhau.
396
+
397
+ - `'intlayer'`: Bộ định dạng Intlayer mặc định.
398
+ - `'icu'`: Sử dụng định dạng thông báo ICU.
399
+ - `'i18next'`: Sử dụng định dạng thông báo i18next.
400
+
401
+ **Ví dụ:**
402
+
403
+ ```typescript
404
+ {
405
+ key: "my-dictionary",
406
+ format: "icu",
407
+ content: {
408
+ message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
409
+ }
410
+ }
411
+ ```
412
+
390
413
  #### `locale` (LocalesValues)
391
414
 
392
415
  Chuyển đổi từ điển thành từ điển theo từng locale, trong đó mỗi trường được khai báo trong nội dung sẽ tự động được chuyển thành một nút dịch. Khi thuộc tính này được thiết lập:
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-03-07
3
3
  updatedAt: 2025-10-03
4
4
  title: Cách dịch ứng dụng Astro của bạn – Hướng dẫn i18n 2025
5
- description: Tìm hiểu cách thêm quốc tế hóa (i18n) vào ứng dụng Vite và Astro của bạn bằng Intlayer. Làm theo hướng dẫn này để làm cho ứng dụng của bạn đa ngôn ngữ.
5
+ description: Tìm hiểu cách thêm quốc tế hóa (i18n) vào trang web Astro của bạn bằng Intlayer. Làm theo hướng dẫn này để làm cho trang web của bạn đa ngôn ngữ.
6
6
  keywords:
7
7
  - Quốc tế hóa
8
8
  - Tài liệu
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-08-23
3
3
  updatedAt: 2025-08-23
4
4
  title: Cách dịch backend Express của bạn – Hướng dẫn i18n 2025
5
- description: Khám phá cách làm cho backend vite của bạn đa ngôn ngữ. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch nó.
5
+ description: Khám phá cách làm cho backend Express của bạn đa ngôn ngữ. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch nó.
6
6
  keywords:
7
7
  - Quốc tế hóa
8
8
  - Tài liệu
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-09-09
3
3
  updatedAt: 2025-09-09
4
4
  title: Cách dịch backend Nest của bạn – Hướng dẫn i18n 2025
5
- description: Khám phá cách làm cho backend vite của bạn đa ngôn ngữ. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch nó.
5
+ description: Khám phá cách làm cho backend NestJS của bạn đa ngôn ngữ. Theo dõi tài liệu để quốc tế hóa (i18n) và dịch nó.
6
6
  keywords:
7
7
  - Quốc tế hóa
8
8
  - Tài liệu
@@ -581,6 +581,7 @@ const config: IntlayerConfig = {
581
581
  },
582
582
  plugins: [
583
583
  syncJSON({
584
+ format: "i18next",
584
585
  source: ({ locale }) => `./locales/${locale}.json`,
585
586
  }),
586
587
  ],
@@ -419,6 +419,7 @@ const config: IntlayerConfig = {
419
419
  plugins: [
420
420
  // Giữ cấu trúc thư mục theo namespace đồng bộ với Intlayer
421
421
  syncJSON({
422
+ format: "icu",
422
423
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
423
424
  }),
424
425
  ],
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-09-09
3
- updatedAt: 2025-09-09
3
+ updatedAt: 2025-12-11
4
4
  title: Cách dịch ứng dụng Tanstack Start của bạn – hướng dẫn i18n 2025
5
5
  description: Tìm hiểu cách thêm quốc tế hóa (i18n) vào ứng dụng Tanstack Start của bạn bằng cách sử dụng Intlayer. Theo dõi hướng dẫn toàn diện này để làm cho ứng dụng của bạn đa ngôn ngữ với định tuyến nhận biết locale.
6
6
  keywords:
@@ -634,17 +634,6 @@ export function NotFoundComponent() {
634
634
  }
635
635
  ```
636
636
 
637
- ```tsx fileName="src/routes/__root.tsx"
638
- import { createRootRoute } from "@tanstack/react-router";
639
-
640
- // Tuyến đường gốc phục vụ như bố cục cấp cao nhất
641
- // Nó không xử lý 404 trực tiếp - điều đó được ủy quyền cho các tuyến đường con
642
- // Điều này giữ cho gốc đơn giản và cho phép các tuyến đường nhận biết locale quản lý logic 404 của riêng chúng
643
- export const Route = createRootRoute({
644
- component: Outlet,
645
- });
646
- ```
647
-
648
637
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
649
638
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
650
639
  import { validatePrefix } from "intlayer";
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-03-13
3
- updatedAt: 2025-10-05
3
+ updatedAt: 2025-12-13
4
4
  title: Plugin Đồng bộ JSON
5
5
  description: Đồng bộ từ điển Intlayer với các tệp JSON i18n của bên thứ ba (i18next, next-intl, react-intl, vue-i18n và nhiều hơn nữa). Giữ nguyên i18n hiện có của bạn trong khi sử dụng Intlayer để quản lý, dịch và kiểm tra các thông điệp của bạn.
6
6
  keywords:
@@ -24,12 +24,15 @@ slugs:
24
24
  - sync-json
25
25
  youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
26
26
  history:
27
+ - version: 7.5.0
28
+ date: 2025-12-13
29
+ changes: Thêm hỗ trợ định dạng ICU và i18next
27
30
  - version: 6.1.6
28
31
  date: 2025-10-05
29
32
  changes: Tài liệu Plugin Đồng bộ JSON ban đầu
30
33
  ---
31
34
 
32
- # Đồng bộ JSON (cầu nối i18n)
35
+ # Đồng bộ JSON (cầu nối i18n) - Đồng bộ JSON với hỗ trợ ICU / i18next
33
36
 
34
37
  <iframe title="Cách giữ bản dịch JSON của bạn đồng bộ với Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/MpGMxniDHNg?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
35
38
 
@@ -105,9 +108,27 @@ syncJSON({
105
108
  source: ({ key, locale }) => string, // bắt buộc
106
109
  location?: string, // nhãn tùy chọn, mặc định: "plugin"
107
110
  priority?: number, // ưu tiên tùy chọn để giải quyết xung đột, mặc định: 0
111
+ format?: 'intlayer' | 'icu' | 'i18next', // bộ định dạng tùy chọn, mặc định: 'intlayer'
108
112
  });
109
113
  ```
110
114
 
115
+ #### `format` ('intlayer' | 'icu' | 'i18next')
116
+
117
+ Chỉ định bộ định dạng sẽ được sử dụng cho nội dung từ điển khi đồng bộ hóa các tệp JSON. Điều này cho phép sử dụng các cú pháp định dạng thông báo khác nhau tương thích với các thư viện i18n khác nhau.
118
+
119
+ - `'intlayer'`: Bộ định dạng Intlayer mặc định (mặc định).
120
+ - `'icu'`: Sử dụng định dạng thông báo ICU (tương thích với các thư viện như react-intl, vue-i18n).
121
+ - `'i18next'`: Sử dụng định dạng thông báo i18next (tương thích với i18next, next-i18next, Solid-i18next).
122
+
123
+ **Ví dụ:**
124
+
125
+ ```ts
126
+ syncJSON({
127
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
128
+ format: "i18next", // Sử dụng định dạng i18next để tương thích
129
+ }),
130
+ ```
131
+
111
132
  ## Nhiều nguồn JSON và ưu tiên
112
133
 
113
134
  Bạn có thể thêm nhiều plugin `syncJSON` để đồng bộ các nguồn JSON khác nhau. Điều này hữu ích khi bạn có nhiều thư viện i18n hoặc các cấu trúc JSON khác nhau trong dự án của mình.
@@ -134,6 +155,7 @@ export default defineConfig({
134
155
  plugins: [
135
156
  // Nguồn JSON chính (ưu tiên cao nhất)
136
157
  syncJSON({
158
+ format: "i18next",
137
159
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
138
160
  location: "main-translations",
139
161
  priority: 10,
@@ -141,6 +163,7 @@ export default defineConfig({
141
163
 
142
164
  // Nguồn JSON dự phòng (ưu tiên thấp hơn)
143
165
  syncJSON({
166
+ format: "i18next",
144
167
  source: ({ locale }) => `./fallback-locales/${locale}.json`,
145
168
  location: "fallback-translations",
146
169
  priority: 5,
@@ -148,6 +171,7 @@ export default defineConfig({
148
171
 
149
172
  // Nguồn JSON kế thừa (ưu tiên thấp nhất)
150
173
  syncJSON({
174
+ format: "i18next",
151
175
  source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
152
176
  location: "legacy-translations",
153
177
  priority: 1,
@@ -178,6 +202,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
178
202
  export default {
179
203
  plugins: [
180
204
  syncJSON({
205
+ format: "i18next",
181
206
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`, // nguồn tệp JSON đồng bộ theo khóa và ngôn ngữ
182
207
  }),
183
208
  ],
@@ -103,6 +103,10 @@ Intlayer 支持多种配置文件格式:
103
103
 
104
104
  ## 运行 intlayer 命令
105
105
 
106
+ ### 身份验证
107
+
108
+ - **[登录](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/login.md)** - 使用 Intlayer CMS 进行身份验证并获取访问凭据
109
+
106
110
  ### 核心命令
107
111
 
108
112
  - **[构建字典](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/build.md)** - 从内容声明文件构建字典
@@ -149,6 +153,7 @@ Intlayer 支持多种配置文件格式:
149
153
 
150
154
  ```json fileName="package.json"
151
155
  "scripts": {
156
+ "intlayer:login": "npx intlayer login",
152
157
  "intlayer:build": "npx intlayer build",
153
158
  "intlayer:watch": "npx intlayer build --watch",
154
159
  "intlayer:push": "npx intlayer push",