@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
@@ -0,0 +1,182 @@
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
+ - 登录
9
+ - 认证
10
+ - CMS
11
+ - Intlayer
12
+ - 凭证
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. **启动本地服务器**:该命令在一个随机端口上启动本地 HTTP 服务器,以从 CMS 接收凭证
67
+
68
+ 指定要用于身份验证的 Intlayer CMS 的 URL。
69
+
70
+ - **类型**: `string`
71
+ - **默认**: 在 `intlayer.config.*` 中配置的值,或 `https://intlayer.org`
72
+ - **示例**:
73
+
74
+ ```bash
75
+ npx intlayer login --cms-url https://intlayer.org
76
+ ```
77
+
78
+ ### 配置选项
79
+
80
+ 您还可以使用常用的配置选项:
81
+
82
+ - `--env-file <path>`: 环境文件的路径
83
+ - `-e, --env <env>`: 执行环境
84
+ - `--base-dir <dir>`: 项目的基目录
85
+ - `--verbose`: 启用详细输出(默认:true)
86
+ - `--prefix <prefix>`: 日志前缀
87
+
88
+ ## 工作原理
89
+
90
+ 1. **启动本地服务器**:该命令在随机端口启动一个本地 HTTP 服务器以接收来自 CMS 的凭证
91
+ 2. **Browser Opening**:该命令会自动在你的默认浏览器中打开 CMS 的登录 URL
92
+ 3. **Authentication**:在浏览器中使用你的 Intlayer 帐户完成身份验证
93
+ 4. **Credentials Reception**:本地服务器从 CMS 接收 Client ID 和 Client Secret
94
+ 5. **Instructions**:该命令显示在项目中配置凭证的说明
95
+
96
+ ## 输出
97
+
98
+ 登录成功后,命令将显示:
99
+
100
+ 1. **接收到的凭证**(Client ID 和 Client Secret)
101
+ 2. **`.env` 文件的说明**:
102
+
103
+ ```bash
104
+ INTLAYER_CLIENT_ID=your_client_id
105
+ INTLAYER_CLIENT_SECRET=your_client_secret
106
+ ```
107
+
108
+ 3. **Intlayer 配置文件的说明**:
109
+
110
+ ```typescript
111
+ {
112
+ editor: {
113
+ cmsURL: 'https://intlayer.org',
114
+ clientId: process.env.INTLAYER_CLIENT_ID,
115
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
116
+ },
117
+ }
118
+ ```
119
+
120
+ ## 手动配置
121
+
122
+ 如果浏览器没有自动打开,您可以手动访问终端中显示的 URL。
123
+
124
+ ## 示例
125
+
126
+ ### 使用自定义 CMS URL 登录
127
+
128
+ ```bash
129
+ npx intlayer login --cms-url https://custom-cms.example.com
130
+ ```
131
+
132
+ ### 使用特定环境文件登录
133
+
134
+ ```bash
135
+ npx intlayer login --env-file .env.production
136
+ ```
137
+
138
+ ### 以详细模式登录
139
+
140
+ ```bash
141
+ npx intlayer login --verbose
142
+ ```
143
+
144
+ ## 故障排除
145
+
146
+ ### 浏览器未打开
147
+
148
+ 如果浏览器没有自动打开,请复制终端中显示的 URL 并在浏览器中手动打开。
149
+
150
+ ### 连接问题
151
+
152
+ 如果遇到连接问题,请验证:
153
+
154
+ 1. 确认 CMS URL 是否正确
155
+ 2. 确认您的网络连接正常工作
156
+ 3. 确认没有防火墙阻止连接
157
+
158
+ ### 未收到凭证
159
+
160
+ 如果未收到凭证:
161
+
162
+ 1. 确保在浏览器中完成了身份验证流程
163
+ 2. 验证本地端口未被阻塞
164
+ 3. 重新尝试该命令
165
+
166
+ ## 后续步骤
167
+
168
+ 完成登录后:
169
+
170
+ 1. 将凭证添加到您的 `.env` 文件中
171
+ 2. 在 `intlayer.config.*` 文件中配置这些凭证
172
+ 3. 使用 CLI 命令管理您的词典:
173
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/push.md) - 将词典推送到 CMS
174
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/pull.md) - 从 CMS 拉取词典
175
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/fill.md) - 填充缺失的翻译
176
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/fill.md) - 填充缺失的翻译
177
+
178
+ ## 另请参阅
179
+
180
+ - [CLI 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/index.md)
181
+ - [Intlayer 配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
182
+ - [Intlayer CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/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` 导入模式
@@ -528,6 +531,15 @@ Intlayer 支持多个 AI 提供商,以增强灵活性和选择。目前支持
528
531
 
529
532
  #### 属性
530
533
 
534
+ - **mode**:
535
+ - _类型_:`'auto' | 'manual'`
536
+ - _默认值_:`'auto'`
537
+ - _描述_:控制构建的模式。
538
+ - _示例_:`'manual'`
539
+ - _注意_:如果为 'auto',构建将在应用程序构建时自动启用。
540
+ - _注意_:如果为 'manual',构建仅在执行构建命令时设置。
541
+ - _注意_:可用于禁用字典构建,例如当应避免在 Node.js 环境中执行时。
542
+
531
543
  - **optimize**:
532
544
  - _类型_:`boolean`
533
545
  - _默认值_:`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: 添加字段文档
@@ -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";
@@ -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 字典与第三方 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: 初始同步 JSON 插件文档
30
33
  ---
31
34
 
32
- ## 同步 JSON(i18n 桥接)
35
+ # 同步 JSON(i18n 桥接)- 支持 ICU / i18next 的同步 JSON
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
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/docs",
3
- "version": "7.4.0",
3
+ "version": "7.5.0-canary.1",
4
4
  "private": false,
5
5
  "description": "Intlayer documentation",
6
6
  "keywords": [
@@ -73,23 +73,23 @@
73
73
  "watch": "webpack --config ./webpack.config.ts --watch"
74
74
  },
75
75
  "dependencies": {
76
- "@intlayer/config": "7.4.0",
77
- "@intlayer/core": "7.4.0",
78
- "@intlayer/types": "7.4.0"
76
+ "@intlayer/config": "7.5.0-canary.1",
77
+ "@intlayer/core": "7.5.0-canary.1",
78
+ "@intlayer/types": "7.5.0-canary.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@intlayer/api": "7.4.0",
82
- "@intlayer/cli": "7.4.0",
83
- "@types/node": "24.10.1",
81
+ "@intlayer/api": "7.5.0-canary.1",
82
+ "@intlayer/cli": "7.5.0-canary.1",
83
+ "@types/node": "25.0.2",
84
84
  "@utils/ts-config": "1.0.4",
85
85
  "@utils/ts-config-types": "1.0.4",
86
86
  "@utils/tsdown-config": "1.0.4",
87
87
  "fast-glob": "3.3.3",
88
88
  "rimraf": "6.1.2",
89
- "tsdown": "0.16.8",
89
+ "tsdown": "0.18.0",
90
90
  "tsx": "^4.20.6",
91
91
  "typescript": "5.9.3",
92
- "vitest": "4.0.15"
92
+ "vitest": "4.0.16"
93
93
  },
94
94
  "engines": {
95
95
  "node": ">=14.18"
@@ -300,6 +300,25 @@ export const docsEntry = {
300
300
  id: readLocale('cli/live.md', 'id'),
301
301
  vi: readLocale('cli/live.md', 'vi'),
302
302
  } as unknown as Record<LocalesValues, Promise<string>>,
303
+ './docs/en/cli/login.md': {
304
+ en: readLocale('cli/login.md', 'en'),
305
+ ru: readLocale('cli/login.md', 'ru'),
306
+ ja: readLocale('cli/login.md', 'ja'),
307
+ fr: readLocale('cli/login.md', 'fr'),
308
+ ko: readLocale('cli/login.md', 'ko'),
309
+ zh: readLocale('cli/login.md', 'zh'),
310
+ es: readLocale('cli/login.md', 'es'),
311
+ de: readLocale('cli/login.md', 'de'),
312
+ ar: readLocale('cli/login.md', 'ar'),
313
+ it: readLocale('cli/login.md', 'it'),
314
+ 'en-GB': readLocale('cli/login.md', 'en-GB'),
315
+ pt: readLocale('cli/login.md', 'pt'),
316
+ hi: readLocale('cli/login.md', 'hi'),
317
+ tr: readLocale('cli/login.md', 'tr'),
318
+ pl: readLocale('cli/login.md', 'pl'),
319
+ id: readLocale('cli/login.md', 'id'),
320
+ vi: readLocale('cli/login.md', 'vi'),
321
+ } as unknown as Record<LocalesValues, Promise<string>>,
303
322
  './docs/en/cli/pull.md': {
304
323
  en: readLocale('cli/pull.md', 'en'),
305
324
  ru: readLocale('cli/pull.md', 'ru'),