@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-09-09
3
- updatedAt: 2025-09-09
3
+ updatedAt: 2025-12-11
4
4
  title: Come tradurre la tua Tanstack Start – guida i18n 2025
5
5
  description: Scopri come aggiungere l'internazionalizzazione (i18n) alla tua applicazione Tanstack Start utilizzando Intlayer. Segui questa guida completa per rendere la tua app multilingue con il routing consapevole della localizzazione.
6
6
  keywords:
@@ -656,17 +656,6 @@ export function NotFoundComponent() {
656
656
  }
657
657
  ```
658
658
 
659
- ```tsx fileName="src/routes/__root.tsx"
660
- import { createRootRoute } from "@tanstack/react-router";
661
-
662
- // La route radice funge da layout di livello superiore
663
- // Non gestisce i 404 direttamente - questo è delegato alle route figlie
664
- // Questo mantiene la radice semplice e consente alle route consapevoli della locale di gestire la propria logica 404
665
- export const Route = createRootRoute({
666
- component: Outlet,
667
- });
668
- ```
669
-
670
659
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
671
660
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
672
661
  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: Sincronizza i dizionari Intlayer con file JSON i18n di terze parti (i18next, next-intl, react-intl, vue-i18n e altri). Mantieni il tuo i18n esistente mentre usi Intlayer per gestire, tradurre e testare i tuoi messaggi.
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: Aggiunto supporto per i formati ICU e i18next
27
30
  - version: 6.1.6
28
31
  date: 2025-10-05
29
32
  changes: Documentazione iniziale del plugin Sync JSON
30
33
  ---
31
34
 
32
- # Sync JSON (ponti i18n)
35
+ # Sync JSON (ponti i18n) - Sync JSON con supporto ICU / i18next
33
36
 
34
37
  <iframe title="Come mantenere sincronizzate le tue traduzioni JSON con 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, // richiesto
106
109
  location?: string, // etichetta opzionale, predefinito: "plugin"
107
110
  priority?: number, // priorità opzionale per la risoluzione dei conflitti, predefinito: 0
111
+ format?: 'intlayer' | 'icu' | 'i18next', // formattatore opzionale, predefinito: 'intlayer'
108
112
  });
109
113
  ```
110
114
 
115
+ #### `format` ('intlayer' | 'icu' | 'i18next')
116
+
117
+ Specifica il formattatore da utilizzare per il contenuto del dizionario durante la sincronizzazione dei file JSON. Ciò consente di utilizzare diverse sintassi di formattazione dei messaggi compatibili con varie librerie i18n.
118
+
119
+ - `'intlayer'`: Il formattatore Intlayer predefinito (predefinito).
120
+ - `'icu'`: Utilizza la formattazione dei messaggi ICU (compatibile con librerie come react-intl, vue-i18n).
121
+ - `'i18next'`: Utilizza la formattazione dei messaggi i18next (compatibile con i18next, next-i18next, Solid-i18next).
122
+
123
+ **Esempio:**
124
+
125
+ ```ts
126
+ syncJSON({
127
+ source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
128
+ format: "i18next", // Usare la formattazione i18next per la compatibilità
129
+ }),
130
+ ```
131
+
111
132
  ## Più sorgenti JSON e priorità
112
133
 
113
134
  Puoi aggiungere più plugin `syncJSON` per sincronizzare diverse sorgenti JSON. Questo è utile quando hai più librerie i18n o diverse strutture JSON nel tuo progetto.
@@ -134,6 +155,7 @@ export default defineConfig({
134
155
  plugins: [
135
156
  // Sorgente JSON primaria (priorità più alta)
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
  // Sorgente JSON di fallback (priorità più bassa)
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
  // Sorgente JSON legacy (priorità più bassa)
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
  ],
@@ -103,6 +103,10 @@ Intlayer は複数の設定ファイル形式をサポートしています:
103
103
 
104
104
  ## intlayer コマンドの実行
105
105
 
106
+ ### 認証
107
+
108
+ - **[ログイン](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/login.md)** - Intlayer CMSで認証し、アクセス認証情報を取得する
109
+
106
110
  ### コアコマンド
107
111
 
108
112
  - **[辞書のビルド](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/build.md)** - コンテンツ宣言ファイルから辞書をビルドします
@@ -144,6 +148,7 @@ Intlayer は複数の設定ファイル形式をサポートしています:
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,159 @@
1
+ ---
2
+ createdAt: 2025-12-16
3
+ updatedAt: 2025-12-16
4
+ title: CLI - ログイン
5
+ description: Intlayer CLI の login コマンドを使用して Intlayer CMS に認証し、アクセス認証情報を取得する方法を学びます。
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
+ # Intlayer CLI ログインコマンド
21
+
22
+ ---
23
+
24
+ ## 説明
25
+
26
+ Intlayer CLI の `login` コマンドは Intlayer CMS に対して認証を行うためのコマンドです。このコマンドは既定のブラウザを自動的に開き、認証プロセスを完了して Intlayer サービスを利用するために必要な認証情報(Client ID と Client Secret)を受け取ります。
27
+
28
+ ## 使用方法
29
+
30
+ ```bash
31
+ npx intlayer login [options]
32
+ ```
33
+
34
+ または
35
+
36
+ ```bash
37
+ intlayer login [options]
38
+ ```
39
+
40
+ ## オプション
41
+
42
+ ### `--cms-url <url>`
43
+
44
+ 認証のために接続する Intlayer CMS の URL を指定します。
45
+
46
+ - **型**: `string`
47
+ - **既定値**: `intlayer.config.*` に設定された値、または `https://intlayer.org`
48
+ - **例**:
49
+
50
+ ```bash
51
+ npx intlayer login --cms-url https://intlayer.org
52
+ ```
53
+
54
+ ### 設定オプション
55
+
56
+ 一般的な設定オプションも使用できます:
57
+
58
+ - `--env-file <path>`: 環境ファイルへのパス
59
+ - `-e, --env <env>`: 実行環境
60
+ - `--base-dir <dir>`: プロジェクトのベースディレクトリ
61
+ - `--verbose`: 詳細出力を有効にする(デフォルト: true)
62
+ - `--prefix <prefix>`: ログのプレフィックス
63
+
64
+ ## 動作の仕組み
65
+
66
+ 1. **ローカルサーバーの起動**: このコマンドは CMS から認証情報を受け取るためにランダムなポートでローカル HTTP サーバーを起動します
67
+ 2. **ブラウザの起動**: コマンドは既定のブラウザで CMS のログイン URL を自動的に開きます
68
+ 3. **認証**: ブラウザで Intlayer アカウントを使用して認証を完了します
69
+ 4. **認証情報の受信**: ローカルサーバーが CMS から Client ID と Client Secret を受け取ります
70
+ 5. **手順**: コマンドはプロジェクトで認証情報を設定するための手順を表示します
71
+
72
+ ## 出力
73
+
74
+ ログインに成功すると、コマンドは次の内容を表示します:
75
+
76
+ 1. **受信した認証情報**(Client ID と Client Secret)
77
+ 2. **`.env` ファイル用の手順**:
78
+
79
+ ```bash
80
+ INTLAYER_CLIENT_ID=your_client_id
81
+ INTLAYER_CLIENT_SECRET=your_client_secret
82
+ ```
83
+
84
+ 3. **Intlayer 設定ファイル用の手順**:
85
+
86
+ ```typescript
87
+ {
88
+ editor: {
89
+ cmsURL: 'https://intlayer.org',
90
+ clientId: process.env.INTLAYER_CLIENT_ID,
91
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
92
+ },
93
+ }
94
+ ```
95
+
96
+ ## 手動設定
97
+
98
+ ブラウザが自動で開かない場合、ターミナルに表示されている URL を手動で開いてください。
99
+
100
+ ## 例
101
+
102
+ ### カスタム CMS URL を使用してログイン
103
+
104
+ ```bash
105
+ npx intlayer login --cms-url https://custom-cms.example.com
106
+ ```
107
+
108
+ ### 特定の環境ファイルを指定してログイン
109
+
110
+ ```bash
111
+ npx intlayer login --env-file .env.production
112
+ ```
113
+
114
+ ### 冗長モードでログイン
115
+
116
+ ```bash
117
+ npx intlayer login --verbose
118
+ ```
119
+
120
+ ## トラブルシューティング
121
+
122
+ ### ブラウザが開かない
123
+
124
+ ブラウザが自動で開かない場合、ターミナルに表示されている URL をコピーしてブラウザで手動で開いてください。
125
+
126
+ ### 接続の問題
127
+
128
+ 接続の問題が発生した場合、次を確認してください:
129
+
130
+ 1. CMS の URL が正しいこと
131
+ 2. インターネット接続が正常に動作していること
132
+ 3. 接続をブロックするファイアウォールがないこと
133
+ 4. インターネット接続が正常に機能していることを確認する
134
+ 5. ファイアウォールが接続をブロックしていないこと
135
+
136
+ ### 認証情報が受け取れない場合
137
+
138
+ 認証情報が受け取れない場合:
139
+
140
+ 1. ブラウザで認証プロセスを完了したことを確認する
141
+ 2. ローカルポートがブロックされていないことを確認する
142
+ 3. コマンドを再実行してみる
143
+
144
+ ## 次の手順
145
+
146
+ ログイン完了後:
147
+
148
+ 1. 認証情報を `.env` ファイルに追加する
149
+ 2. 認証情報を使って `intlayer.config.*` ファイルを設定する
150
+ 3. 辞書を管理するためにCLIコマンドを使用する:
151
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/push.md) - 辞書をCMSにプッシュする
152
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/pull.md) - 辞書をCMSからプルする
153
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/fill.md) - 不足している翻訳を埋める
154
+
155
+ ## 関連項目
156
+
157
+ - [CLI ドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/index.md)
158
+ - [Intlayer 設定](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/configuration.md)
159
+ - [Intlayer CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/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: `buildMode` オプションを追加
17
20
  - version: 6.0.0
18
21
  date: 2025-09-16
19
22
  changes: `live` インポートモードを追加
@@ -525,6 +528,15 @@ Intlayerがアプリケーションの国際化をどのように最適化しビ
525
528
 
526
529
  #### プロパティ
527
530
 
531
+ - **mode**:
532
+ - _型_: `'auto' | 'manual'`
533
+ - _デフォルト_: `'auto'`
534
+ - _説明_: ビルドのモードを制御します。
535
+ - _例_: `'manual'`
536
+ - _注意_: 'auto'の場合、アプリケーションがビルドされると自動的にビルドが有効になります。
537
+ - _注意_: 'manual'の場合、ビルドコマンドが実行されたときにのみビルドが設定されます。
538
+ - _注意_: 辞書のビルドを無効にするために使用できます。たとえば、Node.js環境での実行を避ける必要がある場合などです。
539
+
528
540
  - **optimize**:
529
541
  - _型_: `boolean`
530
542
  - _デフォルト_: `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: コンテンツファイル
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: フィールドのドキュメントを追加
@@ -387,6 +390,26 @@ Intlayerの辞書は`Dictionary`型で定義され、その動作を制御する
387
390
  }
388
391
  ```
389
392
 
393
+ #### `format` ('intlayer' | 'icu' | 'i18next')
394
+
395
+ 辞書コンテンツに使用するフォーマッターを指定します。これにより、異なるメッセージフォーマット構文を使用できます。
396
+
397
+ - `'intlayer'`: デフォルトのIntlayerフォーマッター。
398
+ - `'icu'`: ICUメッセージフォーマットを使用します。
399
+ - `'i18next'`: i18nextメッセージフォーマットを使用します。
400
+
401
+ **例:**
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
  辞書をロケールごとの辞書に変換し、content内で宣言された各フィールドが自動的に翻訳ノードに変換されます。このプロパティが設定されている場合:
@@ -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
  - ドキュメント
@@ -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
  // 各ネームスペースのフォルダ構造を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: Tanstack Startアプリを翻訳する方法 – i18nガイド 2025
5
5
  description: Intlayerを使ってTanstack Startアプリケーションに国際化(i18n)を追加する方法を学びます。ロケール対応ルーティングで多言語対応アプリを作成するための包括的なガイドです。
6
6
  keywords:
@@ -628,17 +628,6 @@ export function NotFoundComponent() {
628
628
  }
629
629
  ```
630
630
 
631
- ```tsx fileName="src/routes/__root.tsx"
632
- import { createRootRoute } from "@tanstack/react-router";
633
-
634
- // ルートルートは最上位レイアウトとして機能します
635
- // 404を直接処理しません - それは子ルートに委任されます
636
- // これにより、ルートをシンプルに保ち、ロケール対応ルートが独自の404ロジックを管理できるようになります
637
- export const Route = createRootRoute({
638
- component: Outlet,
639
- });
640
- ```
641
-
642
631
  ```tsx fileName="src/routes/{-$locale}/route.tsx"
643
632
  import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
644
633
  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: 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
  ],
@@ -103,6 +103,10 @@ Intlayer는 여러 구성 파일 형식을 지원합니다:
103
103
 
104
104
  ## intlayer 명령 실행
105
105
 
106
+ ### 인증
107
+
108
+ - **[로그인](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/cli/login.md)** - Intlayer CMS로 인증하고 액세스 자격 증명 받기
109
+
106
110
  ### 핵심 명령
107
111
 
108
112
  - **[사전 빌드](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/cli/build.md)** - 콘텐츠 선언 파일에서 사전을 빌드합니다.
@@ -144,6 +148,7 @@ Intlayer는 여러 구성 파일 형식을 지원합니다:
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",