@intlayer/docs 8.3.0-canary.4 → 8.3.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 (240) hide show
  1. package/docs/ar/compiler.md +84 -49
  2. package/docs/ar/configuration.md +80 -37
  3. package/docs/ar/intlayer_with_nextjs_16.md +174 -1
  4. package/docs/ar/intlayer_with_nextjs_compiler.md +174 -1
  5. package/docs/ar/intlayer_with_react_router_v7.md +224 -1
  6. package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +225 -1
  7. package/docs/ar/intlayer_with_svelte_kit.md +175 -2
  8. package/docs/ar/intlayer_with_tanstack.md +176 -1
  9. package/docs/ar/intlayer_with_vite+preact.md +174 -1
  10. package/docs/ar/intlayer_with_vite+react.md +174 -1
  11. package/docs/ar/intlayer_with_vite+solid.md +174 -1
  12. package/docs/ar/intlayer_with_vite+svelte.md +174 -1
  13. package/docs/ar/intlayer_with_vite+vue.md +174 -1
  14. package/docs/de/compiler.md +83 -48
  15. package/docs/de/configuration.md +434 -212
  16. package/docs/de/intlayer_with_nextjs_16.md +176 -1
  17. package/docs/de/intlayer_with_nextjs_compiler.md +106 -349
  18. package/docs/de/intlayer_with_react_router_v7.md +225 -2
  19. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +221 -79
  20. package/docs/de/intlayer_with_svelte_kit.md +158 -2
  21. package/docs/de/intlayer_with_tanstack.md +159 -1
  22. package/docs/de/intlayer_with_vite+preact.md +157 -1
  23. package/docs/de/intlayer_with_vite+react.md +157 -1
  24. package/docs/de/intlayer_with_vite+solid.md +159 -3
  25. package/docs/de/intlayer_with_vite+svelte.md +157 -1
  26. package/docs/de/intlayer_with_vite+vue.md +157 -1
  27. package/docs/en/compiler.md +60 -33
  28. package/docs/en/configuration.md +80 -57
  29. package/docs/en/intlayer_with_nextjs_16.md +176 -0
  30. package/docs/en/intlayer_with_nextjs_compiler.md +179 -1
  31. package/docs/en/intlayer_with_react_router_v7.md +159 -0
  32. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +159 -0
  33. package/docs/en/intlayer_with_svelte_kit.md +159 -0
  34. package/docs/en/intlayer_with_tanstack.md +160 -1
  35. package/docs/en/intlayer_with_vite+preact.md +159 -0
  36. package/docs/en/intlayer_with_vite+react.md +159 -0
  37. package/docs/en/intlayer_with_vite+solid.md +148 -27
  38. package/docs/en/intlayer_with_vite+svelte.md +159 -0
  39. package/docs/en/intlayer_with_vite+vue.md +142 -41
  40. package/docs/en-GB/compiler.md +66 -34
  41. package/docs/en-GB/configuration.md +78 -36
  42. package/docs/es/compiler.md +83 -48
  43. package/docs/es/configuration.md +429 -206
  44. package/docs/es/intlayer_with_adonisjs.md +1 -1
  45. package/docs/es/intlayer_with_express.md +1 -1
  46. package/docs/es/intlayer_with_fastify.md +1 -1
  47. package/docs/es/intlayer_with_hono.md +1 -1
  48. package/docs/es/intlayer_with_nestjs.md +1 -1
  49. package/docs/es/intlayer_with_nextjs_16.md +176 -3
  50. package/docs/es/intlayer_with_nextjs_compiler.md +175 -2
  51. package/docs/es/intlayer_with_nuxt.md +1 -1
  52. package/docs/es/intlayer_with_react_router_v7.md +227 -4
  53. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +162 -4
  54. package/docs/es/intlayer_with_svelte_kit.md +158 -2
  55. package/docs/es/intlayer_with_tanstack.md +160 -2
  56. package/docs/es/intlayer_with_vite+preact.md +162 -6
  57. package/docs/es/intlayer_with_vite+react.md +160 -4
  58. package/docs/es/intlayer_with_vite+solid.md +163 -7
  59. package/docs/es/intlayer_with_vite+svelte.md +157 -1
  60. package/docs/es/intlayer_with_vite+vue.md +165 -9
  61. package/docs/fr/compiler.md +81 -46
  62. package/docs/fr/configuration.md +355 -134
  63. package/docs/fr/intlayer_with_adonisjs.md +1 -1
  64. package/docs/fr/intlayer_with_express.md +1 -1
  65. package/docs/fr/intlayer_with_fastify.md +1 -1
  66. package/docs/fr/intlayer_with_hono.md +1 -1
  67. package/docs/fr/intlayer_with_nestjs.md +1 -1
  68. package/docs/fr/intlayer_with_nextjs_16.md +183 -7
  69. package/docs/fr/intlayer_with_nextjs_compiler.md +179 -3
  70. package/docs/fr/intlayer_with_react_router_v7.md +229 -3
  71. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +237 -6
  72. package/docs/fr/intlayer_with_svelte_kit.md +158 -2
  73. package/docs/fr/intlayer_with_tanstack.md +159 -1
  74. package/docs/fr/intlayer_with_vite+preact.md +164 -8
  75. package/docs/fr/intlayer_with_vite+react.md +162 -6
  76. package/docs/fr/intlayer_with_vite+solid.md +163 -7
  77. package/docs/fr/intlayer_with_vite+svelte.md +157 -1
  78. package/docs/fr/intlayer_with_vite+vue.md +164 -8
  79. package/docs/hi/compiler.md +81 -46
  80. package/docs/hi/configuration.md +87 -44
  81. package/docs/hi/intlayer_with_nextjs_16.md +174 -1
  82. package/docs/hi/intlayer_with_nextjs_compiler.md +174 -1
  83. package/docs/hi/intlayer_with_react_router_v7.md +224 -1
  84. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +225 -1
  85. package/docs/hi/intlayer_with_svelte_kit.md +158 -2
  86. package/docs/hi/intlayer_with_tanstack.md +159 -1
  87. package/docs/hi/intlayer_with_vite+preact.md +157 -1
  88. package/docs/hi/intlayer_with_vite+react.md +157 -1
  89. package/docs/hi/intlayer_with_vite+solid.md +157 -1
  90. package/docs/hi/intlayer_with_vite+svelte.md +157 -1
  91. package/docs/hi/intlayer_with_vite+vue.md +157 -1
  92. package/docs/id/compiler.md +84 -51
  93. package/docs/id/configuration.md +83 -45
  94. package/docs/id/intlayer_with_nextjs_16.md +174 -1
  95. package/docs/id/intlayer_with_nextjs_compiler.md +174 -1
  96. package/docs/id/intlayer_with_react_router_v7.md +224 -1
  97. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +225 -1
  98. package/docs/id/intlayer_with_svelte_kit.md +158 -2
  99. package/docs/id/intlayer_with_tanstack.md +159 -1
  100. package/docs/id/intlayer_with_vite+preact.md +157 -1
  101. package/docs/id/intlayer_with_vite+react.md +157 -1
  102. package/docs/id/intlayer_with_vite+solid.md +157 -1
  103. package/docs/id/intlayer_with_vite+svelte.md +157 -1
  104. package/docs/id/intlayer_with_vite+vue.md +157 -1
  105. package/docs/it/compiler.md +81 -46
  106. package/docs/it/configuration.md +426 -204
  107. package/docs/it/intlayer_with_nextjs_16.md +174 -1
  108. package/docs/it/intlayer_with_nextjs_compiler.md +174 -1
  109. package/docs/it/intlayer_with_react_router_v7.md +225 -2
  110. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +226 -2
  111. package/docs/it/intlayer_with_svelte_kit.md +158 -2
  112. package/docs/it/intlayer_with_tanstack.md +159 -1
  113. package/docs/it/intlayer_with_vite+preact.md +157 -1
  114. package/docs/it/intlayer_with_vite+react.md +157 -1
  115. package/docs/it/intlayer_with_vite+solid.md +159 -3
  116. package/docs/it/intlayer_with_vite+svelte.md +157 -1
  117. package/docs/it/intlayer_with_vite+vue.md +157 -1
  118. package/docs/ja/compiler.md +94 -58
  119. package/docs/ja/configuration.md +88 -45
  120. package/docs/ja/intlayer_with_nextjs_16.md +174 -1
  121. package/docs/ja/intlayer_with_nextjs_compiler.md +174 -1
  122. package/docs/ja/intlayer_with_react_router_v7.md +184 -394
  123. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +226 -2
  124. package/docs/ja/intlayer_with_svelte_kit.md +119 -595
  125. package/docs/ja/intlayer_with_tanstack.md +131 -642
  126. package/docs/ja/intlayer_with_vite+preact.md +111 -1231
  127. package/docs/ja/intlayer_with_vite+react.md +129 -1304
  128. package/docs/ja/intlayer_with_vite+solid.md +159 -3
  129. package/docs/ja/intlayer_with_vite+svelte.md +157 -1
  130. package/docs/ja/intlayer_with_vite+vue.md +157 -1
  131. package/docs/ko/compiler.md +88 -52
  132. package/docs/ko/configuration.md +87 -44
  133. package/docs/ko/intlayer_with_nextjs_16.md +174 -1
  134. package/docs/ko/intlayer_with_nextjs_compiler.md +174 -1
  135. package/docs/ko/intlayer_with_react_router_v7.md +225 -2
  136. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +226 -2
  137. package/docs/ko/intlayer_with_svelte_kit.md +158 -2
  138. package/docs/ko/intlayer_with_tanstack.md +159 -1
  139. package/docs/ko/intlayer_with_vite+preact.md +157 -1
  140. package/docs/ko/intlayer_with_vite+react.md +157 -1
  141. package/docs/ko/intlayer_with_vite+solid.md +159 -3
  142. package/docs/ko/intlayer_with_vite+svelte.md +157 -1
  143. package/docs/ko/intlayer_with_vite+vue.md +157 -1
  144. package/docs/pl/compiler.md +84 -51
  145. package/docs/pl/configuration.md +83 -37
  146. package/docs/pl/intlayer_with_nextjs_16.md +174 -1
  147. package/docs/pl/intlayer_with_nextjs_compiler.md +174 -1
  148. package/docs/pl/intlayer_with_react_router_v7.md +224 -1
  149. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +225 -1
  150. package/docs/pl/intlayer_with_svelte_kit.md +158 -2
  151. package/docs/pl/intlayer_with_tanstack.md +159 -1
  152. package/docs/pl/intlayer_with_vite+preact.md +157 -1
  153. package/docs/pl/intlayer_with_vite+react.md +157 -1
  154. package/docs/pl/intlayer_with_vite+solid.md +157 -1
  155. package/docs/pl/intlayer_with_vite+svelte.md +157 -1
  156. package/docs/pl/intlayer_with_vite+vue.md +157 -1
  157. package/docs/pt/compiler.md +81 -46
  158. package/docs/pt/configuration.md +404 -194
  159. package/docs/pt/intlayer_with_nextjs_16.md +174 -1
  160. package/docs/pt/intlayer_with_nextjs_compiler.md +174 -1
  161. package/docs/pt/intlayer_with_react_router_v7.md +224 -1
  162. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +225 -1
  163. package/docs/pt/intlayer_with_svelte_kit.md +158 -2
  164. package/docs/pt/intlayer_with_tanstack.md +159 -1
  165. package/docs/pt/intlayer_with_vite+preact.md +157 -1
  166. package/docs/pt/intlayer_with_vite+react.md +157 -1
  167. package/docs/pt/intlayer_with_vite+solid.md +157 -1
  168. package/docs/pt/intlayer_with_vite+svelte.md +157 -1
  169. package/docs/pt/intlayer_with_vite+vue.md +157 -1
  170. package/docs/ru/compiler.md +90 -57
  171. package/docs/ru/configuration.md +76 -46
  172. package/docs/ru/intlayer_with_nextjs_16.md +174 -1
  173. package/docs/ru/intlayer_with_nextjs_compiler.md +174 -1
  174. package/docs/ru/intlayer_with_react_router_v7.md +224 -1
  175. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +225 -1
  176. package/docs/ru/intlayer_with_svelte_kit.md +158 -2
  177. package/docs/ru/intlayer_with_tanstack.md +159 -1
  178. package/docs/ru/intlayer_with_vite+preact.md +157 -1
  179. package/docs/ru/intlayer_with_vite+react.md +157 -1
  180. package/docs/ru/intlayer_with_vite+solid.md +157 -1
  181. package/docs/ru/intlayer_with_vite+svelte.md +157 -1
  182. package/docs/ru/intlayer_with_vite+vue.md +157 -1
  183. package/docs/tr/compiler.md +85 -52
  184. package/docs/tr/configuration.md +83 -40
  185. package/docs/tr/intlayer_with_nextjs_16.md +174 -1
  186. package/docs/tr/intlayer_with_nextjs_compiler.md +174 -1
  187. package/docs/tr/intlayer_with_react_router_v7.md +224 -1
  188. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +225 -1
  189. package/docs/tr/intlayer_with_svelte_kit.md +158 -2
  190. package/docs/tr/intlayer_with_tanstack.md +159 -1
  191. package/docs/tr/intlayer_with_vite+preact.md +157 -1
  192. package/docs/tr/intlayer_with_vite+react.md +157 -1
  193. package/docs/tr/intlayer_with_vite+solid.md +157 -1
  194. package/docs/tr/intlayer_with_vite+svelte.md +157 -1
  195. package/docs/tr/intlayer_with_vite+vue.md +157 -1
  196. package/docs/uk/compiler.md +96 -61
  197. package/docs/uk/configuration.md +83 -37
  198. package/docs/uk/intlayer_with_nextjs_16.md +174 -1
  199. package/docs/uk/intlayer_with_nextjs_compiler.md +174 -1
  200. package/docs/uk/intlayer_with_react_router_v7.md +224 -1
  201. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +225 -1
  202. package/docs/uk/intlayer_with_svelte_kit.md +157 -1
  203. package/docs/uk/intlayer_with_tanstack.md +159 -1
  204. package/docs/uk/intlayer_with_vite+preact.md +157 -1
  205. package/docs/uk/intlayer_with_vite+react.md +157 -1
  206. package/docs/uk/intlayer_with_vite+solid.md +157 -1
  207. package/docs/uk/intlayer_with_vite+svelte.md +157 -1
  208. package/docs/uk/intlayer_with_vite+vue.md +157 -1
  209. package/docs/vi/compiler.md +85 -50
  210. package/docs/vi/configuration.md +85 -39
  211. package/docs/vi/intlayer_with_nextjs_16.md +174 -1
  212. package/docs/vi/intlayer_with_nextjs_compiler.md +174 -1
  213. package/docs/vi/intlayer_with_react_router_v7.md +224 -1
  214. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +225 -1
  215. package/docs/vi/intlayer_with_svelte_kit.md +158 -2
  216. package/docs/vi/intlayer_with_tanstack.md +159 -1
  217. package/docs/vi/intlayer_with_vite+preact.md +157 -1
  218. package/docs/vi/intlayer_with_vite+react.md +157 -1
  219. package/docs/vi/intlayer_with_vite+solid.md +157 -1
  220. package/docs/vi/intlayer_with_vite+svelte.md +157 -1
  221. package/docs/vi/intlayer_with_vite+vue.md +157 -1
  222. package/docs/zh/compiler.md +84 -49
  223. package/docs/zh/configuration.md +80 -37
  224. package/docs/zh/intlayer_with_adonisjs.md +1 -1
  225. package/docs/zh/intlayer_with_express.md +1 -1
  226. package/docs/zh/intlayer_with_fastify.md +1 -1
  227. package/docs/zh/intlayer_with_hono.md +1 -1
  228. package/docs/zh/intlayer_with_nestjs.md +1 -1
  229. package/docs/zh/intlayer_with_nextjs_16.md +174 -1
  230. package/docs/zh/intlayer_with_nextjs_compiler.md +174 -1
  231. package/docs/zh/intlayer_with_react_router_v7.md +227 -4
  232. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +228 -4
  233. package/docs/zh/intlayer_with_svelte_kit.md +158 -2
  234. package/docs/zh/intlayer_with_tanstack.md +159 -1
  235. package/docs/zh/intlayer_with_vite+preact.md +159 -3
  236. package/docs/zh/intlayer_with_vite+react.md +157 -1
  237. package/docs/zh/intlayer_with_vite+solid.md +161 -5
  238. package/docs/zh/intlayer_with_vite+svelte.md +157 -1
  239. package/docs/zh/intlayer_with_vite+vue.md +158 -2
  240. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-04-18
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: Vite + Vue i18n - Comment traduire une application Vue en 2026
5
5
  description: Découvrez comment rendre votre site Vite et Vue multilingue. Suivez la documentation pour internationaliser (i18n) et traduire votre site.
6
6
  keywords:
@@ -25,7 +25,7 @@ history:
25
25
  changes: Historique initial
26
26
  ---
27
27
 
28
- # Traduire votre Vite and Vue avec Intlayer | Internationalisation (i18n)
28
+ # Traduire votre Vite et Vue avec Intlayer | Internationalisation (i18n)
29
29
 
30
30
  ## Qu'est-ce que Intlayer ?
31
31
 
@@ -45,7 +45,7 @@ Avec Intlayer, vous pouvez :
45
45
  <Tabs defaultTab="video">
46
46
  <Tab label="Vidéo" value="video">
47
47
 
48
- <iframe title="The best i18n solution for Vite and Vue? Discover 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/IE3XWkZ6a5U?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
48
+ <iframe title="The best i18n solution for Vite et Vue? Discover 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/IE3XWkZ6a5U?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
49
49
 
50
50
  </Tab>
51
51
  <Tab label="Code" value="code">
@@ -53,7 +53,7 @@ Avec Intlayer, vous pouvez :
53
53
  <iframe
54
54
  src="https://stackblitz.com/github/aymericzip/intlayer-vite-vue-template?embed=1&ctl=1&file=intlayer.config.ts"
55
55
  className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
56
- title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
56
+ title="Démo CodeSandbox - Comment internationaliser votre application avec Intlayer"
57
57
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
58
58
  loading="lazy"
59
59
  />
@@ -237,7 +237,7 @@ const helloWorldContent = {
237
237
  es: "Vue Docs Scaling up Guide",
238
238
  }),
239
239
  readTheDocs: t({
240
- en: "Click on the Vite and Vue logos to learn more",
240
+ en: "Click on the Vite et Vue logos to learn more",
241
241
  fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
242
242
  es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
243
243
  }),
@@ -277,7 +277,7 @@ const helloWorldContent = {
277
277
  es: "Vue Docs Scaling up Guide",
278
278
  }),
279
279
  readTheDocs: t({
280
- en: "Click on the Vite and Vue logos to learn more",
280
+ en: "Click on the Vite et Vue logos to learn more",
281
281
  fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
282
282
  fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
283
283
  es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
@@ -318,7 +318,7 @@ const appContent = {
318
318
  es: "Vue Docs Scaling up Guide",
319
319
  }),
320
320
  readTheDocs: t({
321
- en: "Click on the Vite and Vue logos to learn more",
321
+ en: "Click on the Vite et Vue logos to learn more",
322
322
  fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
323
323
  es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
324
324
  }),
@@ -384,7 +384,7 @@ module.exports = appContent;
384
384
  "readTheDocs": {
385
385
  "nodeType": "translation",
386
386
  "translation": {
387
- "en": "Click on the Vite and Vue logos to learn more",
387
+ "en": "Click on the Vite et Vue logos to learn more",
388
388
  "fr": "Cliquez sur les logos Vite et Vue pour en savoir plus",
389
389
  "es": "Haga clic en los logotipos de Vite y Vue para obtener más información"
390
390
  }
@@ -1010,6 +1010,162 @@ const { myMarkdownContent } = useIntlayer("my-component");
1010
1010
  </script>
1011
1011
  ```
1012
1012
 
1013
+ ### (Optionnel) Étape 12 : Extraire le contenu de vos composants
1014
+
1015
+ Si vous avez une base de code existante, transformer des milliers de fichiers peut prendre beaucoup de temps.
1016
+
1017
+ Pour faciliter ce processus, Intlayer propose un [compilateur](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/compiler.md) / [extracteur](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/extract.md) pour transformer vos composants et extraire le contenu.
1018
+
1019
+ Pour le configurer, vous pouvez ajouter une section `compiler` dans votre fichier `intlayer.config.ts` :
1020
+
1021
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
1022
+ import { type IntlayerConfig } from "intlayer";
1023
+
1024
+ const config: IntlayerConfig = {
1025
+ // ... Reste de votre configuration
1026
+ compiler: {
1027
+ /**
1028
+ * Indique si le compilateur doit être activé.
1029
+ */
1030
+ enabled: true,
1031
+
1032
+ /**
1033
+ * Définit le chemin des fichiers de sortie
1034
+ */
1035
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1036
+
1037
+ /**
1038
+ * Indique si les composants doivent être sauvegardés après avoir été transformés. De cette façon, le compilateur peut être exécuté une seule fois pour transformer l'application, puis il peut être supprimé.
1039
+ */
1040
+ saveComponents: false,
1041
+
1042
+ /**
1043
+ * Préfixe de clé de dictionnaire
1044
+ */
1045
+ dictionaryKeyPrefix: "",
1046
+ },
1047
+ };
1048
+
1049
+ export default config;
1050
+ ```
1051
+
1052
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
1053
+ /** @type {import('intlayer').IntlayerConfig} */
1054
+ const config = {
1055
+ // ... Reste de votre configuration
1056
+ compiler: {
1057
+ /**
1058
+ * Indique si le compilateur doit être activé.
1059
+ */
1060
+ enabled: true,
1061
+
1062
+ /**
1063
+ * Définit le chemin des fichiers de sortie
1064
+ */
1065
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1066
+
1067
+ /**
1068
+ * Indique si les composants doivent être sauvegardés après avoir été transformés. De cette façon, le compilateur peut être exécuté une seule fois pour transformer l'application, puis il peut être supprimé.
1069
+ */
1070
+ saveComponents: false,
1071
+
1072
+ /**
1073
+ * Préfixe de clé de dictionnaire
1074
+ */
1075
+ dictionaryKeyPrefix: "",
1076
+ },
1077
+ };
1078
+
1079
+ export default config;
1080
+ ```
1081
+
1082
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
1083
+ /** @type {import('intlayer').IntlayerConfig} */
1084
+ const config = {
1085
+ // ... Reste de votre configuration
1086
+ compiler: {
1087
+ /**
1088
+ * Indique si le compilateur doit être activé.
1089
+ */
1090
+ enabled: true,
1091
+
1092
+ /**
1093
+ * Définit le chemin des fichiers de sortie
1094
+ */
1095
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1096
+
1097
+ /**
1098
+ * Indique si les composants doivent être sauvegardés après avoir été transformés. De cette façon, le compilateur peut être exécuté une seule fois pour transformer l'application, puis il peut être supprimé.
1099
+ */
1100
+ saveComponents: false,
1101
+
1102
+ /**
1103
+ * Préfixe de clé de dictionnaire
1104
+ */
1105
+ dictionaryKeyPrefix: "",
1106
+ },
1107
+ };
1108
+
1109
+ module.exports = config;
1110
+ ```
1111
+
1112
+ <Tabs>
1113
+ <Tab value='Commande d'extraction'>
1114
+
1115
+ Exécutez l'extracteur pour transformer vos composants et extraire le contenu
1116
+
1117
+ ```bash packageManager="npm"
1118
+ npx intlayer extract
1119
+ ```
1120
+
1121
+ ```bash packageManager="pnpm"
1122
+ pnpm intlayer extract
1123
+ ```
1124
+
1125
+ ```bash packageManager="yarn"
1126
+ yarn intlayer extract
1127
+ ```
1128
+
1129
+ ```bash packageManager="bun"
1130
+ bunx intlayer extract
1131
+ ```
1132
+
1133
+ </Tab>
1134
+ <Tab value='Compilateur Babel'>
1135
+
1136
+ Mettez à jour votre fichier `vite.config.ts` pour inclure le plugin `intlayerCompiler` :
1137
+
1138
+ ```ts fileName="vite.config.ts"
1139
+ import { defineConfig } from "vite";
1140
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
1141
+
1142
+ export default defineConfig({
1143
+ plugins: [
1144
+ intlayer(),
1145
+ intlayerCompiler(), // Ajoute le plugin du compilateur
1146
+ ],
1147
+ });
1148
+ ```
1149
+
1150
+ ```bash packageManager="npm"
1151
+ npm run build # Ou npm run dev
1152
+ ```
1153
+
1154
+ ```bash packageManager="pnpm"
1155
+ pnpm run build # Ou pnpm run dev
1156
+ ```
1157
+
1158
+ ```bash packageManager="yarn"
1159
+ yarn build # Ou yarn dev
1160
+ ```
1161
+
1162
+ ```bash packageManager="bun"
1163
+ bun run build # Or bun run dev
1164
+ ```
1165
+
1166
+ </Tab>
1167
+ </Tabs>
1168
+
1013
1169
  ### Configurer TypeScript
1014
1170
 
1015
1171
  Intlayer utilise l'augmentation de module pour tirer parti de TypeScript et renforcer votre base de code.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-09-09
3
- updatedAt: 2026-03-10
3
+ updatedAt: 2026-03-12
4
4
  title: Intlayer Compiler | i18n के लिए स्वचालित सामग्री निष्कर्षण
5
5
  description: Intlayer Compiler के साथ अपने अंतरराष्ट्रीयकरण प्रक्रिया को स्वचालित करें। Vite, Next.js, और अन्य में तेज़, अधिक कुशल i18n के लिए सीधे अपने कंपोनेंट्स से सामग्री निकालें।
6
6
  keywords:
@@ -149,73 +149,85 @@ module.exports = {
149
149
  See complete tutorial: [Intlayer Compiler with Next.js](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_compiler.md)
150
150
 
151
151
  </Tab>
152
+ </Tabs>
152
153
 
153
154
  ### कस्टम कॉन्फ़िगरेशन
154
155
 
155
156
  कंपाइलर व्यवहार को अनुकूलित करने के लिए, आप अपने प्रोजेक्ट के रूट में `intlayer.config.ts` फ़ाइल को अपडेट कर सकते हैं।
156
157
 
157
- ```ts fileName="intlayer.config.ts"
158
+ ````ts fileName="intlayer.config.ts"
158
159
  import { type IntlayerConfig, Locales } from "intlayer";
159
160
 
160
161
  const config: IntlayerConfig = {
161
162
  compiler: {
162
163
  /**
164
+ * इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
163
165
  * विकास के दौरान कंपाइलर को छोड़ने और स्टार्टअप समय को तेज करने के लिए 'build-only' पर सेट करें।
164
166
  */
165
167
  enabled: true,
166
168
 
167
169
  /**
168
- * Pattern to traverse the code to optimize.
170
+ * आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है।
171
+ *
172
+ * - `./` पथ घटक निर्देशिका के सापेक्ष हल किए जाते हैं।
173
+ * - `/` पथ प्रोजेक्ट रूट (`baseDir`) के सापेक्ष हल किए जाते हैं।
174
+ *
175
+ * - पथ में `{{locale}}` चर डालने से भाषा द्वारा अलग किए गए शब्दकोश निर्माण सक्षम हो जाएंगे।
176
+ *
177
+ * उदाहरण:
178
+ * ```ts
179
+ * {
180
+ * // घटक के बगल में बहुभाषी .content.ts फ़ाइलें बनाएँ
181
+ * output: ({ fileName, extension }) => `./${fileName}${extension}`,
182
+ *
183
+ * // output: './{{fileName}}{{extension}}', // स्ट्रिंग टेम्प्लेट का उपयोग करके समकक्ष
184
+ * }
185
+ * ```
186
+ *
187
+ * ```ts
188
+ * {
189
+ * // प्रोजेक्ट रूट पर भाषा द्वारा केंद्रीकृत JSON फ़ाइलें बनाएँ
190
+ * output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
191
+ *
192
+ * // output: '/locales/{{locale}}/{{key}}.content.json', // स्ट्रिंग टेम्प्लेट का उपयोग करके समकक्ष
193
+ * }
194
+ * ```
195
+ *
196
+ * चर सूची:
197
+ * - `fileName`: फ़ाइल का नाम।
198
+ * - `key`: सामग्री की कुंजी।
199
+ * - `locale`: सामग्री का स्थानीय मान (लोकल)।
200
+ * - `extension`: फ़ाइल एक्सटेंशन।
201
+ * - `componentFileName`: घटक फ़ाइल का नाम।
202
+ * - `componentExtension`: घटक फ़ाइल एक्सटेंशन।
203
+ * - `format`: शब्दकोश प्रारूप।
204
+ * - `componentFormat`: घटक शब्दकोश प्रारूप।
205
+ * - `componentDirPath`: घटक निर्देशिका पथ।
169
206
  */
170
- transformPattern: [
171
- "**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
172
- "!**/node_modules/**",
173
- ],
207
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
174
208
 
175
209
  /**
176
- * Pattern to exclude from the optimization.
177
- */
178
- excludePattern: ["**/node_modules/**"],
179
-
180
- /**
181
- * अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
210
+ * इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
211
+ * इस तरह, कंपाइलर को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
182
212
  */
183
- output: ({ key }) => `compiler/${key}.content.json`,
213
+ saveComponents: false,
184
214
 
185
215
  /**
186
- * उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
216
+ * उत्पन्न फ़ाइल में केवल सामग्री डालें। i18next या ICU MessageFormat JSON आउटपुट प्रति लोकल के लिए उपयोगी।
217
+ *
218
+ * - `output: ({ locale, key }) => `./locale/${locale}/${key}.json`,`
187
219
  */
188
220
  noMetadata: false,
189
221
 
190
222
  /**
191
223
  * शब्दकोश कुंजी उपसर्ग
192
224
  */
193
- dictionaryKeyPrefix: "", // Remove base prefix
194
-
195
- /**
196
- * इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
197
- * इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
198
- */
199
- saveComponents: false,
225
+ dictionaryKeyPrefix: "", // निकाली गई शब्दकोश कुंजियों के लिए वैकल्पिक उपसर्ग जोड़ें
200
226
  },
201
227
  };
202
228
 
203
229
  export default config;
204
- ```
205
-
206
- ### लापता अनुवाद भरें
207
-
208
- Intlayer अनुवादों को भरने में आपकी सहायता के लिए एक CLI टूल प्रदान करता है। आप अपने कोड से लापता अनुवादों का परीक्षण करने और उन्हें भरने के लिए `intlayer` कमांड का उपयोग कर सकते हैं।
209
-
210
- ```bash
211
- npx intlayer test # परीक्षण करें कि क्या कोई अनुवाद लापता है
212
- ```
213
-
214
- ```bash
215
- npx intlayer fill # लापता अनुवाद भरें
216
- ```
217
-
218
- > अधिक विवरण के लिए, [CLI दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/ci.md) देखें।
230
+ ````
219
231
 
220
232
  ### कंपाइलर कॉन्फ़िगरेशन संदर्भ
221
233
 
@@ -225,36 +237,37 @@ npx intlayer fill # लापता अनुवाद भरें
225
237
  - _प्रकार_: `boolean | 'build-only'`
226
238
  - _डिफ़ॉल्ट_: `true`
227
239
  - _विवरण_: इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
240
+
228
241
  - **dictionaryKeyPrefix**:
229
242
  - _प्रकार_: `string`
230
- - _डिफ़ॉल्ट_: `'comp-'`
243
+ - _डिफ़ॉल्ट_: `''`
231
244
  - _विवरण_: निकाली गई शब्दकोश कुंजियों के लिए उपसर्ग।
245
+
232
246
  - **transformPattern**:
233
247
  - _प्रकार_: `string | string[]`
234
248
  - _डिफ़ॉल्ट_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
235
- - _विवरण_: ऑप्टिमाइज़ करने के लिए कोड को पार करने के पैटर्न।
249
+ - _विवरण_: (पुराना (Deprecated): इसके बजाय `build.traversePattern` का उपयोग करें) ऑप्टिमाइज़ करने के लिए कोड को पार करने के पैटर्न।
250
+
236
251
  - **excludePattern**:
237
252
  - _प्रकार_: `string | string[]`
238
253
  - _डिफ़ॉल्ट_: `['**/node_modules/**']`
239
- - _विवरण_: ऑप्टिमाइज़ेशन से बाहर रखने के पैटर्न।
240
- - **outputDir** (Deprecated):
241
- - _प्रकार_: `string`
242
- - _डिफ़ॉल्ट_: `'compiler'`
243
- - _विवरण_: वह निर्देशिका जहाँ निकाली गई शब्दकोश सामग्री संग्रहीत की जाएगी।
254
+ - _विवरण_: (पुराना (Deprecated): इसके बजाय `build.traversePattern` का उपयोग करें) ऑप्टिमाइज़ेशन से बाहर रखने के पैटर्न।
244
255
 
245
256
  - **output**:
246
257
  - _प्रकार_: `FilePathPattern`
247
258
  - _डिफ़ॉल्ट_: `({ key }) => 'compiler/${key}.content.json'`
248
259
  - _विवरण_: आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है। `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, और `{{componentFormat}}` जैसे गतिशील चरों को संभालता है। इसे `'my/{{var}}/path'` प्रारूप का उपयोग करके एक स्ट्रिंग के रूप में, या एक फ़ंक्शन के रूप में सेट किया जा सकता है।
249
260
  - _नोट_: `./**/*` पथ घटक के सापेक्ष हल किए जाते हैं। `/**/*` पथ Intlayer `baseDir` के सापेक्ष हल किए जाते हैं।
261
+ - _नोट_: यदि पथ में लोकेल (locale) परिभाषित है, तो शब्दकोश लोकेल द्वारा उत्पन्न किए जाएंगे।
250
262
  - _उदाहरण_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
251
263
 
252
264
  - **noMetadata**:
253
265
  - _प्रकार_: `boolean`
254
266
  - _डिफ़ॉल्ट_: `false`
255
- - _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा।
267
+ - _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा। प्रति-लोकल i18next या ICU MessageFormat JSON आउटपुट के लिए उपयोगी।
256
268
  - _नोट_: `loadJSON` प्लगइन के साथ उपयोग किए जाने पर उपयोगी।
257
- - _उदाहरण_: यदि `सही` है:
269
+ - _उदाहरण_:
270
+ यदि `सही` है:
258
271
  ```json
259
272
  {
260
273
  "key": "value"
@@ -274,3 +287,25 @@ npx intlayer fill # लापता अनुवाद भरें
274
287
  - _प्रकार_: `boolean`
275
288
  - _डिफ़ॉल्ट_: `false`
276
289
  - _विवरण_: इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
290
+
291
+ ### लापता अनुवाद भरें
292
+
293
+ Intlayer अनुवादों को भरने में आपकी सहायता के लिए एक CLI टूल प्रदान करता है। आप अपने कोड से लापता अनुवादों का परीक्षण करने और उन्हें भरने के लिए `intlayer` कमांड का उपयोग कर सकते हैं।
294
+
295
+ ```bash
296
+ npx intlayer test # परीक्षण करें कि क्या कोई अनुवाद लापता है
297
+ ```
298
+
299
+ ```bash
300
+ npx intlayer fill # लापता अनुवाद भरें
301
+ ```
302
+
303
+ ### निष्कर्षण
304
+
305
+ Intlayer आपके कोड से सामग्री निकालने के लिए एक CLI टूल प्रदान करता है। आप अपने कोड से सामग्री निकालने के लिए `intlayer extract` कमांड का उपयोग कर सकते हैं।
306
+
307
+ ```bash
308
+ npx intlayer extract
309
+ ```
310
+
311
+ > अधिक विवरण के लिए, [CLI दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/index.md) देखें।