@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-09
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: Tanstack Start i18n - Cómo traducir una aplicación Tanstack Start en 2026
5
5
  description: Aprende a añadir la internacionalización (i18n) a tu aplicación Tanstack Start utilizando Intlayer. Sigue esta guía completa para hacer que tu aplicación sea multilingüe con enrutamiento consciente de la configuración regional.
6
6
  keywords:
@@ -67,7 +67,7 @@ Con Intlayer, puedes:
67
67
  ## Guía paso a paso para configurar Intlayer en una aplicación Tanstack Start
68
68
 
69
69
  <Tabs defaultTab="video">
70
- <Tab label="Video" value="video">
70
+ <Tab label="Vídeo" value="video">
71
71
 
72
72
  <iframe title="¿La mejor solución i18n para Tanstack Start? Descubre 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/_XTdKVWaeqg?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
73
73
 
@@ -773,6 +773,164 @@ Asegúrate de que tu configuración de TypeScript incluya los tipos autogenerado
773
773
 
774
774
  ---
775
775
 
776
+ ### (Opcional) Paso 16 : Extraer el contenido de tus componentes
777
+
778
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
779
+
780
+ 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.
781
+
782
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
783
+
784
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
785
+ import { type IntlayerConfig } from "intlayer";
786
+
787
+ const config: IntlayerConfig = {
788
+ // ... Resto de tu configuración
789
+ compiler: {
790
+ /**
791
+ * Indica si el compilador debe estar habilitado.
792
+ */
793
+ enabled: true,
794
+
795
+ /**
796
+ * Define la ruta de los archivos de salida
797
+ */
798
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
799
+
800
+ /**
801
+ * 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.
802
+ */
803
+ saveComponents: false,
804
+
805
+ /**
806
+ * Prefijo de clave de diccionario
807
+ */
808
+ dictionaryKeyPrefix: "",
809
+ },
810
+ };
811
+
812
+ export default config;
813
+ ```
814
+
815
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
816
+ /** @type {import('intlayer').IntlayerConfig} */
817
+ const config = {
818
+ // ... Resto de tu configuración
819
+ compiler: {
820
+ /**
821
+ * Indica si el compilador debe estar habilitado.
822
+ */
823
+ enabled: true,
824
+
825
+ /**
826
+ * Define la ruta de los archivos de salida
827
+ */
828
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
829
+
830
+ /**
831
+ * 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.
832
+ */
833
+ saveComponents: false,
834
+
835
+ /**
836
+ * Prefijo de clave de diccionario
837
+ */
838
+ dictionaryKeyPrefix: "",
839
+ },
840
+ };
841
+
842
+ export default config;
843
+ ```
844
+
845
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
846
+ /** @type {import('intlayer').IntlayerConfig} */
847
+ const config = {
848
+ // ... Resto de tu configuración
849
+ compiler: {
850
+ /**
851
+ * Indica si el compilador debe estar habilitado.
852
+ */
853
+ enabled: true,
854
+
855
+ /**
856
+ * Define la ruta de los archivos de salida
857
+ */
858
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
859
+
860
+ /**
861
+ * 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.
862
+ */
863
+ saveComponents: false,
864
+
865
+ /**
866
+ * Prefijo de clave de diccionario
867
+ */
868
+ dictionaryKeyPrefix: "",
869
+ },
870
+ };
871
+
872
+ module.exports = config;
873
+ ```
874
+
875
+ <Tabs>
876
+ <Tab value='Comando de extracción'>
877
+
878
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
879
+
880
+ ```bash packageManager="npm"
881
+ npx intlayer extract
882
+ ```
883
+
884
+ ```bash packageManager="pnpm"
885
+ pnpm intlayer extract
886
+ ```
887
+
888
+ ```bash packageManager="yarn"
889
+ yarn intlayer extract
890
+ ```
891
+
892
+ ```bash packageManager="bun"
893
+ bunx intlayer extract
894
+ ```
895
+
896
+ </Tab>
897
+ <Tab value='Compilador Babel'>
898
+
899
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
900
+
901
+ ```ts fileName="vite.config.ts"
902
+ import { defineConfig } from "vite";
903
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
904
+
905
+ export default defineConfig({
906
+ plugins: [
907
+ intlayer(),
908
+ intlayerCompiler(), // Agrega el plugin del compilador
909
+ ],
910
+ });
911
+ ```
912
+
913
+ ```bash packageManager="npm"
914
+ npm run build # O npm run dev
915
+ ```
916
+
917
+ ```bash packageManager="pnpm"
918
+ pnpm run build # O pnpm run dev
919
+ ```
920
+
921
+ ```bash packageManager="yarn"
922
+ yarn build # O yarn dev
923
+ ```
924
+
925
+ ```bash packageManager="bun"
926
+ bun run build # Or bun run dev
927
+ ```
928
+
929
+ </Tab>
930
+ </Tabs>
931
+
932
+ ---
933
+
776
934
  ### Configuración de Git
777
935
 
778
936
  Se recomienda ignorar los archivos generados por Intlayer. Esto te permite evitar confirmarlos en tu repositorio de Git.
@@ -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 + Preact i18n - Cómo traducir una aplicación Preact en 2026
5
5
  description: Descubre cómo hacer tu sitio web con Vite y Preact multilingüe. Sigue la documentación para internacionalizar (i18n) y traducirlo.
6
6
  keywords:
@@ -24,12 +24,12 @@ history:
24
24
  changes: Historial inicial
25
25
  ---
26
26
 
27
- # Traduce tu Vite and Preact con Intlayer | Internacionalización (i18n)
27
+ # Traduce tu Vite y Preact con Intlayer | Internacionalización (i18n)
28
28
 
29
29
  <Tabs defaultTab="video">
30
- <Tab label="Video" value="video">
30
+ <Tab label="Vídeo" value="video">
31
31
 
32
- <iframe title="The best i18n solution for Vite and Preact? 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/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
32
+ <iframe title="The best i18n solution for Vite y Preact? 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/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
33
33
 
34
34
  </Tab>
35
35
  <Tab label="Code" value="code">
@@ -37,7 +37,7 @@ history:
37
37
  <iframe
38
38
  src="https://stackblitz.com/github/aymericzip/intlayer-vite-preact-template?embed=1&ctl=1&file=intlayer.config.ts"
39
39
  className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
40
- title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
40
+ title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
41
41
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
42
42
  loading="lazy"
43
43
  />
@@ -308,7 +308,7 @@ const appContent = {
308
308
  }),
309
309
 
310
310
  readTheDocs: t({
311
- en: "Click on the Vite and Preact logos to learn more",
311
+ en: "Click on the Vite y Preact logos to learn more",
312
312
  fr: "Cliquez sur les logos Vite et Preact pour en savoir plus",
313
313
  es: "Haz clic en los logotipos de Vite y Preact para obtener más información",
314
314
  }),
@@ -1301,6 +1301,162 @@ return (
1301
1301
  );
1302
1302
  ```
1303
1303
 
1304
+ ### (Opcional) Paso 12 : Extraer el contenido de tus componentes
1305
+
1306
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
1307
+
1308
+ 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.
1309
+
1310
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
1311
+
1312
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
1313
+ import { type IntlayerConfig } from "intlayer";
1314
+
1315
+ const config: IntlayerConfig = {
1316
+ // ... Resto de tu configuración
1317
+ compiler: {
1318
+ /**
1319
+ * Indica si el compilador debe estar habilitado.
1320
+ */
1321
+ enabled: true,
1322
+
1323
+ /**
1324
+ * Define la ruta de los archivos de salida
1325
+ */
1326
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1327
+
1328
+ /**
1329
+ * 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.
1330
+ */
1331
+ saveComponents: false,
1332
+
1333
+ /**
1334
+ * Prefijo de clave de diccionario
1335
+ */
1336
+ dictionaryKeyPrefix: "",
1337
+ },
1338
+ };
1339
+
1340
+ export default config;
1341
+ ```
1342
+
1343
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
1344
+ /** @type {import('intlayer').IntlayerConfig} */
1345
+ const config = {
1346
+ // ... Resto de tu configuración
1347
+ compiler: {
1348
+ /**
1349
+ * Indica si el compilador debe estar habilitado.
1350
+ */
1351
+ enabled: true,
1352
+
1353
+ /**
1354
+ * Define la ruta de los archivos de salida
1355
+ */
1356
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1357
+
1358
+ /**
1359
+ * 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.
1360
+ */
1361
+ saveComponents: false,
1362
+
1363
+ /**
1364
+ * Prefijo de clave de diccionario
1365
+ */
1366
+ dictionaryKeyPrefix: "",
1367
+ },
1368
+ };
1369
+
1370
+ export default config;
1371
+ ```
1372
+
1373
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
1374
+ /** @type {import('intlayer').IntlayerConfig} */
1375
+ const config = {
1376
+ // ... Resto de tu configuración
1377
+ compiler: {
1378
+ /**
1379
+ * Indica si el compilador debe estar habilitado.
1380
+ */
1381
+ enabled: true,
1382
+
1383
+ /**
1384
+ * Define la ruta de los archivos de salida
1385
+ */
1386
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1387
+
1388
+ /**
1389
+ * 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.
1390
+ */
1391
+ saveComponents: false,
1392
+
1393
+ /**
1394
+ * Prefijo de clave de diccionario
1395
+ */
1396
+ dictionaryKeyPrefix: "",
1397
+ },
1398
+ };
1399
+
1400
+ module.exports = config;
1401
+ ```
1402
+
1403
+ <Tabs>
1404
+ <Tab value='Comando de extracción'>
1405
+
1406
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
1407
+
1408
+ ```bash packageManager="npm"
1409
+ npx intlayer extract
1410
+ ```
1411
+
1412
+ ```bash packageManager="pnpm"
1413
+ pnpm intlayer extract
1414
+ ```
1415
+
1416
+ ```bash packageManager="yarn"
1417
+ yarn intlayer extract
1418
+ ```
1419
+
1420
+ ```bash packageManager="bun"
1421
+ bunx intlayer extract
1422
+ ```
1423
+
1424
+ </Tab>
1425
+ <Tab value='Compilador Babel'>
1426
+
1427
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
1428
+
1429
+ ```ts fileName="vite.config.ts"
1430
+ import { defineConfig } from "vite";
1431
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
1432
+
1433
+ export default defineConfig({
1434
+ plugins: [
1435
+ intlayer(),
1436
+ intlayerCompiler(), // Agrega el plugin del compilador
1437
+ ],
1438
+ });
1439
+ ```
1440
+
1441
+ ```bash packageManager="npm"
1442
+ npm run build # O npm run dev
1443
+ ```
1444
+
1445
+ ```bash packageManager="pnpm"
1446
+ pnpm run build # O pnpm run dev
1447
+ ```
1448
+
1449
+ ```bash packageManager="yarn"
1450
+ yarn build # O yarn dev
1451
+ ```
1452
+
1453
+ ```bash packageManager="bun"
1454
+ bun run build # Or bun run dev
1455
+ ```
1456
+
1457
+ </Tab>
1458
+ </Tabs>
1459
+
1304
1460
  ### Configurar TypeScript
1305
1461
 
1306
1462
  Intlayer utiliza la ampliación de módulos para aprovechar las ventajas de TypeScript y fortalecer su base de código.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-03-07
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-03-12
4
4
  title: Vite + React i18n - Cómo traducir una aplicación React en 2026
5
5
  description: Aprende cómo agregar internacionalización (i18n) a tu aplicación Vite y React usando Intlayer. Sigue esta guía para hacer tu aplicación multilingüe.
6
6
  keywords:
@@ -48,7 +48,7 @@ Con Intlayer, puedes:
48
48
  ## Guía paso a paso para configurar Intlayer en una aplicación Vite y React
49
49
 
50
50
  <Tabs defaultTab="video">
51
- <Tab label="Video" value="video">
51
+ <Tab label="Vídeo" value="video">
52
52
 
53
53
  <iframe title="The best i18n solution for Vite and React? 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/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
54
54
 
@@ -58,7 +58,7 @@ Con Intlayer, puedes:
58
58
  <iframe
59
59
  src="https://stackblitz.com/github/aymericzip/intlayer-vite-react-template?embed=1&ctl=1&file=intlayer.config.ts"
60
60
  className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
61
- title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
61
+ title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
62
62
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
63
63
  loading="lazy"
64
64
  />
@@ -1357,6 +1357,162 @@ Link.displayName = "Link";
1357
1357
 
1358
1358
  Al integrar este componente `Link` en toda su aplicación, mantiene una experiencia de usuario coherente y consciente del idioma, además de beneficiarse de una mejor SEO y usabilidad.
1359
1359
 
1360
+ ### (Opcional) Paso 11 : Extraer el contenido de tus componentes
1361
+
1362
+ Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
1363
+
1364
+ 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.
1365
+
1366
+ Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
1367
+
1368
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
1369
+ import { type IntlayerConfig } from "intlayer";
1370
+
1371
+ const config: IntlayerConfig = {
1372
+ // ... Resto de tu configuración
1373
+ compiler: {
1374
+ /**
1375
+ * Indica si el compilador debe estar habilitado.
1376
+ */
1377
+ enabled: true,
1378
+
1379
+ /**
1380
+ * Define la ruta de los archivos de salida
1381
+ */
1382
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1383
+
1384
+ /**
1385
+ * 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.
1386
+ */
1387
+ saveComponents: false,
1388
+
1389
+ /**
1390
+ * Prefijo de clave de diccionario
1391
+ */
1392
+ dictionaryKeyPrefix: "",
1393
+ },
1394
+ };
1395
+
1396
+ export default config;
1397
+ ```
1398
+
1399
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
1400
+ /** @type {import('intlayer').IntlayerConfig} */
1401
+ const config = {
1402
+ // ... Resto de tu configuración
1403
+ compiler: {
1404
+ /**
1405
+ * Indica si el compilador debe estar habilitado.
1406
+ */
1407
+ enabled: true,
1408
+
1409
+ /**
1410
+ * Define la ruta de los archivos de salida
1411
+ */
1412
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1413
+
1414
+ /**
1415
+ * 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.
1416
+ */
1417
+ saveComponents: false,
1418
+
1419
+ /**
1420
+ * Prefijo de clave de diccionario
1421
+ */
1422
+ dictionaryKeyPrefix: "",
1423
+ },
1424
+ };
1425
+
1426
+ export default config;
1427
+ ```
1428
+
1429
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
1430
+ /** @type {import('intlayer').IntlayerConfig} */
1431
+ const config = {
1432
+ // ... Resto de tu configuración
1433
+ compiler: {
1434
+ /**
1435
+ * Indica si el compilador debe estar habilitado.
1436
+ */
1437
+ enabled: true,
1438
+
1439
+ /**
1440
+ * Define la ruta de los archivos de salida
1441
+ */
1442
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
1443
+
1444
+ /**
1445
+ * 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.
1446
+ */
1447
+ saveComponents: false,
1448
+
1449
+ /**
1450
+ * Prefijo de clave de diccionario
1451
+ */
1452
+ dictionaryKeyPrefix: "",
1453
+ },
1454
+ };
1455
+
1456
+ module.exports = config;
1457
+ ```
1458
+
1459
+ <Tabs>
1460
+ <Tab value='Comando de extracción'>
1461
+
1462
+ Ejecuta el extractor para transformar tus componentes y extraer el contenido
1463
+
1464
+ ```bash packageManager="npm"
1465
+ npx intlayer extract
1466
+ ```
1467
+
1468
+ ```bash packageManager="pnpm"
1469
+ pnpm intlayer extract
1470
+ ```
1471
+
1472
+ ```bash packageManager="yarn"
1473
+ yarn intlayer extract
1474
+ ```
1475
+
1476
+ ```bash packageManager="bun"
1477
+ bunx intlayer extract
1478
+ ```
1479
+
1480
+ </Tab>
1481
+ <Tab value='Compilador Babel'>
1482
+
1483
+ Actualiza tu archivo `vite.config.ts` para incluir el plugin `intlayerCompiler` :
1484
+
1485
+ ```ts fileName="vite.config.ts"
1486
+ import { defineConfig } from "vite";
1487
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
1488
+
1489
+ export default defineConfig({
1490
+ plugins: [
1491
+ intlayer(),
1492
+ intlayerCompiler(), // Agrega el plugin del compilador
1493
+ ],
1494
+ });
1495
+ ```
1496
+
1497
+ ```bash packageManager="npm"
1498
+ npm run build # O npm run dev
1499
+ ```
1500
+
1501
+ ```bash packageManager="pnpm"
1502
+ pnpm run build # O pnpm run dev
1503
+ ```
1504
+
1505
+ ```bash packageManager="yarn"
1506
+ yarn build # O yarn dev
1507
+ ```
1508
+
1509
+ ```bash packageManager="bun"
1510
+ bun run build # Or bun run dev
1511
+ ```
1512
+
1513
+ </Tab>
1514
+ </Tabs>
1515
+
1360
1516
  ### Configurar TypeScript
1361
1517
 
1362
1518
  Intlayer utiliza la ampliación de módulos para aprovechar las ventajas de TypeScript y fortalecer su base de código.
@@ -1384,7 +1540,7 @@ Se recomienda ignorar los archivos generados por Intlayer. Esto te permite evita
1384
1540
  Para hacerlo, puedes agregar las siguientes instrucciones a tu archivo `.gitignore`:
1385
1541
 
1386
1542
  ```plaintext fileName=".gitignore"
1387
- # Ignore the files generated by Intlayer
1543
+ # Ignorar los archivos generados por Intlayer
1388
1544
  .intlayer
1389
1545
  ```
1390
1546