@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-09-04
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: React Router v7 i18n - Cómo traducir una aplicación React Router v7 en 2026
5
5
  description: Aprende cómo agregar internacionalización (i18n) a tu aplicación React Router v7 usando Intlayer. Sigue esta guía completa para hacer tu aplicación multilingüe con enrutamiento consciente del locale.
6
6
  keywords:
@@ -38,7 +38,7 @@ history:
38
38
 
39
39
  Esta guía demuestra cómo integrar **Intlayer** para una internacionalización fluida en proyectos con React Router v7, con enrutamiento consciente del locale, soporte para TypeScript y prácticas modernas de desarrollo.
40
40
 
41
- ## Table of Contents
41
+ ## Tabla de contenidos
42
42
 
43
43
  <TOC/>
44
44
 
@@ -101,7 +101,7 @@ bunx intlayer init
101
101
  ## Guía paso a paso para configurar Intlayer en una aplicación React Router v7 con rutas basadas en el sistema de archivos
102
102
 
103
103
  <Tabs defaultTab="video">
104
- <Tab label="Video" value="video">
104
+ <Tab label="Vídeo" value="video">
105
105
 
106
106
  <iframe title="How to translate an React Router v7 app using 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/dS9L7uJeak4?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
107
107
 
@@ -111,7 +111,7 @@ bunx intlayer init
111
111
  <iframe
112
112
  src="https://stackblitz.com/github/aymericzip/intlayer-react-router-v7-template?embed=1&ctl=1&file=intlayer.config.ts"
113
113
  className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
114
- title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
114
+ title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
115
115
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
116
116
  loading="lazy"
117
117
  />
@@ -507,6 +507,229 @@ export default function RootLayout() {
507
507
  }
508
508
  ```
509
509
 
510
+ ### (Opcional) Paso 12 : Extraer el contenido de tus componentes
511
+
512
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
513
+
514
+ Para facilitar este proceso, Intlayer propone un [compilador](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md) para transformar tus componentes y extraer el contenido.
515
+
516
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
517
+
518
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
519
+ import { type IntlayerConfig } from "intlayer";
520
+
521
+ const config: IntlayerConfig = {
522
+ // ... Resto de tu configuración
523
+ compiler: {
524
+ /**
525
+ * Indica si el compilador debe estar habilitado.
526
+ */
527
+ enabled: true,
528
+
529
+ /**
530
+ * Define la ruta de los archivos de salida
531
+ */
532
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
533
+
534
+ /**
535
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
536
+ */
537
+ saveComponents: false,
538
+
539
+ /**
540
+ * Prefijo de clave de diccionario
541
+ */
542
+ dictionaryKeyPrefix: "",
543
+ },
544
+ };
545
+
546
+ export default config;
547
+ ```
548
+
549
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
550
+ /** @type {import('intlayer').IntlayerConfig} */
551
+ const config = {
552
+ // ... Resto de tu configuración
553
+ compiler: {
554
+ /**
555
+ * Indica si el compilador debe estar habilitado.
556
+ */
557
+ enabled: true,
558
+
559
+ /**
560
+ * Define la ruta de los archivos de salida
561
+ */
562
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
563
+
564
+ /**
565
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
566
+ */
567
+ saveComponents: false,
568
+
569
+ /**
570
+ * Prefijo de clave de diccionario
571
+ */
572
+ dictionaryKeyPrefix: "",
573
+ },
574
+ };
575
+
576
+ export default config;
577
+ ```
578
+
579
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
580
+ /** @type {import('intlayer').IntlayerConfig} */
581
+ const config = {
582
+ // ... Resto de tu configuración
583
+ compiler: {
584
+ /**
585
+ * Indica si el compilador debe estar habilitado.
586
+ */
587
+ enabled: true,
588
+
589
+ /**
590
+ * Define la ruta de los archivos de salida
591
+ */
592
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
593
+
594
+ /**
595
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
596
+ */
597
+ saveComponents: false,
598
+
599
+ /**
600
+ * Prefijo de clave de diccionario
601
+ */
602
+ dictionaryKeyPrefix: "",
603
+ },
604
+ };
605
+
606
+ module.exports = config;
607
+ ```
608
+
609
+ <Tabs>
610
+ <Tab value='Comando de extracción'>
611
+
612
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
613
+
614
+ ```bash packageManager="npm"
615
+ npx intlayer extract
616
+ ```
617
+
618
+ ```bash packageManager="pnpm"
619
+ pnpm intlayer extract
620
+ ```
621
+
622
+ ```bash packageManager="yarn"
623
+ yarn intlayer extract
624
+ ```
625
+
626
+ ```bash packageManager="bun"
627
+ bunx intlayer extract
628
+ ```
629
+
630
+ </Tab>
631
+ <Tab value='Compilador Babel'>
632
+
633
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
634
+
635
+ ```ts fileName="vite.config.ts"
636
+ import { defineConfig } from "vite";
637
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
638
+
639
+ export default defineConfig({
640
+ plugins: [
641
+ intlayer(),
642
+ intlayerCompiler(), // Agrega el plugin del compilador
643
+ ],
644
+ });
645
+ ```
646
+
647
+ ```bash packageManager="npm"
648
+ npm run build # O npm run dev
649
+ ```
650
+
651
+ ```bash packageManager="pnpm"
652
+ pnpm run build # O pnpm run dev
653
+ ```
654
+
655
+ ```bash packageManager="yarn"
656
+ yarn build # O yarn dev
657
+ ```
658
+
659
+ ```bash packageManager="bun"
660
+ bun run build # Or bun run dev
661
+ ```
662
+
663
+ </Tab>
664
+ </Tabs>
665
+
666
+ ---
667
+
668
+ ## Configure TypeScript
669
+
670
+ Intlayer uses module augmentation to get benefits of TypeScript and make your codebase stronger.
671
+
672
+ Ensure your TypeScript configuration includes the autogenerated types:
673
+
674
+ ```json5 fileName="tsconfig.json"
675
+ {
676
+ // ... your existing configurations
677
+ include: [
678
+ // ... your existing includes
679
+ ".intlayer/**/*.ts", // Include the auto-generated types
680
+ ],
681
+ }
682
+ ```
683
+
684
+ ---
685
+
686
+ ## Git Configuration
687
+
688
+ It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
689
+
690
+ To do this, you can add the following instructions to your `.gitignore` file:
691
+
692
+ ```plaintext fileName=".gitignore"
693
+ # Ignorar los archivos generados por Intlayer
694
+ .intlayer
695
+ ```
696
+
697
+ ---
698
+
699
+ ## VS Code Extension
700
+
701
+ To improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.
702
+
703
+ [Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
704
+
705
+ This extension provides:
706
+
707
+ - **Autocompletion** for translation keys.
708
+ - **Real-time error detection** for missing translations.
709
+ - **Inline previews** of translated content.
710
+ - **Quick actions** to easily create and update translations.
711
+
712
+ For more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
713
+
714
+ ---
715
+
716
+ ## Go Further
717
+
718
+ To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md) or externalize your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md).
719
+
720
+ ---
721
+
722
+ ## Documentation References
723
+
724
+ - [Intlayer Documentation](https://intlayer.org)
725
+ - [React Router v7 Documentation](https://reactrouter.com/)
726
+ - [useIntlayer hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useIntlayer.md)
727
+ - [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useLocale.md)
728
+ - [Content Declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md)
729
+ - [Configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md)
730
+
731
+ This comprehensive guide provides everything you need to integrate Intlayer with React Router v7 for a fully internationalized application with locale-aware routing and TypeScript support.
732
+
510
733
  ### Paso 11: Añadir middleware (Opcional)
511
734
 
512
735
  También puedes usar el `intlayerProxy` para agregar enrutamiento del lado del servidor a tu aplicación. Este plugin detectará automáticamente la configuración regional actual basada en la URL y establecerá la cookie de configuración regional apropiada. Si no se especifica ninguna configuración regional, el plugin determinará la configuración regional más adecuada según las preferencias de idioma del navegador del usuario. Si no se detecta ninguna configuración regional, redirigirá a la configuración regional predeterminada.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-12-07
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: React Router v7 i18n - Cómo traducir una aplicación React Router v7 en 2026
5
5
  description: Aprende cómo agregar internacionalización (i18n) a tu aplicación React Router v7 usando Intlayer con enrutamiento basado en el sistema de archivos. Sigue esta guía completa para hacer tu aplicación multilingüe con enrutamiento consciente del locale.
6
6
  keywords:
@@ -36,7 +36,7 @@ Esta guía demuestra cómo integrar **Intlayer** para una internacionalización
36
36
 
37
37
  Para el enrutamiento del lado del cliente, consulte la guía [Intlayer con React Router v7](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/intlayer_with_react_router_v7.md).
38
38
 
39
- ## Table of Contents
39
+ ## Tabla de contenidos
40
40
 
41
41
  <TOC/>
42
42
 
@@ -57,7 +57,7 @@ Con Intlayer, puedes:
57
57
  ## Guía paso a paso para configurar Intlayer en una aplicación React Router v7 con rutas basadas en el sistema de archivos
58
58
 
59
59
  <Tabs defaultTab="video">
60
- <Tab label="Video" value="video">
60
+ <Tab label="Vídeo" value="video">
61
61
 
62
62
  <iframe title="How to translate an React Router v7 (File-System Routes) app using 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/dS9L7uJeak4?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
63
63
 
@@ -67,7 +67,7 @@ Con Intlayer, puedes:
67
67
  <iframe
68
68
  src="https://stackblitz.com/github/aymericzip/intlayer-react-router-v7-fs-routes-template?embed=1&ctl=1&file=intlayer.config.ts"
69
69
  className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
70
- title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
70
+ title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
71
71
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
72
72
  loading="lazy"
73
73
  />
@@ -576,6 +576,164 @@ export const useI18nHTMLAttributes = () => {
576
576
 
577
577
  Este hook ya se usa en el componente de layout (`root.tsx`) mostrado en el Paso 5.
578
578
 
579
+ ### (Opcional) Paso 11 : Extraer el contenido de tus componentes
580
+
581
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
582
+
583
+ Para facilitar este proceso, Intlayer propone un [compilador](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md) para transformar tus componentes y extraer el contenido.
584
+
585
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
586
+
587
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
588
+ import { type IntlayerConfig } from "intlayer";
589
+
590
+ const config: IntlayerConfig = {
591
+ // ... Resto de tu configuración
592
+ compiler: {
593
+ /**
594
+ * Indica si el compilador debe estar habilitado.
595
+ */
596
+ enabled: true,
597
+
598
+ /**
599
+ * Define la ruta de los archivos de salida
600
+ */
601
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
602
+
603
+ /**
604
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
605
+ */
606
+ saveComponents: false,
607
+
608
+ /**
609
+ * Prefijo de clave de diccionario
610
+ */
611
+ dictionaryKeyPrefix: "",
612
+ },
613
+ };
614
+
615
+ export default config;
616
+ ```
617
+
618
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
619
+ /** @type {import('intlayer').IntlayerConfig} */
620
+ const config = {
621
+ // ... Resto de tu configuración
622
+ compiler: {
623
+ /**
624
+ * Indica si el compilador debe estar habilitado.
625
+ */
626
+ enabled: true,
627
+
628
+ /**
629
+ * Define la ruta de los archivos de salida
630
+ */
631
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
632
+
633
+ /**
634
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
635
+ */
636
+ saveComponents: false,
637
+
638
+ /**
639
+ * Prefijo de clave de diccionario
640
+ */
641
+ dictionaryKeyPrefix: "",
642
+ },
643
+ };
644
+
645
+ export default config;
646
+ ```
647
+
648
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
649
+ /** @type {import('intlayer').IntlayerConfig} */
650
+ const config = {
651
+ // ... Resto de tu configuración
652
+ compiler: {
653
+ /**
654
+ * Indica si el compilador debe estar habilitado.
655
+ */
656
+ enabled: true,
657
+
658
+ /**
659
+ * Define la ruta de los archivos de salida
660
+ */
661
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
662
+
663
+ /**
664
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
665
+ */
666
+ saveComponents: false,
667
+
668
+ /**
669
+ * Prefijo de clave de diccionario
670
+ */
671
+ dictionaryKeyPrefix: "",
672
+ },
673
+ };
674
+
675
+ module.exports = config;
676
+ ```
677
+
678
+ <Tabs>
679
+ <Tab value='Comando de extracción'>
680
+
681
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
682
+
683
+ ```bash packageManager="npm"
684
+ npx intlayer extract
685
+ ```
686
+
687
+ ```bash packageManager="pnpm"
688
+ pnpm intlayer extract
689
+ ```
690
+
691
+ ```bash packageManager="yarn"
692
+ yarn intlayer extract
693
+ ```
694
+
695
+ ```bash packageManager="bun"
696
+ bunx intlayer extract
697
+ ```
698
+
699
+ </Tab>
700
+ <Tab value='Compilador Babel'>
701
+
702
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
703
+
704
+ ```ts fileName="vite.config.ts"
705
+ import { defineConfig } from "vite";
706
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
707
+
708
+ export default defineConfig({
709
+ plugins: [
710
+ intlayer(),
711
+ intlayerCompiler(), // Agrega el plugin del compilador
712
+ ],
713
+ });
714
+ ```
715
+
716
+ ```bash packageManager="npm"
717
+ npm run build # O npm run dev
718
+ ```
719
+
720
+ ```bash packageManager="pnpm"
721
+ pnpm run build # O pnpm run dev
722
+ ```
723
+
724
+ ```bash packageManager="yarn"
725
+ yarn build # O yarn dev
726
+ ```
727
+
728
+ ```bash packageManager="bun"
729
+ bun run build # Or bun run dev
730
+ ```
731
+
732
+ </Tab>
733
+ </Tabs>
734
+
735
+ ---
736
+
579
737
  ### Paso 10: Añadir middleware (Opcional)
580
738
 
581
739
  También puedes usar el `intlayerProxy` para agregar enrutamiento del lado del servidor a tu aplicación. Este plugin detectará automáticamente la configuración regional actual basada en la URL y establecerá la cookie de configuración regional apropiada. Si no se especifica ninguna configuración regional, el plugin determinará la configuración regional más adecuada según las preferencias de idioma del navegador del usuario. Si no se detecta ninguna configuración regional, redirigirá a la configuración regional predeterminada.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-11-20
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: SvelteKit i18n - Cómo traducir una aplicación SvelteKit en 2026
5
5
  description: Descubre cómo hacer que tu sitio web SvelteKit sea multilingüe. Sigue la documentación para internacionalizar (i18n) y traducir usando Server-Side Rendering (SSR).
6
6
  keywords:
@@ -185,7 +185,7 @@ Ahora puedes usar la función `useIntlayer` en cualquier componente Svelte. Esta
185
185
 
186
186
  > **Nota:** `useIntlayer` devuelve una tienda de Svelte, por lo que necesitas usar el prefijo `---
187
187
  > createdAt: 2025-11-20
188
- > updatedAt: 2025-11-20
188
+ > updatedAt: 2026-03-12
189
189
  > title: Cómo traducir tu aplicación SvelteKit – Guía i18n 2026
190
190
  > description: Descubre cómo hacer que tu sitio web SvelteKit sea multilingüe. Sigue la documentación para internacionalizar (i18n) y traducir usando Server-Side Rendering (SSR).
191
191
  > keywords:
@@ -733,6 +733,162 @@ Para poder visualizar el selector del editor intlayer, deberás usar la sintaxis
733
733
  </div>
734
734
  ```
735
735
 
736
+ ### (Opcional) Paso 12 : Extraer el contenido de tus componentes
737
+
738
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
739
+
740
+ Para facilitar este proceso, Intlayer propone un [compilador](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md) para transformar tus componentes y extraer el contenido.
741
+
742
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
743
+
744
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
745
+ import { type IntlayerConfig } from "intlayer";
746
+
747
+ const config: IntlayerConfig = {
748
+ // ... Resto de tu configuración
749
+ compiler: {
750
+ /**
751
+ * Indica si el compilador debe estar habilitado.
752
+ */
753
+ enabled: true,
754
+
755
+ /**
756
+ * Define la ruta de los archivos de salida
757
+ */
758
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
759
+
760
+ /**
761
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
762
+ */
763
+ saveComponents: false,
764
+
765
+ /**
766
+ * Prefijo de clave de diccionario
767
+ */
768
+ dictionaryKeyPrefix: "",
769
+ },
770
+ };
771
+
772
+ export default config;
773
+ ```
774
+
775
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
776
+ /** @type {import('intlayer').IntlayerConfig} */
777
+ const config = {
778
+ // ... Resto de tu configuración
779
+ compiler: {
780
+ /**
781
+ * Indica si el compilador debe estar habilitado.
782
+ */
783
+ enabled: true,
784
+
785
+ /**
786
+ * Define la ruta de los archivos de salida
787
+ */
788
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
789
+
790
+ /**
791
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
792
+ */
793
+ saveComponents: false,
794
+
795
+ /**
796
+ * Prefijo de clave de diccionario
797
+ */
798
+ dictionaryKeyPrefix: "",
799
+ },
800
+ };
801
+
802
+ export default config;
803
+ ```
804
+
805
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
806
+ /** @type {import('intlayer').IntlayerConfig} */
807
+ const config = {
808
+ // ... Resto de tu configuración
809
+ compiler: {
810
+ /**
811
+ * Indica si el compilador debe estar habilitado.
812
+ */
813
+ enabled: true,
814
+
815
+ /**
816
+ * Define la ruta de los archivos de salida
817
+ */
818
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
819
+
820
+ /**
821
+ * Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
822
+ */
823
+ saveComponents: false,
824
+
825
+ /**
826
+ * Prefijo de clave de diccionario
827
+ */
828
+ dictionaryKeyPrefix: "",
829
+ },
830
+ };
831
+
832
+ module.exports = config;
833
+ ```
834
+
835
+ <Tabs>
836
+ <Tab value='Comando de extracción'>
837
+
838
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
839
+
840
+ ```bash packageManager="npm"
841
+ npx intlayer extract
842
+ ```
843
+
844
+ ```bash packageManager="pnpm"
845
+ pnpm intlayer extract
846
+ ```
847
+
848
+ ```bash packageManager="yarn"
849
+ yarn intlayer extract
850
+ ```
851
+
852
+ ```bash packageManager="bun"
853
+ bunx intlayer extract
854
+ ```
855
+
856
+ </Tab>
857
+ <Tab value='Compilador Babel'>
858
+
859
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
860
+
861
+ ```ts fileName="vite.config.ts"
862
+ import { defineConfig } from "vite";
863
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
864
+
865
+ export default defineConfig({
866
+ plugins: [
867
+ intlayer(),
868
+ intlayerCompiler(), // Agrega el plugin del compilador
869
+ ],
870
+ });
871
+ ```
872
+
873
+ ```bash packageManager="npm"
874
+ npm run build # O npm run dev
875
+ ```
876
+
877
+ ```bash packageManager="pnpm"
878
+ pnpm run build # O pnpm run dev
879
+ ```
880
+
881
+ ```bash packageManager="yarn"
882
+ yarn build # O yarn dev
883
+ ```
884
+
885
+ ```bash packageManager="bun"
886
+ bun run build # Or bun run dev
887
+ ```
888
+
889
+ </Tab>
890
+ </Tabs>
891
+
736
892
  ### Configuración de Git
737
893
 
738
894
  Se recomienda ignorar los archivos generados por Intlayer.