@intlayer/docs 7.2.3 → 7.3.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 (461) hide show
  1. package/README.md +2 -0
  2. package/blog/ar/compiler_vs_declarative_i18n.md +138 -0
  3. package/blog/ar/intlayer_with_next-i18next.md +0 -1
  4. package/blog/ar/intlayer_with_vue-i18n.md +0 -1
  5. package/blog/de/compiler_vs_declarative_i18n.md +138 -0
  6. package/blog/de/intlayer_with_next-i18next.md +0 -1
  7. package/blog/de/intlayer_with_vue-i18n.md +0 -1
  8. package/blog/en/compiler_vs_declarative_i18n.md +138 -0
  9. package/blog/en/i18n_using_next-i18next.md +1 -1
  10. package/blog/en/i18n_using_next-intl.md +1 -1
  11. package/blog/en/intlayer_with_i18next.md +1 -1
  12. package/blog/en/intlayer_with_next-i18next.md +1 -2
  13. package/blog/en/intlayer_with_next-intl.md +1 -1
  14. package/blog/en/intlayer_with_react-i18next.md +1 -1
  15. package/blog/en/intlayer_with_react-intl.md +1 -1
  16. package/blog/en/intlayer_with_vue-i18n.md +1 -2
  17. package/blog/en-GB/compiler_vs_declarative_i18n.md +138 -0
  18. package/blog/en-GB/intlayer_with_next-i18next.md +0 -1
  19. package/blog/en-GB/intlayer_with_vue-i18n.md +0 -1
  20. package/blog/es/compiler_vs_declarative_i18n.md +138 -0
  21. package/blog/es/intlayer_with_next-i18next.md +0 -1
  22. package/blog/es/intlayer_with_vue-i18n.md +0 -1
  23. package/blog/fr/compiler_vs_declarative_i18n.md +138 -0
  24. package/blog/fr/intlayer_with_next-i18next.md +0 -1
  25. package/blog/fr/intlayer_with_vue-i18n.md +0 -1
  26. package/blog/hi/compiler_vs_declarative_i18n.md +138 -0
  27. package/blog/hi/intlayer_with_next-i18next.md +0 -1
  28. package/blog/hi/intlayer_with_vue-i18n.md +0 -1
  29. package/blog/id/compiler_vs_declarative_i18n.md +138 -0
  30. package/blog/id/intlayer_with_next-i18next.md +0 -1
  31. package/blog/id/intlayer_with_vue-i18n.md +0 -1
  32. package/blog/it/compiler_vs_declarative_i18n.md +138 -0
  33. package/blog/it/intlayer_with_next-i18next.md +0 -1
  34. package/blog/it/intlayer_with_vue-i18n.md +0 -1
  35. package/blog/ja/compiler_vs_declarative_i18n.md +138 -0
  36. package/blog/ja/intlayer_with_next-i18next.md +0 -1
  37. package/blog/ja/intlayer_with_vue-i18n.md +0 -1
  38. package/blog/ko/compiler_vs_declarative_i18n.md +138 -0
  39. package/blog/ko/intlayer_with_next-i18next.md +0 -1
  40. package/blog/ko/intlayer_with_vue-i18n.md +0 -1
  41. package/blog/pl/compiler_vs_declarative_i18n.md +138 -0
  42. package/blog/pl/intlayer_with_next-i18next.md +0 -1
  43. package/blog/pl/intlayer_with_vue-i18n.md +0 -1
  44. package/blog/pt/compiler_vs_declarative_i18n.md +138 -0
  45. package/blog/pt/intlayer_with_next-i18next.md +0 -1
  46. package/blog/pt/intlayer_with_vue-i18n.md +0 -1
  47. package/blog/ru/compiler_vs_declarative_i18n.md +138 -0
  48. package/blog/ru/intlayer_with_next-i18next.md +0 -1
  49. package/blog/ru/intlayer_with_vue-i18n.md +0 -1
  50. package/blog/tr/compiler_vs_declarative_i18n.md +138 -0
  51. package/blog/tr/intlayer_with_next-i18next.md +0 -1
  52. package/blog/tr/intlayer_with_vue-i18n.md +0 -1
  53. package/blog/vi/compiler_vs_declarative_i18n.md +138 -0
  54. package/blog/vi/intlayer_with_next-i18next.md +0 -1
  55. package/blog/vi/intlayer_with_vue-i18n.md +0 -1
  56. package/blog/zh/compiler_vs_declarative_i18n.md +138 -0
  57. package/blog/zh/intlayer_with_next-i18next.md +0 -1
  58. package/blog/zh/intlayer_with_vue-i18n.md +0 -1
  59. package/dist/cjs/generated/blog.entry.cjs +19 -0
  60. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  61. package/dist/cjs/generated/docs.entry.cjs +323 -19
  62. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  63. package/dist/esm/generated/blog.entry.mjs +19 -0
  64. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  65. package/dist/esm/generated/docs.entry.mjs +323 -19
  66. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  67. package/dist/types/generated/blog.entry.d.ts +1 -0
  68. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  69. package/dist/types/generated/docs.entry.d.ts +17 -1
  70. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  71. package/docs/ar/cli/build.md +64 -0
  72. package/docs/ar/cli/configuration.md +63 -0
  73. package/docs/ar/cli/debug.md +46 -0
  74. package/docs/ar/cli/doc-review.md +43 -0
  75. package/docs/ar/cli/doc-translate.md +132 -0
  76. package/docs/ar/cli/editor.md +28 -0
  77. package/docs/ar/cli/fill.md +130 -0
  78. package/docs/ar/cli/index.md +163 -0
  79. package/docs/ar/cli/list.md +53 -0
  80. package/docs/ar/cli/live.md +41 -0
  81. package/docs/ar/cli/pull.md +78 -0
  82. package/docs/ar/cli/push.md +98 -0
  83. package/docs/ar/cli/sdk.md +67 -0
  84. package/docs/ar/cli/test.md +76 -0
  85. package/docs/ar/cli/transform.md +65 -0
  86. package/docs/ar/cli/version.md +24 -0
  87. package/docs/ar/cli/watch.md +37 -0
  88. package/docs/ar/packages/intlayer/getPrefix.md +210 -0
  89. package/docs/de/cli/build.md +64 -0
  90. package/docs/de/cli/configuration.md +63 -0
  91. package/docs/de/cli/debug.md +46 -0
  92. package/docs/de/cli/doc-review.md +43 -0
  93. package/docs/de/cli/doc-translate.md +132 -0
  94. package/docs/de/cli/editor.md +28 -0
  95. package/docs/de/cli/fill.md +130 -0
  96. package/docs/de/cli/index.md +163 -0
  97. package/docs/de/cli/list.md +53 -0
  98. package/docs/de/cli/live.md +41 -0
  99. package/docs/de/cli/pull.md +78 -0
  100. package/docs/de/cli/push.md +98 -0
  101. package/docs/de/cli/sdk.md +67 -0
  102. package/docs/de/cli/test.md +76 -0
  103. package/docs/de/cli/transform.md +65 -0
  104. package/docs/de/cli/version.md +24 -0
  105. package/docs/de/cli/watch.md +37 -0
  106. package/docs/de/packages/intlayer/getPrefix.md +213 -0
  107. package/docs/en/CI_CD.md +2 -2
  108. package/docs/en/autoFill.md +24 -2
  109. package/docs/en/cli/build.md +64 -0
  110. package/docs/en/cli/configuration.md +63 -0
  111. package/docs/en/cli/debug.md +46 -0
  112. package/docs/en/cli/doc-review.md +43 -0
  113. package/docs/en/cli/doc-translate.md +132 -0
  114. package/docs/en/cli/editor.md +28 -0
  115. package/docs/en/cli/fill.md +130 -0
  116. package/docs/en/cli/index.md +163 -0
  117. package/docs/en/cli/list.md +53 -0
  118. package/docs/en/cli/live.md +41 -0
  119. package/docs/en/cli/pull.md +78 -0
  120. package/docs/en/cli/push.md +98 -0
  121. package/docs/en/cli/sdk.md +67 -0
  122. package/docs/en/cli/test.md +76 -0
  123. package/docs/en/cli/transform.md +65 -0
  124. package/docs/en/cli/version.md +24 -0
  125. package/docs/en/cli/watch.md +37 -0
  126. package/docs/en/dictionary/condition.md +1 -1
  127. package/docs/en/dictionary/enumeration.md +1 -1
  128. package/docs/en/dictionary/file.md +1 -1
  129. package/docs/en/dictionary/gender.md +1 -1
  130. package/docs/en/dictionary/insertion.md +1 -1
  131. package/docs/en/dictionary/markdown.md +1 -1
  132. package/docs/en/dictionary/nesting.md +1 -1
  133. package/docs/en/index.md +1 -1
  134. package/docs/en/intlayer_with_angular.md +1 -1
  135. package/docs/en/intlayer_with_astro.md +1 -1
  136. package/docs/en/intlayer_with_create_react_app.md +1 -1
  137. package/docs/en/intlayer_with_lynx+react.md +1 -1
  138. package/docs/en/intlayer_with_next-i18next.md +1 -1
  139. package/docs/en/intlayer_with_next-intl.md +1 -1
  140. package/docs/en/intlayer_with_nextjs_14.md +1 -1
  141. package/docs/en/intlayer_with_nextjs_15.md +1 -1
  142. package/docs/en/intlayer_with_nextjs_16.md +1 -1
  143. package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
  144. package/docs/en/intlayer_with_nuxt.md +1 -1
  145. package/docs/en/intlayer_with_react_native+expo.md +1 -1
  146. package/docs/en/intlayer_with_react_router_v7.md +1 -1
  147. package/docs/en/intlayer_with_tanstack.md +1 -1
  148. package/docs/en/intlayer_with_vite+preact.md +1 -1
  149. package/docs/en/intlayer_with_vite+react.md +1 -1
  150. package/docs/en/intlayer_with_vite+solid.md +1 -1
  151. package/docs/en/intlayer_with_vite+svelte.md +1 -1
  152. package/docs/en/intlayer_with_vite+vue.md +1 -1
  153. package/docs/en/introduction.md +1 -1
  154. package/docs/en/mcp_server.md +1 -2
  155. package/docs/en/per_locale_file.md +1 -1
  156. package/docs/en/plugins/sync-json.md +1 -1
  157. package/docs/en/releases/v6.md +2 -2
  158. package/docs/en/roadmap.md +1 -1
  159. package/docs/en-GB/cli/build.md +64 -0
  160. package/docs/en-GB/cli/configuration.md +63 -0
  161. package/docs/en-GB/cli/debug.md +46 -0
  162. package/docs/en-GB/cli/doc-review.md +43 -0
  163. package/docs/en-GB/cli/doc-translate.md +132 -0
  164. package/docs/en-GB/cli/editor.md +28 -0
  165. package/docs/en-GB/cli/fill.md +130 -0
  166. package/docs/en-GB/cli/index.md +163 -0
  167. package/docs/en-GB/cli/list.md +53 -0
  168. package/docs/en-GB/cli/live.md +41 -0
  169. package/docs/en-GB/cli/pull.md +78 -0
  170. package/docs/en-GB/cli/push.md +98 -0
  171. package/docs/en-GB/cli/sdk.md +67 -0
  172. package/docs/en-GB/cli/test.md +100 -0
  173. package/docs/en-GB/cli/transform.md +65 -0
  174. package/docs/en-GB/cli/version.md +24 -0
  175. package/docs/en-GB/cli/watch.md +37 -0
  176. package/docs/en-GB/dictionary/condition.md +1 -1
  177. package/docs/en-GB/dictionary/markdown.md +1 -1
  178. package/docs/en-GB/dictionary/nesting.md +1 -1
  179. package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
  180. package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
  181. package/docs/en-GB/packages/intlayer/getPrefix.md +213 -0
  182. package/docs/es/cli/build.md +64 -0
  183. package/docs/es/cli/configuration.md +63 -0
  184. package/docs/es/cli/debug.md +46 -0
  185. package/docs/es/cli/doc-review.md +43 -0
  186. package/docs/es/cli/doc-translate.md +132 -0
  187. package/docs/es/cli/editor.md +28 -0
  188. package/docs/es/cli/fill.md +130 -0
  189. package/docs/es/cli/index.md +163 -0
  190. package/docs/es/cli/list.md +53 -0
  191. package/docs/es/cli/live.md +41 -0
  192. package/docs/es/cli/pull.md +78 -0
  193. package/docs/es/cli/push.md +98 -0
  194. package/docs/es/cli/sdk.md +67 -0
  195. package/docs/es/cli/test.md +76 -0
  196. package/docs/es/cli/transform.md +65 -0
  197. package/docs/es/cli/version.md +24 -0
  198. package/docs/es/cli/watch.md +37 -0
  199. package/docs/es/packages/intlayer/getPrefix.md +213 -0
  200. package/docs/fr/cli/build.md +64 -0
  201. package/docs/fr/cli/configuration.md +63 -0
  202. package/docs/fr/cli/debug.md +46 -0
  203. package/docs/fr/cli/doc-review.md +43 -0
  204. package/docs/fr/cli/doc-translate.md +132 -0
  205. package/docs/fr/cli/editor.md +28 -0
  206. package/docs/fr/cli/fill.md +130 -0
  207. package/docs/fr/cli/index.md +163 -0
  208. package/docs/fr/cli/list.md +53 -0
  209. package/docs/fr/cli/live.md +41 -0
  210. package/docs/fr/cli/pull.md +78 -0
  211. package/docs/fr/cli/push.md +98 -0
  212. package/docs/fr/cli/sdk.md +67 -0
  213. package/docs/fr/cli/test.md +76 -0
  214. package/docs/fr/cli/transform.md +65 -0
  215. package/docs/fr/cli/version.md +24 -0
  216. package/docs/fr/cli/watch.md +37 -0
  217. package/docs/fr/packages/intlayer/getPrefix.md +213 -0
  218. package/docs/hi/cli/build.md +64 -0
  219. package/docs/hi/cli/configuration.md +63 -0
  220. package/docs/hi/cli/debug.md +46 -0
  221. package/docs/hi/cli/doc-review.md +43 -0
  222. package/docs/hi/cli/doc-translate.md +132 -0
  223. package/docs/hi/cli/editor.md +28 -0
  224. package/docs/hi/cli/fill.md +130 -0
  225. package/docs/hi/cli/index.md +163 -0
  226. package/docs/hi/cli/list.md +53 -0
  227. package/docs/hi/cli/live.md +41 -0
  228. package/docs/hi/cli/pull.md +78 -0
  229. package/docs/hi/cli/push.md +98 -0
  230. package/docs/hi/cli/sdk.md +67 -0
  231. package/docs/hi/cli/test.md +76 -0
  232. package/docs/hi/cli/transform.md +65 -0
  233. package/docs/hi/cli/version.md +24 -0
  234. package/docs/hi/cli/watch.md +37 -0
  235. package/docs/hi/intlayer_with_tanstack.md +1 -1
  236. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  237. package/docs/hi/packages/intlayer/getPrefix.md +217 -0
  238. package/docs/id/cli/build.md +64 -0
  239. package/docs/id/cli/configuration.md +62 -0
  240. package/docs/id/cli/debug.md +46 -0
  241. package/docs/id/cli/doc-review.md +43 -0
  242. package/docs/id/cli/doc-translate.md +132 -0
  243. package/docs/id/cli/editor.md +28 -0
  244. package/docs/id/cli/fill.md +130 -0
  245. package/docs/id/cli/index.md +163 -0
  246. package/docs/id/cli/list.md +53 -0
  247. package/docs/id/cli/live.md +41 -0
  248. package/docs/id/cli/pull.md +78 -0
  249. package/docs/id/cli/push.md +98 -0
  250. package/docs/id/cli/sdk.md +67 -0
  251. package/docs/id/cli/test.md +76 -0
  252. package/docs/id/cli/transform.md +65 -0
  253. package/docs/id/cli/version.md +24 -0
  254. package/docs/id/cli/watch.md +37 -0
  255. package/docs/id/packages/intlayer/getPrefix.md +210 -0
  256. package/docs/it/cli/build.md +64 -0
  257. package/docs/it/cli/configuration.md +63 -0
  258. package/docs/it/cli/debug.md +46 -0
  259. package/docs/it/cli/doc-review.md +43 -0
  260. package/docs/it/cli/doc-translate.md +132 -0
  261. package/docs/it/cli/editor.md +28 -0
  262. package/docs/it/cli/fill.md +130 -0
  263. package/docs/it/cli/index.md +158 -0
  264. package/docs/it/cli/list.md +53 -0
  265. package/docs/it/cli/live.md +41 -0
  266. package/docs/it/cli/pull.md +78 -0
  267. package/docs/it/cli/push.md +98 -0
  268. package/docs/it/cli/sdk.md +67 -0
  269. package/docs/it/cli/test.md +76 -0
  270. package/docs/it/cli/transform.md +65 -0
  271. package/docs/it/cli/version.md +24 -0
  272. package/docs/it/cli/watch.md +39 -0
  273. package/docs/it/packages/intlayer/getPrefix.md +211 -0
  274. package/docs/ja/cli/build.md +78 -0
  275. package/docs/ja/cli/configuration.md +63 -0
  276. package/docs/ja/cli/debug.md +46 -0
  277. package/docs/ja/cli/doc-review.md +43 -0
  278. package/docs/ja/cli/doc-translate.md +132 -0
  279. package/docs/ja/cli/editor.md +28 -0
  280. package/docs/ja/cli/fill.md +130 -0
  281. package/docs/ja/cli/index.md +163 -0
  282. package/docs/ja/cli/list.md +53 -0
  283. package/docs/ja/cli/live.md +41 -0
  284. package/docs/ja/cli/pull.md +78 -0
  285. package/docs/ja/cli/push.md +113 -0
  286. package/docs/ja/cli/sdk.md +67 -0
  287. package/docs/ja/cli/test.md +76 -0
  288. package/docs/ja/cli/transform.md +65 -0
  289. package/docs/ja/cli/version.md +24 -0
  290. package/docs/ja/cli/watch.md +37 -0
  291. package/docs/ja/packages/intlayer/getPrefix.md +212 -0
  292. package/docs/ko/cli/build.md +64 -0
  293. package/docs/ko/cli/configuration.md +63 -0
  294. package/docs/ko/cli/debug.md +46 -0
  295. package/docs/ko/cli/doc-review.md +43 -0
  296. package/docs/ko/cli/doc-translate.md +132 -0
  297. package/docs/ko/cli/editor.md +28 -0
  298. package/docs/ko/cli/fill.md +130 -0
  299. package/docs/ko/cli/index.md +163 -0
  300. package/docs/ko/cli/list.md +53 -0
  301. package/docs/ko/cli/live.md +41 -0
  302. package/docs/ko/cli/pull.md +78 -0
  303. package/docs/ko/cli/push.md +113 -0
  304. package/docs/ko/cli/sdk.md +67 -0
  305. package/docs/ko/cli/test.md +76 -0
  306. package/docs/ko/cli/transform.md +65 -0
  307. package/docs/ko/cli/version.md +24 -0
  308. package/docs/ko/cli/watch.md +37 -0
  309. package/docs/ko/packages/intlayer/getPrefix.md +213 -0
  310. package/docs/pl/cli/build.md +64 -0
  311. package/docs/pl/cli/configuration.md +63 -0
  312. package/docs/pl/cli/debug.md +46 -0
  313. package/docs/pl/cli/doc-review.md +43 -0
  314. package/docs/pl/cli/doc-translate.md +132 -0
  315. package/docs/pl/cli/editor.md +28 -0
  316. package/docs/pl/cli/fill.md +130 -0
  317. package/docs/pl/cli/index.md +163 -0
  318. package/docs/pl/cli/list.md +53 -0
  319. package/docs/pl/cli/live.md +41 -0
  320. package/docs/pl/cli/pull.md +78 -0
  321. package/docs/pl/cli/push.md +98 -0
  322. package/docs/pl/cli/sdk.md +67 -0
  323. package/docs/pl/cli/test.md +76 -0
  324. package/docs/pl/cli/transform.md +65 -0
  325. package/docs/pl/cli/version.md +24 -0
  326. package/docs/pl/cli/watch.md +39 -0
  327. package/docs/pl/packages/intlayer/getPrefix.md +217 -0
  328. package/docs/pt/cli/build.md +64 -0
  329. package/docs/pt/cli/configuration.md +63 -0
  330. package/docs/pt/cli/debug.md +46 -0
  331. package/docs/pt/cli/doc-review.md +43 -0
  332. package/docs/pt/cli/doc-translate.md +132 -0
  333. package/docs/pt/cli/editor.md +28 -0
  334. package/docs/pt/cli/fill.md +130 -0
  335. package/docs/pt/cli/index.md +163 -0
  336. package/docs/pt/cli/list.md +53 -0
  337. package/docs/pt/cli/live.md +41 -0
  338. package/docs/pt/cli/pull.md +78 -0
  339. package/docs/pt/cli/push.md +98 -0
  340. package/docs/pt/cli/sdk.md +67 -0
  341. package/docs/pt/cli/test.md +76 -0
  342. package/docs/pt/cli/transform.md +65 -0
  343. package/docs/pt/cli/version.md +24 -0
  344. package/docs/pt/cli/watch.md +39 -0
  345. package/docs/pt/packages/intlayer/getPrefix.md +217 -0
  346. package/docs/ru/cli/build.md +64 -0
  347. package/docs/ru/cli/configuration.md +63 -0
  348. package/docs/ru/cli/debug.md +46 -0
  349. package/docs/ru/cli/doc-review.md +43 -0
  350. package/docs/ru/cli/doc-translate.md +132 -0
  351. package/docs/ru/cli/editor.md +28 -0
  352. package/docs/ru/cli/fill.md +130 -0
  353. package/docs/ru/cli/index.md +163 -0
  354. package/docs/ru/cli/list.md +53 -0
  355. package/docs/ru/cli/live.md +41 -0
  356. package/docs/ru/cli/pull.md +78 -0
  357. package/docs/ru/cli/push.md +98 -0
  358. package/docs/ru/cli/sdk.md +67 -0
  359. package/docs/ru/cli/test.md +76 -0
  360. package/docs/ru/cli/transform.md +65 -0
  361. package/docs/ru/cli/version.md +24 -0
  362. package/docs/ru/cli/watch.md +39 -0
  363. package/docs/ru/packages/intlayer/getPrefix.md +213 -0
  364. package/docs/tr/CI_CD.md +2 -2
  365. package/docs/tr/cli/build.md +64 -0
  366. package/docs/tr/cli/configuration.md +63 -0
  367. package/docs/tr/cli/debug.md +46 -0
  368. package/docs/tr/cli/doc-review.md +43 -0
  369. package/docs/tr/cli/doc-translate.md +132 -0
  370. package/docs/tr/cli/editor.md +28 -0
  371. package/docs/tr/cli/fill.md +130 -0
  372. package/docs/tr/cli/index.md +163 -0
  373. package/docs/tr/cli/list.md +53 -0
  374. package/docs/tr/cli/live.md +41 -0
  375. package/docs/tr/cli/pull.md +78 -0
  376. package/docs/tr/cli/push.md +98 -0
  377. package/docs/tr/cli/sdk.md +67 -0
  378. package/docs/tr/cli/test.md +76 -0
  379. package/docs/tr/cli/transform.md +65 -0
  380. package/docs/tr/cli/version.md +24 -0
  381. package/docs/tr/cli/watch.md +39 -0
  382. package/docs/tr/dictionary/condition.md +1 -1
  383. package/docs/tr/dictionary/enumeration.md +1 -1
  384. package/docs/tr/dictionary/file.md +1 -1
  385. package/docs/tr/dictionary/gender.md +1 -1
  386. package/docs/tr/dictionary/insertion.md +1 -1
  387. package/docs/tr/dictionary/markdown.md +1 -1
  388. package/docs/tr/dictionary/nesting.md +1 -1
  389. package/docs/tr/index.md +1 -1
  390. package/docs/tr/intlayer_with_angular.md +1 -1
  391. package/docs/tr/intlayer_with_create_react_app.md +1 -1
  392. package/docs/tr/intlayer_with_lynx+react.md +1 -1
  393. package/docs/tr/intlayer_with_nextjs_15.md +1 -1
  394. package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
  395. package/docs/tr/intlayer_with_nuxt.md +1 -1
  396. package/docs/tr/intlayer_with_react_native+expo.md +1 -1
  397. package/docs/tr/intlayer_with_vite+preact.md +1 -1
  398. package/docs/tr/intlayer_with_vite+react.md +1 -1
  399. package/docs/tr/intlayer_with_vite+solid.md +1 -1
  400. package/docs/tr/intlayer_with_vite+vue.md +1 -1
  401. package/docs/tr/introduction.md +1 -1
  402. package/docs/tr/mcp_server.md +1 -1
  403. package/docs/tr/packages/intlayer/getPrefix.md +213 -0
  404. package/docs/tr/per_locale_file.md +1 -1
  405. package/docs/tr/roadmap.md +1 -1
  406. package/docs/vi/cli/build.md +64 -0
  407. package/docs/vi/cli/configuration.md +63 -0
  408. package/docs/vi/cli/debug.md +46 -0
  409. package/docs/vi/cli/doc-review.md +43 -0
  410. package/docs/vi/cli/doc-translate.md +132 -0
  411. package/docs/vi/cli/editor.md +28 -0
  412. package/docs/vi/cli/fill.md +130 -0
  413. package/docs/vi/cli/index.md +163 -0
  414. package/docs/vi/cli/list.md +53 -0
  415. package/docs/vi/cli/live.md +41 -0
  416. package/docs/vi/cli/pull.md +78 -0
  417. package/docs/vi/cli/push.md +98 -0
  418. package/docs/vi/cli/sdk.md +67 -0
  419. package/docs/vi/cli/test.md +76 -0
  420. package/docs/vi/cli/transform.md +65 -0
  421. package/docs/vi/cli/version.md +24 -0
  422. package/docs/vi/cli/watch.md +37 -0
  423. package/docs/vi/packages/intlayer/getPrefix.md +213 -0
  424. package/docs/zh/cli/build.md +64 -0
  425. package/docs/zh/cli/configuration.md +63 -0
  426. package/docs/zh/cli/debug.md +46 -0
  427. package/docs/zh/cli/doc-review.md +43 -0
  428. package/docs/zh/cli/doc-translate.md +132 -0
  429. package/docs/zh/cli/editor.md +28 -0
  430. package/docs/zh/cli/fill.md +130 -0
  431. package/docs/zh/cli/index.md +168 -0
  432. package/docs/zh/cli/list.md +53 -0
  433. package/docs/zh/cli/live.md +41 -0
  434. package/docs/zh/cli/pull.md +78 -0
  435. package/docs/zh/cli/push.md +113 -0
  436. package/docs/zh/cli/sdk.md +67 -0
  437. package/docs/zh/cli/test.md +76 -0
  438. package/docs/zh/cli/transform.md +65 -0
  439. package/docs/zh/cli/version.md +24 -0
  440. package/docs/zh/cli/watch.md +37 -0
  441. package/docs/zh/packages/intlayer/getPrefix.md +213 -0
  442. package/package.json +7 -7
  443. package/src/generated/blog.entry.ts +19 -0
  444. package/src/generated/docs.entry.ts +323 -19
  445. package/docs/ar/intlayer_cli.md +0 -614
  446. package/docs/de/intlayer_cli.md +0 -615
  447. package/docs/en/intlayer_cli.md +0 -897
  448. package/docs/en-GB/intlayer_cli.md +0 -615
  449. package/docs/es/intlayer_cli.md +0 -614
  450. package/docs/fr/intlayer_cli.md +0 -614
  451. package/docs/hi/intlayer_cli.md +0 -616
  452. package/docs/id/intlayer_cli.md +0 -886
  453. package/docs/it/intlayer_cli.md +0 -610
  454. package/docs/ja/intlayer_cli.md +0 -616
  455. package/docs/ko/intlayer_cli.md +0 -614
  456. package/docs/pl/intlayer_cli.md +0 -893
  457. package/docs/pt/intlayer_cli.md +0 -615
  458. package/docs/ru/intlayer_cli.md +0 -885
  459. package/docs/tr/intlayer_cli.md +0 -614
  460. package/docs/vi/intlayer_cli.md +0 -886
  461. package/docs/zh/intlayer_cli.md +0 -613
@@ -0,0 +1,113 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: 推送词典
5
+ description: 了解如何将您的词典推送到 Intlayer 编辑器和 CMS。
6
+ keywords:
7
+ - 推送
8
+ - 词典
9
+ - CLI
10
+ - Intlayer
11
+ - 编辑器
12
+ - CMS
13
+ slugs:
14
+ - doc
15
+ - concept
16
+ - cli
17
+ - push
18
+ ---
19
+
20
+ # 推送词典
21
+
22
+ ```bash
23
+ npx intlayer dictionary push
24
+ ```
25
+
26
+ 如果已安装 [intlayer 编辑器](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_visual_editor.md),您也可以将词典推送到编辑器。此命令将使词典可用于[编辑器](https://intlayer.org/dashboard)。通过这种方式,您可以与团队共享词典,并在不修改应用代码的情况下编辑内容。
27
+
28
+ ## 别名:
29
+
30
+ - `npx intlayer dictionaries push`
31
+ - `npx intlayer dictionary push`
32
+ - `npx intlayer dic push`
33
+
34
+ ## 参数:
35
+
36
+ **词典选项:**
37
+
38
+ - **`-d`,`--dictionaries`**:要推送的词典 ID。如果未指定,则会推送所有词典。
39
+
40
+ > 示例:`npx intlayer dictionary push -d my-dictionary-id my-other-dictionary-id`
41
+
42
+ - **`--dictionary`**:要推送的词典 ID(`--dictionaries` 的别名)。
43
+
44
+ > 示例:`npx intlayer dictionary push --dictionary my-dictionary-id my-other-dictionary-id`
45
+
46
+ **配置选项:**
47
+
48
+ - **`--base-dir`**:指定项目的基础目录。命令会在该目录中查找 `intlayer.config.{ts,js,json,cjs,mjs}` 文件以获取 intlayer 配置。
49
+
50
+ > 示例:`npx intlayer dictionary push --env-file .env.production.local`
51
+
52
+ - **`--no-cache`**:禁用缓存。
53
+
54
+ > 示例:`npx intlayer build --no-cache`
55
+
56
+ **环境变量选项:**
57
+
58
+ - **`--env`**:指定环境(例如,`development`,`production`)。当你在 intlayer 配置文件中使用环境变量时非常有用。
59
+ - **`--env-file`**:提供自定义环境文件以加载变量。当你在 intlayer 配置文件中使用环境变量时非常有用。
60
+
61
+ > 示例:`npx intlayer dictionary push --env-file .env.production.local`
62
+
63
+ > 示例:`npx intlayer dictionary push --env production`
64
+
65
+ **输出选项:**
66
+
67
+ - **`-r`,`--delete-locale-dictionary`**:跳过推送字典后询问是否删除本地化目录的问题,并删除这些目录。默认情况下,如果字典在本地定义,它将覆盖远程字典内容。
68
+
69
+ > 示例:`npx intlayer dictionary push -r`
70
+
71
+ > 示例:`npx intlayer dictionary push --delete-locale-dictionary`
72
+
73
+ - **`-k`,`--keep-locale-dictionary`**:跳过推送字典后询问是否删除本地化目录的问题,并保留这些目录。默认情况下,如果字典在本地定义,它将覆盖远程字典内容。
74
+
75
+ > 示例:`npx intlayer dictionary push -k`
76
+
77
+ > 示例:`npx intlayer dictionary push --keep-locale-dictionary`
78
+
79
+ **准备选项:**
80
+
81
+ - **`--build`**:在推送之前构建字典以确保内容是最新的。true 将强制构建,false 将跳过构建,undefined 将允许使用构建缓存。
82
+
83
+ **日志选项:**
84
+
85
+ - **`--verbose`**:启用详细日志以便调试。(CLI 默认启用)
86
+
87
+ **Git 选项:**
88
+
89
+ - **`--git-diff`**:仅针对包含从基准(默认 `origin/main`)到当前分支(默认 `HEAD`)的更改的字典运行。
90
+ - **`--git-diff-base`**:指定 git diff 的基准引用(默认 `origin/main`)。
91
+ - **`--git-diff-current`**:指定 git diff 的当前引用(默认 `HEAD`)。
92
+ - **`--uncommitted`**:包含未提交的更改。
93
+ - **`--unpushed`**:包含未推送的更改。
94
+ - **`--untracked`**:包含未跟踪的文件。
95
+
96
+ - **`--build`**:在推送之前构建字典以确保内容是最新的。设置为 true 将强制构建,false 将跳过构建,undefined 将允许使用构建缓存。
97
+
98
+ **日志选项:**
99
+
100
+ - **`--verbose`**:启用详细日志以便调试。(CLI 默认启用)
101
+
102
+ **Git 选项:**
103
+
104
+ - **`--git-diff`**:仅对包含从基准分支(默认 `origin/main`)到当前分支(默认 `HEAD`)的更改的字典运行。
105
+ - **`--git-diff-base`**:指定 git diff 的基准引用(默认 `origin/main`)。
106
+ - **`--git-diff-current`**:指定 git diff 的当前引用(默认 `HEAD`)。
107
+ - **`--uncommitted`**:包含未提交的更改。
108
+ - **`--unpushed`**:包含未推送的更改。
109
+ - **`--untracked`**:包含未跟踪的文件。
110
+
111
+ > 示例:`npx intlayer dictionary push --git-diff --git-diff-base origin/main --git-diff-current HEAD`
112
+
113
+ > 示例:`npx intlayer dictionary push --uncommitted --unpushed --untracked`
@@ -0,0 +1,67 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: CLI SDK
5
+ description: 了解如何在您自己的代码中使用 Intlayer CLI SDK。
6
+ keywords:
7
+ - SDK
8
+ - CLI
9
+ - Intlayer
10
+ - 编程式
11
+ slugs:
12
+ - doc
13
+ - concept
14
+ - cli
15
+ - sdk
16
+ ---
17
+
18
+ # CLI SDK
19
+
20
+ CLI SDK 是一个库,允许您在自己的代码中使用 Intlayer CLI。
21
+
22
+ ```bash packageManager="npm"
23
+ npm install @intlayer/cli --save-dev
24
+ ```
25
+
26
+ ```bash packageManager="yarn"
27
+ yarn add @intlayer/cli --save-dev
28
+ ```
29
+
30
+ ```bash packageManager="pnpm"
31
+ pnpm add @intlayer/cli --save-dev
32
+ ```
33
+
34
+ 使用示例:
35
+
36
+ ```ts
37
+ import {
38
+ push,
39
+ pull,
40
+ fill,
41
+ build,
42
+ listContentDeclaration,
43
+ testMissingTranslations,
44
+ docTranslate,
45
+ docReview,
46
+ transform,
47
+ } from "@intlayer/cli";
48
+
49
+ push();
50
+ // ...
51
+ pull();
52
+ // ...
53
+ fill();
54
+ // ...
55
+ build();
56
+ // ...
57
+ listContentDeclaration();
58
+ // ...
59
+ testMissingTranslations();
60
+ // ...
61
+ docTranslate();
62
+ // ...
63
+ docReview();
64
+ // ...
65
+ transform();
66
+ // ...
67
+ ```
@@ -0,0 +1,76 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: 测试缺失的翻译
5
+ description: 学习如何测试并识别字典中缺失的翻译。
6
+ keywords:
7
+ - 测试
8
+ - 缺失的翻译
9
+ - CLI
10
+ - Intlayer
11
+ slugs:
12
+ - doc
13
+ - concept
14
+ - cli
15
+ - test
16
+ ---
17
+
18
+ # 测试缺失的翻译
19
+
20
+ ```bash
21
+ npx intlayer content test
22
+ ```
23
+
24
+ ## 别名:
25
+
26
+ - `npx intlayer test`
27
+
28
+ 此命令分析您的内容声明文件,以识别所有配置的语言环境中缺失的翻译。它提供一份全面的报告,显示哪些翻译键在哪些语言环境中缺失,帮助您维护多语言内容的一致性。
29
+
30
+ ## 示例输出:
31
+
32
+ ```bash
33
+ pnpm intlayer content test
34
+ Missing translations:
35
+ - home-page - tr - src/components/HomePage/homePage.content.ts
36
+ - server-component - es, tr - src/components/ServerComponent/serverComponent.content.ts
37
+ - client-component - pl, tr - src/components/ClientComponent/clientComponent.content.ts
38
+ Locales: en, ru, ja, fr, ko, zh, es, de, ar, it, en-GB, pt, hi, tr, pl
39
+ Required locales: en
40
+ Missing locales: pl, tr, es
41
+ Missing required locales: -
42
+ Total missing locales: 3
43
+ Total missing required locales: 0
44
+ ```
45
+
46
+ ## 参数:
47
+
48
+ **配置选项:**
49
+
50
+ - **`--env`**:指定环境(例如,`development`,`production`)。
51
+ - **`--env-file [envFile]`**:提供自定义环境文件以加载变量。
52
+ - **`--base-dir`**:指定项目的基础目录。
53
+
54
+ > 示例:`npx intlayer content test --base-dir ./src --env-file .env.production.local`
55
+
56
+ - **`--no-cache`**:禁用缓存。
57
+
58
+ > 示例:`npx intlayer build --no-cache`
59
+
60
+ **准备选项:**
61
+
62
+ - **`--build`**:在推送之前构建字典以确保内容是最新的。设置为 true 将强制构建,false 将跳过构建,undefined 将允许使用构建缓存。
63
+
64
+ **日志选项:**
65
+
66
+ - **`--verbose`**:启用详细日志以便调试。(CLI 默认启用)
67
+
68
+ > 示例:`npx intlayer content test --verbose`
69
+
70
+ ## 示例:
71
+
72
+ ```bash
73
+ npx intlayer content test --verbose
74
+ ```
75
+
76
+ 输出帮助您快速识别需要完成的翻译,以确保您的应用程序在所有配置的语言环境中正常运行。
@@ -0,0 +1,65 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: 转换组件
5
+ description: 学习如何转换现有组件以使用 Intlayer。
6
+ keywords:
7
+ - 转换
8
+ - 组件
9
+ - 迁移
10
+ - CLI
11
+ - Intlayer
12
+ slugs:
13
+ - doc
14
+ - concept
15
+ - cli
16
+ - transform
17
+ ---
18
+
19
+ # 转换组件
20
+
21
+ ```bash
22
+ npx intlayer transform
23
+ ```
24
+
25
+ 此命令分析您的代码文件,帮助迁移现有组件以使用 Intlayer。它支持交互式文件选择或特定文件定位。
26
+
27
+ ## 别名:
28
+
29
+ - `npx intlayer trans`
30
+
31
+ ## 参数:
32
+
33
+ **文件选择选项:**
34
+
35
+ - **`-f, --file [files...]`**:要转换的特定文件列表。如果未提供,CLI 将扫描匹配的文件(`**/*.{tsx,jsx,vue,svelte,ts,js}`)并提示您选择要转换的文件。
36
+
37
+ > 示例:`npx intlayer transform -f src/components/MyComponent.tsx`
38
+
39
+ **输出选项:**
40
+
41
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**:保存生成的内容声明文件的目录。
42
+
43
+ > 示例:`npx intlayer transform -o src/content`
44
+
45
+ - **`--code-only`**:仅转换组件代码(不写入内容声明)。
46
+
47
+ > 示例:`npx intlayer transform --code-only`
48
+
49
+ - **`--declaration-only`**:仅生成内容声明(不重写组件)。
50
+
51
+ > 示例:`npx intlayer transform --declaration-only`
52
+
53
+ **配置选项:**
54
+
55
+ - **`--base-dir`**:指定项目的基础目录。
56
+ - **`--env`**:指定环境。
57
+ - **`--env-file`**:提供自定义环境文件。
58
+ - **`--verbose`**:启用详细日志记录。
59
+
60
+ **必需的插件:**
61
+
62
+ transform 命令在 TypeScript / JSX 文件上无需额外插件即可工作。但对于 Vue 和 Svelte 项目,需要安装以下插件:
63
+
64
+ - **`@intlayer/vue-transformer`**:用于 Vue 文件。
65
+ - **`@intlayer/svelte-transformer`**:用于 Svelte 文件。
@@ -0,0 +1,24 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: 检查 CLI 版本
5
+ description: 了解如何检查已安装的 Intlayer CLI 版本。
6
+ keywords:
7
+ - 版本
8
+ - CLI
9
+ - Intlayer
10
+ slugs:
11
+ - doc
12
+ - concept
13
+ - cli
14
+ - version
15
+ ---
16
+
17
+ # 检查 CLI 版本
18
+
19
+ ```bash
20
+ npx intlayer --version
21
+ npx intlayer version
22
+ ```
23
+
24
+ 这两个命令都会打印已安装的 Intlayer CLI 版本。
@@ -0,0 +1,37 @@
1
+ ---
2
+ createdAt: 2024-08-11
3
+ updatedAt: 2025-11-22
4
+ title: 监视字典
5
+ description: 学习如何监视内容声明文件的更改并自动构建字典。
6
+ keywords:
7
+ - 监视
8
+ - 字典
9
+ - CLI
10
+ - Intlayer
11
+ slugs:
12
+ - doc
13
+ - concept
14
+ - cli
15
+ - watch
16
+ ---
17
+
18
+ # 监视字典
19
+
20
+ ```bash
21
+ npx intlayer watch
22
+ ```
23
+
24
+ 此命令将监视内容声明文件的更改,并在 `.intlayer` 目录中构建字典。
25
+ 此命令等同于 `npx intlayer build --watch --skip-prepare`。
26
+
27
+ ## 别名:
28
+
29
+ - `npx intlayer dictionaries watch`
30
+ - `npx intlayer dictionary watch`
31
+ - `npx intlayer dic watch`
32
+
33
+ ## 参数:
34
+
35
+ - **`--with`**:与监视命令并行启动其他命令。
36
+
37
+ > 示例:`npx intlayer watch --with "next dev --turbopack"`
@@ -0,0 +1,213 @@
1
+ ---
2
+ createdAt: 2025-11-16
3
+ updatedAt: 2025-11-16
4
+ title: getPrefix 函数文档 | intlayer
5
+ description: 查看如何使用 intlayer 包中的 getPrefix 函数
6
+ keywords:
7
+ - getPrefix
8
+ - prefix
9
+ - Intlayer
10
+ - intlayer
11
+ - 国际化
12
+ - 文档
13
+ - Next.js
14
+ - JavaScript
15
+ - React
16
+ slugs:
17
+ - doc
18
+ - packages
19
+ - intlayer
20
+ - getPrefix
21
+ history:
22
+ - version: 7.1.0
23
+ date: 2025-11-16
24
+ changes: 初始文档
25
+ ---
26
+
27
+ # 文档:`intlayer` 中的 `getPrefix` 函数
28
+
29
+ ## 描述
30
+
31
+ `getPrefix` 函数根据路由模式配置确定给定 locale 的 URL 前缀。它将 locale 与默认 locale 进行比较,并返回一个包含三种不同前缀格式的对象,以实现灵活的 URL 构建。
32
+
33
+ **主要特性:**
34
+
35
+ - 接受一个 locale 作为第一个参数(必需)
36
+ - 可选的 `options` 对象,包含 `defaultLocale` 和 `mode`
37
+ - 返回一个包含 `prefix` 和 `localePrefix` 属性的对象
38
+ - 支持所有路由模式:`prefix-no-default`、`prefix-all`、`no-prefix` 和 `search-params`
39
+ - 轻量级工具,用于确定何时添加 locale 前缀
40
+
41
+ ---
42
+
43
+ ## 函数签名
44
+
45
+ ```typescript
46
+ getPrefix(
47
+ locale: Locales, // 必需
48
+ options?: { // 可选
49
+ defaultLocale?: Locales;
50
+ mode?: 'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params';
51
+ }
52
+ ): GetPrefixResult
53
+
54
+ type GetPrefixResult = {
55
+ prefix: string; // 例如 'fr/' 或 ''
56
+ localePrefix?: Locale; // 例如 'fr' 或 undefined
57
+ }
58
+ ```
59
+
60
+ ---
61
+
62
+ ## 参数
63
+
64
+ - `locale: Locales`
65
+ - **描述**:用于生成前缀的语言环境。如果该值为假值(undefined、null、空字符串),函数将返回空字符串。
66
+ - **类型**:`Locales`
67
+ - **必需**:是
68
+
69
+ - `options?: object`
70
+ - **描述**:用于确定前缀的配置对象。
71
+ - **类型**:`object`
72
+ - **必需**:否(可选)
73
+
74
+ - `options.defaultLocale?: Locales`
75
+ - **描述**:应用程序的默认语言环境。如果未提供,则使用项目配置中设置的默认语言环境。
76
+ - **类型**:`Locales`
77
+ - **默认值**:[`项目配置`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md#middleware)
78
+
79
+ - `options.mode?: 'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params'`
80
+
81
+ - **描述**:用于处理本地化的 URL 路由模式。如果未提供,则使用项目配置中设置的模式。
82
+ - **类型**:`'prefix-no-default' | 'prefix-all' | 'no-prefix' | 'search-params'`
83
+ - **默认值**:[项目配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md#middleware)
84
+ - **模式**:
85
+ - `prefix-no-default`:当 locale 与默认 locale 匹配时返回空字符串
86
+ - `prefix-all`:为所有 locale(包括默认)返回前缀
87
+ - `no-prefix`:返回空字符串(URL 中无前缀)
88
+ - `search-params`:返回空字符串(locale 作为查询参数)
89
+
90
+ ### 返回值
91
+
92
+ - **类型**:`GetPrefixResult`
93
+ - **描述**:包含三种不同前缀格式的对象:
94
+ - `prefix`:带有尾部斜杠的路径前缀(例如,`'fr/'`,`''`)
95
+ - `localePrefix`:不带斜杠的语言标识符(例如,`'fr'`,`undefined`)
96
+
97
+ ---
98
+
99
+ ## 示例用法
100
+
101
+ ### 基本用法
102
+
103
+ ```typescript codeFormat="typescript"
104
+ import { getPrefix, Locales } from "intlayer";
105
+
106
+ // 检查英语语言的前缀
107
+ getPrefix(Locales.ENGLISH, {
108
+ defaultLocale: Locales.ENGLISH,
109
+ mode: "prefix-all",
110
+ });
111
+ // 返回: { prefix: 'en/', localePrefix: 'en' }
112
+
113
+ // 检查法语语言的前缀
114
+ getPrefix(Locales.FRENCH, {
115
+ defaultLocale: Locales.ENGLISH,
116
+ mode: "prefix-no-default",
117
+ });
118
+ // 返回: { prefix: 'fr/', localePrefix: 'fr' }
119
+ ```
120
+
121
+ ```javascript codeFormat="esm"
122
+ import { getPrefix, Locales } from "intlayer";
123
+
124
+ getPrefix(Locales.ENGLISH, { mode: "prefix-all" });
125
+ javascript codeFormat="commonjs"
126
+ const { getPrefix, Locales } = require("intlayer");
127
+
128
+ getPrefix(Locales.ENGLISH, { mode: "prefix-all" });
129
+ // 返回: { prefix: '', localePrefix: undefined }
130
+ ```
131
+
132
+ ### 不同的路由模式
133
+
134
+ ```typescript
135
+ import { getPrefix, Locales } from "intlayer";
136
+
137
+ // prefix-all: 总是返回前缀
138
+ getPrefix(Locales.ENGLISH, {
139
+ mode: "prefix-all",
140
+ defaultLocale: Locales.ENGLISH,
141
+ });
142
+ // 返回: { prefix: '/en', localePrefix: 'en' }
143
+
144
+ // prefix-no-default: 当语言环境与默认相同时不返回前缀
145
+ getPrefix(Locales.ENGLISH, {
146
+ mode: "prefix-no-default",
147
+ defaultLocale: Locales.ENGLISH,
148
+ });
149
+ // 返回: { prefix: '', localePrefix: undefined }
150
+
151
+ javascript;
152
+ // prefix-no-default: 当语言环境与默认语言不同,返回前缀
153
+ getPrefix(Locales.FRENCH, {
154
+ mode: "prefix-no-default",
155
+ defaultLocale: Locales.ENGLISH,
156
+ });
157
+ // 返回: { prefix: 'fr/', localePrefix: 'fr' }
158
+
159
+ // no-prefix 和 search-params: 从不返回前缀
160
+ getPrefix(Locales.ENGLISH, { mode: "no-prefix" });
161
+ // 返回: { prefix: '', localePrefix: undefined }
162
+
163
+ getPrefix(Locales.ENGLISH, { mode: "search-params" });
164
+ // 返回: { prefix: '', localePrefix: undefined }
165
+ ```
166
+
167
+ ### 实际示例
168
+
169
+ ```typescript
170
+ import { getPrefix, Locales } from "intlayer";
171
+
172
+ // 为特定语言环境构建带有适当前缀的 URL
173
+ const locale = Locales.FRENCH;
174
+ const { prefix, localePrefix } = getPrefix(locale, {
175
+ defaultLocale: Locales.ENGLISH,
176
+ mode: "prefix-no-default",
177
+ });
178
+
179
+ typescript;
180
+ // 使用 prefix 构建路径
181
+ const url1 = `/${prefix}about`.replace(/\/+/g, "/");
182
+ // 结果: "/fr/about"
183
+
184
+ // 使用 localePrefix 进行语言标识
185
+ console.log(`当前语言环境: ${localePrefix}`);
186
+ // 输出: "当前语言环境: fr"
187
+ ```
188
+
189
+ ---
190
+
191
+ ## 相关函数
192
+
193
+ - [`getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/intlayer/getLocalizedUrl.md): 为特定语言环境生成本地化 URL
194
+ - [`getMultilingualUrls`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/intlayer/getMultilingualUrls.md): 为所有配置的语言环境生成 URL
195
+
196
+ ---
197
+
198
+ ## TypeScript
199
+
200
+ ```typescript
201
+ type GetPrefixResult = {
202
+ prefix: string; // 带有尾部斜杠的路径前缀(例如 'fr/' 或 '')
203
+ localePrefix?: Locale; // 不带斜杠的语言标识符(例如 'fr' 或 undefined)
204
+ };
205
+
206
+ function getPrefix(
207
+ locale: Locales,
208
+ options?: {
209
+ defaultLocale?: Locales;
210
+ mode?: "prefix-no-default" | "prefix-all" | "no-prefix" | "search-params";
211
+ }
212
+ ): GetPrefixResult;
213
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/docs",
3
- "version": "7.2.3",
3
+ "version": "7.3.0-canary.0",
4
4
  "private": false,
5
5
  "description": "Intlayer documentation",
6
6
  "keywords": [
@@ -72,13 +72,13 @@
72
72
  "watch": "webpack --config ./webpack.config.ts --watch"
73
73
  },
74
74
  "dependencies": {
75
- "@intlayer/config": "7.2.3",
76
- "@intlayer/core": "7.2.3",
77
- "@intlayer/types": "7.2.3"
75
+ "@intlayer/config": "7.3.0-canary.0",
76
+ "@intlayer/core": "7.3.0-canary.0",
77
+ "@intlayer/types": "7.3.0-canary.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@intlayer/api": "7.2.3",
81
- "@intlayer/cli": "7.2.3",
80
+ "@intlayer/api": "7.3.0-canary.0",
81
+ "@intlayer/cli": "7.3.0-canary.0",
82
82
  "@types/node": "24.10.1",
83
83
  "@utils/ts-config": "1.0.4",
84
84
  "@utils/ts-config-types": "1.0.4",
@@ -88,7 +88,7 @@
88
88
  "tsdown": "0.16.6",
89
89
  "tsx": "^4.20.6",
90
90
  "typescript": "5.9.3",
91
- "vitest": "4.0.12"
91
+ "vitest": "4.0.13"
92
92
  },
93
93
  "engines": {
94
94
  "node": ">=14.18"
@@ -53,6 +53,25 @@ const readLocale = (
53
53
  };
54
54
 
55
55
  export const blogEntry = {
56
+ './blog/en/compiler_vs_declarative_i18n.md': {
57
+ en: readLocale('compiler_vs_declarative_i18n.md', 'en'),
58
+ ru: readLocale('compiler_vs_declarative_i18n.md', 'ru'),
59
+ ja: readLocale('compiler_vs_declarative_i18n.md', 'ja'),
60
+ fr: readLocale('compiler_vs_declarative_i18n.md', 'fr'),
61
+ ko: readLocale('compiler_vs_declarative_i18n.md', 'ko'),
62
+ zh: readLocale('compiler_vs_declarative_i18n.md', 'zh'),
63
+ es: readLocale('compiler_vs_declarative_i18n.md', 'es'),
64
+ de: readLocale('compiler_vs_declarative_i18n.md', 'de'),
65
+ ar: readLocale('compiler_vs_declarative_i18n.md', 'ar'),
66
+ it: readLocale('compiler_vs_declarative_i18n.md', 'it'),
67
+ 'en-GB': readLocale('compiler_vs_declarative_i18n.md', 'en-GB'),
68
+ pt: readLocale('compiler_vs_declarative_i18n.md', 'pt'),
69
+ hi: readLocale('compiler_vs_declarative_i18n.md', 'hi'),
70
+ tr: readLocale('compiler_vs_declarative_i18n.md', 'tr'),
71
+ pl: readLocale('compiler_vs_declarative_i18n.md', 'pl'),
72
+ id: readLocale('compiler_vs_declarative_i18n.md', 'id'),
73
+ vi: readLocale('compiler_vs_declarative_i18n.md', 'vi'),
74
+ } as unknown as Record<LocalesValues, Promise<string>>,
56
75
  './blog/en/i18n_using_next-i18next.md': {
57
76
  en: readLocale('i18n_using_next-i18next.md', 'en'),
58
77
  ru: readLocale('i18n_using_next-i18next.md', 'ru'),