@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: Sync JSON 플러그인
5
5
  description: Intlayer 사전을 서드파티 i18n JSON 파일(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: Sync JSON 플러그인 초기 문서화
30
33
  ---
31
34
 
32
- # Sync JSON (i18n 브리지)
35
+ # Sync JSON (i18n 브리지) - ICU / i18next 지원이 포함된 Sync JSON
33
36
 
34
37
  <iframe title="Intlayer와 JSON 번역을 동기화 상태로 유지하는 방법" 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: Plik z Treścią
5
5
  description: Dowiedz się, jak dostosować rozszerzenia dla plików deklaracji treści. Postępuj zgodnie z tą dokumentacją, aby efektywnie wdrażać warunki w swoim projekcie.
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: Dodano obsługę formatów ICU i i18next
15
18
  - version: 7.0.0
16
19
  date: 2025-10-23
17
20
  changes: Zmiana nazwy `autoFill` na `fill`
@@ -387,6 +390,26 @@ Tablica łańcuchów znaków służąca do kategoryzacji i organizacji słownik
387
390
  }
388
391
  ```
389
392
 
393
+ #### `format` ('intlayer' | 'icu' | 'i18next')
394
+
395
+ Określa formatter do użycia dla zawartości słownika. Pozwala to na używanie różnych składni formatowania wiadomości.
396
+
397
+ - `'intlayer'`: Domyślny formatter Intlayer.
398
+ - `'icu'`: Używa formatowania wiadomości ICU.
399
+ - `'i18next'`: Używa formatowania wiadomości i18next.
400
+
401
+ **Przykład:**
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
  Przekształca słownik w słownik per-lokalizacyjny, gdzie każde pole zadeklarowane w zawartości zostanie automatycznie przekształcone w węzeł tłumaczenia. Gdy ta właściwość jest ustawiona:
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-03-07
3
3
  updatedAt: 2025-10-03
4
4
  title: Jak przetłumaczyć swoją aplikację Astro – przewodnik i18n 2025
5
- description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej aplikacji Vite i React za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją aplikację wielojęzyczną.
5
+ description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej strony Astro za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją stronę wielojęzyczną.
6
6
  keywords:
7
7
  - Internacjonalizacja
8
8
  - Dokumentacja
@@ -28,7 +28,7 @@ Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.co
28
28
  createdAt: 2024-03-07
29
29
  updatedAt: 2025-10-03
30
30
  title: Jak przetłumaczyć swoją aplikację Astro – przewodnik i18n 2025
31
- description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej aplikacji Vite i React za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją aplikację wielojęzyczną.
31
+ description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej strony Astro za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją stronę wielojęzyczną.
32
32
  keywords:
33
33
 
34
34
  - Internacjonalizacja
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-08-23
3
3
  updatedAt: 2025-08-23
4
4
  title: Jak przetłumaczyć backend Express – przewodnik i18n 2025
5
- description: Dowiedz się, jak uczynić swój backend vite wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
5
+ description: Dowiedz się, jak uczynić swój backend Express wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
6
6
  keywords:
7
7
  - Internacjonalizacja
8
8
  - Dokumentacja
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-09-09
3
3
  updatedAt: 2025-09-09
4
4
  title: Jak przetłumaczyć backend Nest – przewodnik i18n 2025
5
- description: Dowiedz się, jak uczynić swój backend vite wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
5
+ description: Dowiedz się, jak uczynić swój backend NestJS wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
6
6
  keywords:
7
7
  - Internacjonalizacja
8
8
  - Dokumentacja
@@ -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
  // Zachowaj strukturę folderów per namespace w synchronizacji z 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: Jak przetłumaczyć swoją aplikację Tanstack Start – przewodnik i18n 2025
5
5
  description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej aplikacji Tanstack Start za pomocą Intlayer. Postępuj zgodnie z tym kompleksowym przewodnikiem, aby uczynić swoją aplikację wielojęzyczną z routingiem uwzględniającym lokalizację.
6
6
  keywords:
@@ -624,17 +624,6 @@ export function NotFoundComponent() {
624
624
  }
625
625
  ```
626
626
 
627
- ```tsx fileName="src/routes/__root.tsx"
628
- import { createRootRoute } from "@tanstack/react-router";
629
-
630
- // Trasa główna służy jako układ najwyższego poziomu
631
- // Nie obsługuje 404 bezpośrednio - to jest delegowane do tras potomnych
632
- // To utrzymuje główną trasę prostą i pozwala trasom świadomym locale zarządzać własną logiką 404
633
- export const Route = createRootRoute({
634
- component: Outlet,
635
- });
636
- ```
637
-
638
627
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
639
628
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
640
629
  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: Wtyczka Sync JSON
5
5
  description: Synchronizuj słowniki Intlayer z zewnętrznymi plikami JSON i18n (i18next, next-intl, react-intl, vue-i18n i inne). Zachowaj istniejące i18n, korzystając z Intlayer do zarządzania, tłumaczenia i testowania swoich komunikatów.
6
6
  keywords:
@@ -29,7 +29,7 @@ history:
29
29
  changes: Pierwsza dokumentacja wtyczki Sync JSON
30
30
  ---
31
31
 
32
- # Sync JSON (mosty i18n)
32
+ # Sync JSON (mosty i18n) - Sync JSON z obsługą ICU / i18next
33
33
 
34
34
  <iframe title="Jak zachować synchronizację tłumaczeń JSON z 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
35
 
@@ -105,9 +105,27 @@ syncJSON({
105
105
  source: ({ key, locale }) => string, // wymagane
106
106
  location?: string, // opcjonalna etykieta, domyślnie: "plugin"
107
107
  priority?: number, // opcjonalny priorytet do rozstrzygania konfliktów, domyślnie: 0
108
+ format?: 'intlayer' | 'icu' | 'i18next', // opcjonalny formatator, domyślnie: 'intlayer'
108
109
  });
109
110
  ```
110
111
 
112
+ #### `format` ('intlayer' | 'icu' | 'i18next')
113
+
114
+ Określa formatator, który będzie używany do zawartości słownika podczas synchronizacji plików JSON. Pozwala to na używanie różnych składni formatowania wiadomości zgodnych z różnymi bibliotekami i18n.
115
+
116
+ - `'intlayer'`: Domyślny formatator Intlayer (domyślnie).
117
+ - `'icu'`: Używa formatowania wiadomości ICU (zgodne z bibliotekami takimi jak react-intl, vue-i18n).
118
+ - `'i18next'`: Używa formatowania wiadomości i18next (zgodne z i18next, next-i18next, Solid-i18next).
119
+
120
+ **Przykład:**
121
+
122
+ ```ts
123
+ syncJSON({
124
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
125
+ format: "i18next", // Użyj formatowania i18next dla zgodności
126
+ }),
127
+ ```
128
+
111
129
  ## Wiele źródeł JSON i priorytet
112
130
 
113
131
  Możesz dodać wiele wtyczek `syncJSON`, aby synchronizować różne źródła JSON. Jest to przydatne, gdy masz wiele bibliotek i18n lub różne struktury JSON w swoim projekcie.
@@ -134,6 +152,7 @@ export default defineConfig({
134
152
  plugins: [
135
153
  // Główne źródło JSON (najwyższy priorytet)
136
154
  syncJSON({
155
+ format: "i18next",
137
156
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
138
157
  location: "main-translations",
139
158
  priority: 10,
@@ -141,6 +160,7 @@ export default defineConfig({
141
160
 
142
161
  // Zapasowe źródło JSON (niższy priorytet)
143
162
  syncJSON({
163
+ format: "i18next",
144
164
  source: ({ locale }) => `./fallback-locales/${locale}.json`,
145
165
  location: "fallback-translations",
146
166
  priority: 5,
@@ -148,6 +168,7 @@ export default defineConfig({
148
168
 
149
169
  // Źródło JSON dziedziczone (najniższy priorytet)
150
170
  syncJSON({
171
+ format: "i18next",
151
172
  source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
152
173
  location: "legacy-translations",
153
174
  priority: 1,
@@ -178,6 +199,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
178
199
  export default {
179
200
  plugins: [
180
201
  syncJSON({
202
+ format: "i18next",
181
203
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
182
204
  }),
183
205
  ],
@@ -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: Arquivo de Conteúdo
5
5
  description: Aprenda como personalizar as extensões para seus arquivos de declaração de conteúdo. Siga esta documentação para implementar condições de forma eficiente em seu projeto.
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: Adicionado suporte para formatos ICU e i18next
15
18
  - version: 6.0.0
16
19
  date: 2025-09-20
17
20
  changes: Adição da documentação dos campos
@@ -387,6 +390,26 @@ Array de strings para categorizar e organizar dicionários. As tags fornecem con
387
390
  }
388
391
  ```
389
392
 
393
+ #### `format` ('intlayer' | 'icu' | 'i18next')
394
+
395
+ Especifica o formatador a ser usado para o conteúdo do dicionário. Isso permite usar diferentes sintaxes de formatação de mensagens.
396
+
397
+ - `'intlayer'`: O formatador Intlayer padrão.
398
+ - `'icu'`: Usa formatação de mensagens ICU.
399
+ - `'i18next'`: Usa formatação de mensagens i18next.
400
+
401
+ **Exemplo:**
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
  Transforma o dicionário em um dicionário por localidade onde cada campo declarado no conteúdo será automaticamente transformado em um nó de tradução. Quando essa propriedade é definida:
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-03-07
3
3
  updatedAt: 2025-10-03
4
4
  title: Como traduzir seu Astro – guia i18n 2025
5
- description: Aprenda como adicionar internacionalização (i18n) à sua aplicação Vite e React usando Intlayer. Siga este guia para tornar seu app multilíngue.
5
+ description: Aprenda como adicionar internacionalização (i18n) ao seu site Astro usando Intlayer. Siga este guia para tornar seu site multilíngue.
6
6
  keywords:
7
7
  - Internacionalização
8
8
  - Documentação
@@ -2,7 +2,7 @@
2
2
  createdAt: 2024-08-11
3
3
  updatedAt: 2025-06-29
4
4
  title: Como traduzir seu Express backend – guia i18n 2025
5
- description: Descubra como tornar seu backend vite multilíngue. Siga a documentação para internacionalizar (i18n) e traduzi-lo.
5
+ description: Descubra como tornar seu backend Express multilíngue. Siga a documentação para internacionalizar (i18n) e traduzi-lo.
6
6
  keywords:
7
7
  - Internacionalização
8
8
  - Documentação
@@ -2,7 +2,7 @@
2
2
  createdAt: 2025-09-09
3
3
  updatedAt: 2025-09-09
4
4
  title: Como traduzir seu Nest backend – guia i18n 2025
5
- description: Descubra como tornar seu backend vite multilíngue. Siga a documentação para internacionalizar (i18n) e traduzir.
5
+ description: Descubra como tornar seu backend NestJS multilíngue. Siga a documentação para internacionalizar (i18n) e traduzir.
6
6
  keywords:
7
7
  - Internacionalização
8
8
  - Documentação
@@ -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
  // Mantenha sua estrutura de pastas por namespace sincronizada com o 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: Como traduzir seu Tanstack Start – guia i18n 2025
5
5
  description: Aprenda como adicionar internacionalização (i18n) à sua aplicação Tanstack Start usando Intlayer. Siga este guia completo para tornar seu app multilíngue com roteamento sensível ao locale.
6
6
  keywords:
@@ -646,17 +646,6 @@ export function NotFoundComponent() {
646
646
  }
647
647
  ```
648
648
 
649
- ```tsx fileName="src/routes/__root.tsx"
650
- import { createRootRoute } from "@tanstack/react-router";
651
-
652
- // A rota raiz serve como o layout de nível superior
653
- // Ela não trata 404s diretamente - isso é delegado às rotas filhas
654
- // Isso mantém a raiz simples e permite que rotas conscientes de locale gerenciem sua própria lógica 404
655
- export const Route = createRootRoute({
656
- component: Outlet,
657
- });
658
- ```
659
-
660
649
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
661
650
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
662
651
  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 Sync JSON
5
5
  description: Sincronize os dicionários Intlayer com arquivos JSON i18n de terceiros (i18next, next-intl, react-intl, vue-i18n e mais). Mantenha seu i18n existente enquanto usa o Intlayer para gerenciar, traduzir e testar suas mensagens.
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: Adicionado suporte para formatos ICU e i18next
27
30
  - version: 6.1.6
28
31
  date: 2025-10-05
29
32
  changes: Documentação inicial do plugin Sync JSON
30
33
  ---
31
34
 
32
- ## Sync JSON (pontes i18n)
35
+ # Sync JSON (pontes i18n) - Sync JSON com suporte ICU / i18next
33
36
 
34
37
  <iframe title="Como manter suas traduções JSON sincronizadas com 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, // obrigatório
106
109
  location?: string, // rótulo opcional, padrão: "plugin"
107
110
  priority?: number, // prioridade opcional para resolução de conflitos, padrão: 0
111
+ format?: 'intlayer' | 'icu' | 'i18next', // formatador opcional, padrão: 'intlayer'
108
112
  });
109
113
  ```
110
114
 
115
+ #### `format` ('intlayer' | 'icu' | 'i18next')
116
+
117
+ Especifica o formatador a ser usado para o conteúdo do dicionário ao sincronizar arquivos JSON. Isso permite usar diferentes sintaxes de formatação de mensagens compatíveis com várias bibliotecas i18n.
118
+
119
+ - `'intlayer'`: O formatador Intlayer padrão (padrão).
120
+ - `'icu'`: Usa formatação de mensagens ICU (compatível com bibliotecas como react-intl, vue-i18n).
121
+ - `'i18next'`: Usa formatação de mensagens i18next (compatível com i18next, next-i18next, Solid-i18next).
122
+
123
+ **Exemplo:**
124
+
125
+ ```ts
126
+ syncJSON({
127
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
128
+ format: "i18next", // Usar formatação i18next para compatibilidade
129
+ }),
130
+ ```
131
+
111
132
  ## Múltiplas fontes JSON e prioridade
112
133
 
113
134
  Você pode adicionar múltiplos plugins `syncJSON` para sincronizar diferentes fontes JSON. Isso é útil quando você tem múltiplas bibliotecas i18n ou diferentes estruturas JSON no seu projeto.
@@ -134,6 +155,7 @@ export default defineConfig({
134
155
  plugins: [
135
156
  // Fonte JSON principal (maior prioridade)
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
  // Fonte JSON de fallback (prioridade menor)
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
  // Fonte JSON legado (prioridade mais baixa)
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: Файл контента
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 поддерживает различные типы содержимо
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: Узнайте, как добавить интернационализацию (i18n) в ваше приложение на Vite и React с помощью Intlayer. Следуйте этому руководству, чтобы сделать ваше приложение многоязычным.
5
+ description: Узнайте, как добавить интернационализацию (i18n) на ваш сайт Astro с помощью Intlayer. Следуйте этому руководству, чтобы сделать ваш сайт многоязычным.
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: Узнайте, как сделать ваш backend vite многоязычным. Следуйте документации для интернационализации (i18n) и перевода.
5
+ description: Узнайте, как сделать ваш backend 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
  - Документация
@@ -582,6 +582,7 @@ const config: IntlayerConfig = {
582
582
  },
583
583
  plugins: [
584
584
  syncJSON({
585
+ format: "i18next",
585
586
  source: ({ locale }) => `./locales/${locale}.json`,
586
587
  }),
587
588
  ],
@@ -421,6 +421,7 @@ const config: IntlayerConfig = {
421
421
  plugins: [
422
422
  // Синхронизируйте структуру папок по namespace с Intlayer
423
423
  syncJSON({
424
+ format: "icu",
424
425
  source: ({ key, locale }) => `./locales/${locale}/${key}.json`, // путь к 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: Узнайте, как добавить интернационализацию (i18n) в ваше приложение Tanstack Start с помощью Intlayer. Следуйте этому подробному руководству, чтобы сделать ваше приложение многоязычным с маршрутизацией, учитывающей локаль.
6
6
  keywords:
@@ -636,17 +636,6 @@ export function NotFoundComponent() {
636
636
  }
637
637
  ```
638
638
 
639
- ```tsx fileName="src/routes/__root.tsx"
640
- import { createRootRoute } from "@tanstack/react-router";
641
-
642
- // Корневой маршрут служит макетом верхнего уровня
643
- // Он не обрабатывает 404 напрямую - это делегировано дочерним маршрутам
644
- // Это сохраняет корень простым и позволяет маршрутам, осведомленным о локали, управлять своей собственной логикой 404
645
- export const Route = createRootRoute({
646
- component: Outlet,
647
- });
648
- ```
649
-
650
639
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
651
640
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
652
641
  import { validatePrefix } from "intlayer";