@intlayer/docs 7.4.0 → 7.5.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 (238) 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/docs/ar/dictionary/content_file.md +24 -1
  104. package/docs/ar/intlayer_with_astro.md +1 -1
  105. package/docs/ar/intlayer_with_express.md +1 -1
  106. package/docs/ar/intlayer_with_nestjs.md +1 -1
  107. package/docs/ar/intlayer_with_next-i18next.md +1 -0
  108. package/docs/ar/intlayer_with_next-intl.md +1 -0
  109. package/docs/ar/intlayer_with_tanstack.md +1 -12
  110. package/docs/ar/plugins/sync-json.md +27 -2
  111. package/docs/de/dictionary/content_file.md +24 -1
  112. package/docs/de/intlayer_with_astro.md +1 -1
  113. package/docs/de/intlayer_with_express.md +1 -1
  114. package/docs/de/intlayer_with_nestjs.md +1 -1
  115. package/docs/de/intlayer_with_next-i18next.md +1 -0
  116. package/docs/de/intlayer_with_next-intl.md +1 -0
  117. package/docs/de/intlayer_with_tanstack.md +1 -12
  118. package/docs/de/plugins/sync-json.md +27 -2
  119. package/docs/en/dictionary/content_file.md +24 -1
  120. package/docs/en/intlayer_with_astro.md +1 -1
  121. package/docs/en/intlayer_with_express.md +1 -1
  122. package/docs/en/intlayer_with_nestjs.md +1 -2
  123. package/docs/en/intlayer_with_next-i18next.md +1 -0
  124. package/docs/en/intlayer_with_next-intl.md +1 -0
  125. package/docs/en/intlayer_with_tanstack.md +0 -11
  126. package/docs/en/plugins/sync-json.md +53 -2
  127. package/docs/en-GB/dictionary/content_file.md +24 -1
  128. package/docs/en-GB/intlayer_with_astro.md +1 -1
  129. package/docs/en-GB/intlayer_with_express.md +1 -1
  130. package/docs/en-GB/intlayer_with_nestjs.md +1 -1
  131. package/docs/en-GB/intlayer_with_next-i18next.md +1 -0
  132. package/docs/en-GB/intlayer_with_next-intl.md +1 -0
  133. package/docs/en-GB/intlayer_with_tanstack.md +1 -12
  134. package/docs/en-GB/plugins/sync-json.md +26 -1
  135. package/docs/es/dictionary/content_file.md +24 -1
  136. package/docs/es/intlayer_with_astro.md +1 -1
  137. package/docs/es/intlayer_with_express.md +1 -1
  138. package/docs/es/intlayer_with_nestjs.md +1 -1
  139. package/docs/es/intlayer_with_next-i18next.md +1 -0
  140. package/docs/es/intlayer_with_next-intl.md +1 -0
  141. package/docs/es/intlayer_with_tanstack.md +1 -12
  142. package/docs/es/plugins/sync-json.md +27 -2
  143. package/docs/fr/dictionary/content_file.md +24 -1
  144. package/docs/fr/intlayer_with_astro.md +1 -1
  145. package/docs/fr/intlayer_with_express.md +1 -1
  146. package/docs/fr/intlayer_with_nestjs.md +1 -1
  147. package/docs/fr/intlayer_with_next-i18next.md +1 -0
  148. package/docs/fr/intlayer_with_next-intl.md +1 -0
  149. package/docs/fr/intlayer_with_tanstack.md +1 -12
  150. package/docs/fr/plugins/sync-json.md +27 -2
  151. package/docs/hi/dictionary/content_file.md +24 -1
  152. package/docs/hi/intlayer_with_astro.md +1 -1
  153. package/docs/hi/intlayer_with_express.md +1 -1
  154. package/docs/hi/intlayer_with_nestjs.md +1 -1
  155. package/docs/hi/intlayer_with_next-i18next.md +1 -0
  156. package/docs/hi/intlayer_with_next-intl.md +1 -0
  157. package/docs/hi/intlayer_with_tanstack.md +1 -12
  158. package/docs/hi/plugins/sync-json.md +27 -2
  159. package/docs/id/dictionary/content_file.md +24 -1
  160. package/docs/id/intlayer_with_astro.md +1 -1
  161. package/docs/id/intlayer_with_express.md +1 -1
  162. package/docs/id/intlayer_with_nestjs.md +1 -1
  163. package/docs/id/intlayer_with_next-i18next.md +1 -0
  164. package/docs/id/intlayer_with_next-intl.md +1 -0
  165. package/docs/id/intlayer_with_tanstack.md +1 -12
  166. package/docs/id/plugins/sync-json.md +27 -2
  167. package/docs/it/dictionary/content_file.md +24 -1
  168. package/docs/it/intlayer_with_astro.md +1 -1
  169. package/docs/it/intlayer_with_express.md +1 -1
  170. package/docs/it/intlayer_with_nestjs.md +1 -1
  171. package/docs/it/intlayer_with_next-i18next.md +1 -0
  172. package/docs/it/intlayer_with_next-intl.md +1 -0
  173. package/docs/it/intlayer_with_tanstack.md +1 -12
  174. package/docs/it/plugins/sync-json.md +27 -2
  175. package/docs/ja/dictionary/content_file.md +24 -1
  176. package/docs/ja/intlayer_with_astro.md +1 -1
  177. package/docs/ja/intlayer_with_express.md +1 -1
  178. package/docs/ja/intlayer_with_nestjs.md +1 -1
  179. package/docs/ja/intlayer_with_next-i18next.md +1 -0
  180. package/docs/ja/intlayer_with_next-intl.md +1 -0
  181. package/docs/ja/intlayer_with_tanstack.md +1 -12
  182. package/docs/ja/plugins/sync-json.md +27 -2
  183. package/docs/ko/dictionary/content_file.md +44 -1
  184. package/docs/ko/intlayer_with_astro.md +1 -1
  185. package/docs/ko/intlayer_with_express.md +1 -1
  186. package/docs/ko/intlayer_with_nestjs.md +1 -1
  187. package/docs/ko/intlayer_with_next-i18next.md +1 -0
  188. package/docs/ko/intlayer_with_next-intl.md +1 -0
  189. package/docs/ko/intlayer_with_tanstack.md +1 -12
  190. package/docs/ko/plugins/sync-json.md +27 -2
  191. package/docs/pl/dictionary/content_file.md +24 -1
  192. package/docs/pl/intlayer_with_astro.md +2 -2
  193. package/docs/pl/intlayer_with_express.md +1 -1
  194. package/docs/pl/intlayer_with_nestjs.md +1 -1
  195. package/docs/pl/intlayer_with_next-i18next.md +1 -0
  196. package/docs/pl/intlayer_with_next-intl.md +1 -0
  197. package/docs/pl/intlayer_with_tanstack.md +1 -12
  198. package/docs/pl/plugins/sync-json.md +24 -2
  199. package/docs/pt/dictionary/content_file.md +24 -1
  200. package/docs/pt/intlayer_with_astro.md +1 -1
  201. package/docs/pt/intlayer_with_express.md +1 -1
  202. package/docs/pt/intlayer_with_nestjs.md +1 -1
  203. package/docs/pt/intlayer_with_next-i18next.md +1 -0
  204. package/docs/pt/intlayer_with_next-intl.md +1 -0
  205. package/docs/pt/intlayer_with_tanstack.md +1 -12
  206. package/docs/pt/plugins/sync-json.md +27 -2
  207. package/docs/ru/dictionary/content_file.md +44 -1
  208. package/docs/ru/intlayer_with_astro.md +1 -1
  209. package/docs/ru/intlayer_with_express.md +1 -1
  210. package/docs/ru/intlayer_with_nestjs.md +1 -1
  211. package/docs/ru/intlayer_with_next-i18next.md +1 -0
  212. package/docs/ru/intlayer_with_next-intl.md +1 -0
  213. package/docs/ru/intlayer_with_tanstack.md +1 -12
  214. package/docs/ru/plugins/sync-json.md +27 -2
  215. package/docs/tr/dictionary/content_file.md +44 -1
  216. package/docs/tr/intlayer_with_astro.md +1 -1
  217. package/docs/tr/intlayer_with_express.md +1 -1
  218. package/docs/tr/intlayer_with_next-i18next.md +1 -0
  219. package/docs/tr/intlayer_with_next-intl.md +1 -0
  220. package/docs/tr/intlayer_with_tanstack.md +1 -12
  221. package/docs/tr/plugins/sync-json.md +27 -2
  222. package/docs/vi/dictionary/content_file.md +24 -1
  223. package/docs/vi/intlayer_with_astro.md +1 -1
  224. package/docs/vi/intlayer_with_express.md +1 -1
  225. package/docs/vi/intlayer_with_nestjs.md +1 -1
  226. package/docs/vi/intlayer_with_next-i18next.md +1 -0
  227. package/docs/vi/intlayer_with_next-intl.md +1 -0
  228. package/docs/vi/intlayer_with_tanstack.md +1 -12
  229. package/docs/vi/plugins/sync-json.md +27 -2
  230. package/docs/zh/dictionary/content_file.md +44 -1
  231. package/docs/zh/intlayer_with_astro.md +1 -1
  232. package/docs/zh/intlayer_with_express.md +1 -1
  233. package/docs/zh/intlayer_with_nestjs.md +1 -1
  234. package/docs/zh/intlayer_with_next-i18next.md +1 -0
  235. package/docs/zh/intlayer_with_next-intl.md +1 -0
  236. package/docs/zh/intlayer_with_tanstack.md +1 -12
  237. package/docs/zh/plugins/sync-json.md +27 -2
  238. package/package.json +6 -6
@@ -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
5
5
  description: Синхронизируйте словари Intlayer с JSON-файлами сторонних i18n (i18next, next-intl, react-intl, vue-i18n и другими). Сохраняйте существующую i18n, используя Intlayer для управления, перевода и тестирования ваших сообщений.
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 и i18next
27
30
  - version: 6.1.6
28
31
  date: 2025-10-05
29
32
  changes: Начальная документация плагина синхронизации JSON
30
33
  ---
31
34
 
32
- ## Синхронизация JSON (мосты i18n)
35
+ # Синхронизация JSON (мосты i18n) - Синхронизация JSON с поддержкой ICU / i18next
33
36
 
34
37
  <iframe title="Как поддерживать синхронизацию ваших JSON-переводов с 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, // обязательно
106
109
  location?: string, // необязательная метка, по умолчанию: "plugin"
107
110
  priority?: number, // необязательный приоритет для разрешения конфликтов, по умолчанию: 0
111
+ format?: 'intlayer' | 'icu' | 'i18next', // необязательный форматтер, по умолчанию: 'intlayer'
108
112
  });
109
113
  ```
110
114
 
115
+ #### `format` ('intlayer' | 'icu' | 'i18next')
116
+
117
+ Указывает форматтер, который будет использоваться для содержимого словаря при синхронизации JSON-файлов. Это позволяет использовать различные синтаксисы форматирования сообщений, совместимые с различными библиотеками i18n.
118
+
119
+ - `'intlayer'`: Форматтер Intlayer по умолчанию (по умолчанию).
120
+ - `'icu'`: Использует форматирование сообщений ICU (совместимо с библиотеками, такими как react-intl, vue-i18n).
121
+ - `'i18next'`: Использует форматирование сообщений i18next (совместимо с i18next, next-i18next, Solid-i18next).
122
+
123
+ **Пример:**
124
+
125
+ ```ts
126
+ syncJSON({
127
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
128
+ format: "i18next", // Использовать форматирование i18next для совместимости
129
+ }),
130
+ ```
131
+
111
132
  ## Несколько источников JSON и приоритет
112
133
 
113
134
  Вы можете добавить несколько плагинов `syncJSON` для синхронизации разных источников JSON. Это полезно, если в вашем проекте используются несколько библиотек i18n или разные структуры JSON.
@@ -134,6 +155,7 @@ export default defineConfig({
134
155
  plugins: [
135
156
  // Основной источник JSON (наивысший приоритет)
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
  // Резервный источник JSON (низший приоритет)
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
  // Источник устаревших JSON (самый низкий приоритет)
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`,
182
207
  }),
183
208
  ],
@@ -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
  ],
@@ -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
  ],
@@ -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: 内容文件
5
5
  description: 学习如何自定义内容声明文件的扩展。按照本指南高效地在项目中实现条件。
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 和 i18next 格式支持
15
18
  - version: 6.0.0
16
19
  date: 2025-09-20
17
20
  changes: 添加字段文档
@@ -386,6 +389,46 @@ Intlayer 中的字典由 `Dictionary` 类型定义,包含多个控制其行为
386
389
  }
387
390
  ```
388
391
 
392
+ #### `format` ('intlayer' | 'icu' | 'i18next')
393
+
394
+ 指定用于字典内容的格式化器。这允许使用不同的消息格式化语法。
395
+
396
+ - `'intlayer'`: 默认的 Intlayer 格式化器。
397
+ - `'icu'`: 使用 ICU 消息格式化。
398
+ - `'i18next'`: 使用 i18next 消息格式化。
399
+
400
+ **示例:**
401
+
402
+ ```typescript
403
+ {
404
+ key: "my-dictionary",
405
+ format: "icu",
406
+ content: {
407
+ message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
408
+ }
409
+ }
410
+ ```
411
+
412
+ #### `format` ('intlayer' | 'icu' | 'i18next')
413
+
414
+ 指定用于字典内容的格式化器。这允许使用不同的消息格式化语法。
415
+
416
+ - `'intlayer'`: 默认的 Intlayer 格式化器。
417
+ - `'icu'`: 使用 ICU 消息格式化。
418
+ - `'i18next'`: 使用 i18next 消息格式化。
419
+
420
+ **示例:**
421
+
422
+ ```typescript
423
+ {
424
+ key: "my-dictionary",
425
+ format: "icu",
426
+ content: {
427
+ message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
428
+ }
429
+ }
430
+ ```
431
+
389
432
  #### `locale` (LocalesValues)
390
433
 
391
434
  将字典转换为按语言区域划分的字典,其中内容中声明的每个字段将自动转换为翻译节点。当设置此属性时:
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-03-07
3
3
  updatedAt: 2025-10-03
4
4
  title: 如何翻译您的Astro应用 – i18n指南 2025
5
- description: 学习如何使用 Intlayer 为您的 Vite 和 React 应用添加国际化(i18n)。按照本指南使您的应用支持多语言。
5
+ description: 学习如何使用 Intlayer 为您的 Astro 网站添加国际化(i18n)。按照本指南使您的网站支持多语言。
6
6
  keywords:
7
7
  - 国际化
8
8
  - 文档
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-08-11
3
3
  updatedAt: 2025-06-29
4
4
  title: 如何翻译您的Express backend应用 – i18n指南 2025
5
- description: 了解如何使您的 vite 后端实现多语言。请遵循文档进行国际化(i18n)和翻译。
5
+ description: 了解如何使您的 Express 后端实现多语言。请遵循文档进行国际化(i18n)和翻译。
6
6
  keywords:
7
7
  - 国际化
8
8
  - 文档
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-09-09
3
3
  updatedAt: 2025-09-09
4
4
  title: 如何翻译您的Nest backend应用 – i18n指南 2025
5
- description: 了解如何使你的 vite 后端支持多语言。按照文档进行国际化(i18n)和翻译。
5
+ description: 了解如何使你的 NestJS 后端支持多语言。按照文档进行国际化(i18n)和翻译。
6
6
  keywords:
7
7
  - 国际化
8
8
  - 文档
@@ -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
  ],
@@ -421,6 +421,7 @@ const config: IntlayerConfig = {
421
421
  plugins: [
422
422
  // 保持每个命名空间的文件夹结构与 Intlayer 同步
423
423
  syncJSON({
424
+ format: "icu",
424
425
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
425
426
  }),
426
427
  ],
@@ -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应用 – i18n指南 2025
5
5
  description: 学习如何使用 Intlayer 为您的 Tanstack Start 应用添加国际化 (i18n)。按照本综合指南,使您的应用支持多语言并具备基于区域设置的路由功能。
6
6
  keywords:
@@ -625,17 +625,6 @@ export function NotFoundComponent() {
625
625
  }
626
626
  ```
627
627
 
628
- ```tsx fileName="src/routes/__root.tsx"
629
- import { createRootRoute } from "@tanstack/react-router";
630
-
631
- // 根路由作为顶级布局
632
- // 它不直接处理 404 - 这被委托给子路由
633
- // 这使根路由保持简单,并让区域设置感知的路由管理自己的 404 逻辑
634
- export const Route = createRootRoute({
635
- component: Outlet,
636
- });
637
- ```
638
-
639
628
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
640
629
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
641
630
  import { validatePrefix } from "intlayer";