@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.
- package/docs/ar/compiler.md +84 -49
- package/docs/ar/configuration.md +80 -37
- package/docs/ar/intlayer_with_nextjs_16.md +174 -1
- package/docs/ar/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ar/intlayer_with_react_router_v7.md +224 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ar/intlayer_with_svelte_kit.md +175 -2
- package/docs/ar/intlayer_with_tanstack.md +176 -1
- package/docs/ar/intlayer_with_vite+preact.md +174 -1
- package/docs/ar/intlayer_with_vite+react.md +174 -1
- package/docs/ar/intlayer_with_vite+solid.md +174 -1
- package/docs/ar/intlayer_with_vite+svelte.md +174 -1
- package/docs/ar/intlayer_with_vite+vue.md +174 -1
- package/docs/de/compiler.md +83 -48
- package/docs/de/configuration.md +434 -212
- package/docs/de/intlayer_with_nextjs_16.md +176 -1
- package/docs/de/intlayer_with_nextjs_compiler.md +106 -349
- package/docs/de/intlayer_with_react_router_v7.md +225 -2
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +221 -79
- package/docs/de/intlayer_with_svelte_kit.md +158 -2
- package/docs/de/intlayer_with_tanstack.md +159 -1
- package/docs/de/intlayer_with_vite+preact.md +157 -1
- package/docs/de/intlayer_with_vite+react.md +157 -1
- package/docs/de/intlayer_with_vite+solid.md +159 -3
- package/docs/de/intlayer_with_vite+svelte.md +157 -1
- package/docs/de/intlayer_with_vite+vue.md +157 -1
- package/docs/en/compiler.md +60 -33
- package/docs/en/configuration.md +80 -57
- package/docs/en/intlayer_with_nextjs_16.md +176 -0
- package/docs/en/intlayer_with_nextjs_compiler.md +179 -1
- package/docs/en/intlayer_with_react_router_v7.md +159 -0
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +159 -0
- package/docs/en/intlayer_with_svelte_kit.md +159 -0
- package/docs/en/intlayer_with_tanstack.md +160 -1
- package/docs/en/intlayer_with_vite+preact.md +159 -0
- package/docs/en/intlayer_with_vite+react.md +159 -0
- package/docs/en/intlayer_with_vite+solid.md +148 -27
- package/docs/en/intlayer_with_vite+svelte.md +159 -0
- package/docs/en/intlayer_with_vite+vue.md +142 -41
- package/docs/en-GB/compiler.md +66 -34
- package/docs/en-GB/configuration.md +78 -36
- package/docs/es/compiler.md +83 -48
- package/docs/es/configuration.md +429 -206
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_fastify.md +1 -1
- package/docs/es/intlayer_with_hono.md +1 -1
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_nextjs_16.md +176 -3
- package/docs/es/intlayer_with_nextjs_compiler.md +175 -2
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +227 -4
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +162 -4
- package/docs/es/intlayer_with_svelte_kit.md +158 -2
- package/docs/es/intlayer_with_tanstack.md +160 -2
- package/docs/es/intlayer_with_vite+preact.md +162 -6
- package/docs/es/intlayer_with_vite+react.md +160 -4
- package/docs/es/intlayer_with_vite+solid.md +163 -7
- package/docs/es/intlayer_with_vite+svelte.md +157 -1
- package/docs/es/intlayer_with_vite+vue.md +165 -9
- package/docs/fr/compiler.md +81 -46
- package/docs/fr/configuration.md +355 -134
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_fastify.md +1 -1
- package/docs/fr/intlayer_with_hono.md +1 -1
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_nextjs_16.md +183 -7
- package/docs/fr/intlayer_with_nextjs_compiler.md +179 -3
- package/docs/fr/intlayer_with_react_router_v7.md +229 -3
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +237 -6
- package/docs/fr/intlayer_with_svelte_kit.md +158 -2
- package/docs/fr/intlayer_with_tanstack.md +159 -1
- package/docs/fr/intlayer_with_vite+preact.md +164 -8
- package/docs/fr/intlayer_with_vite+react.md +162 -6
- package/docs/fr/intlayer_with_vite+solid.md +163 -7
- package/docs/fr/intlayer_with_vite+svelte.md +157 -1
- package/docs/fr/intlayer_with_vite+vue.md +164 -8
- package/docs/hi/compiler.md +81 -46
- package/docs/hi/configuration.md +87 -44
- package/docs/hi/intlayer_with_nextjs_16.md +174 -1
- package/docs/hi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/hi/intlayer_with_react_router_v7.md +224 -1
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/hi/intlayer_with_svelte_kit.md +158 -2
- package/docs/hi/intlayer_with_tanstack.md +159 -1
- package/docs/hi/intlayer_with_vite+preact.md +157 -1
- package/docs/hi/intlayer_with_vite+react.md +157 -1
- package/docs/hi/intlayer_with_vite+solid.md +157 -1
- package/docs/hi/intlayer_with_vite+svelte.md +157 -1
- package/docs/hi/intlayer_with_vite+vue.md +157 -1
- package/docs/id/compiler.md +84 -51
- package/docs/id/configuration.md +83 -45
- package/docs/id/intlayer_with_nextjs_16.md +174 -1
- package/docs/id/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/id/intlayer_with_react_router_v7.md +224 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/id/intlayer_with_svelte_kit.md +158 -2
- package/docs/id/intlayer_with_tanstack.md +159 -1
- package/docs/id/intlayer_with_vite+preact.md +157 -1
- package/docs/id/intlayer_with_vite+react.md +157 -1
- package/docs/id/intlayer_with_vite+solid.md +157 -1
- package/docs/id/intlayer_with_vite+svelte.md +157 -1
- package/docs/id/intlayer_with_vite+vue.md +157 -1
- package/docs/it/compiler.md +81 -46
- package/docs/it/configuration.md +426 -204
- package/docs/it/intlayer_with_nextjs_16.md +174 -1
- package/docs/it/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/it/intlayer_with_react_router_v7.md +225 -2
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/it/intlayer_with_svelte_kit.md +158 -2
- package/docs/it/intlayer_with_tanstack.md +159 -1
- package/docs/it/intlayer_with_vite+preact.md +157 -1
- package/docs/it/intlayer_with_vite+react.md +157 -1
- package/docs/it/intlayer_with_vite+solid.md +159 -3
- package/docs/it/intlayer_with_vite+svelte.md +157 -1
- package/docs/it/intlayer_with_vite+vue.md +157 -1
- package/docs/ja/compiler.md +94 -58
- package/docs/ja/configuration.md +88 -45
- package/docs/ja/intlayer_with_nextjs_16.md +174 -1
- package/docs/ja/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ja/intlayer_with_react_router_v7.md +184 -394
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ja/intlayer_with_svelte_kit.md +119 -595
- package/docs/ja/intlayer_with_tanstack.md +131 -642
- package/docs/ja/intlayer_with_vite+preact.md +111 -1231
- package/docs/ja/intlayer_with_vite+react.md +129 -1304
- package/docs/ja/intlayer_with_vite+solid.md +159 -3
- package/docs/ja/intlayer_with_vite+svelte.md +157 -1
- package/docs/ja/intlayer_with_vite+vue.md +157 -1
- package/docs/ko/compiler.md +88 -52
- package/docs/ko/configuration.md +87 -44
- package/docs/ko/intlayer_with_nextjs_16.md +174 -1
- package/docs/ko/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ko/intlayer_with_react_router_v7.md +225 -2
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ko/intlayer_with_svelte_kit.md +158 -2
- package/docs/ko/intlayer_with_tanstack.md +159 -1
- package/docs/ko/intlayer_with_vite+preact.md +157 -1
- package/docs/ko/intlayer_with_vite+react.md +157 -1
- package/docs/ko/intlayer_with_vite+solid.md +159 -3
- package/docs/ko/intlayer_with_vite+svelte.md +157 -1
- package/docs/ko/intlayer_with_vite+vue.md +157 -1
- package/docs/pl/compiler.md +84 -51
- package/docs/pl/configuration.md +83 -37
- package/docs/pl/intlayer_with_nextjs_16.md +174 -1
- package/docs/pl/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pl/intlayer_with_react_router_v7.md +224 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pl/intlayer_with_svelte_kit.md +158 -2
- package/docs/pl/intlayer_with_tanstack.md +159 -1
- package/docs/pl/intlayer_with_vite+preact.md +157 -1
- package/docs/pl/intlayer_with_vite+react.md +157 -1
- package/docs/pl/intlayer_with_vite+solid.md +157 -1
- package/docs/pl/intlayer_with_vite+svelte.md +157 -1
- package/docs/pl/intlayer_with_vite+vue.md +157 -1
- package/docs/pt/compiler.md +81 -46
- package/docs/pt/configuration.md +404 -194
- package/docs/pt/intlayer_with_nextjs_16.md +174 -1
- package/docs/pt/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pt/intlayer_with_react_router_v7.md +224 -1
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pt/intlayer_with_svelte_kit.md +158 -2
- package/docs/pt/intlayer_with_tanstack.md +159 -1
- package/docs/pt/intlayer_with_vite+preact.md +157 -1
- package/docs/pt/intlayer_with_vite+react.md +157 -1
- package/docs/pt/intlayer_with_vite+solid.md +157 -1
- package/docs/pt/intlayer_with_vite+svelte.md +157 -1
- package/docs/pt/intlayer_with_vite+vue.md +157 -1
- package/docs/ru/compiler.md +90 -57
- package/docs/ru/configuration.md +76 -46
- package/docs/ru/intlayer_with_nextjs_16.md +174 -1
- package/docs/ru/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ru/intlayer_with_react_router_v7.md +224 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ru/intlayer_with_svelte_kit.md +158 -2
- package/docs/ru/intlayer_with_tanstack.md +159 -1
- package/docs/ru/intlayer_with_vite+preact.md +157 -1
- package/docs/ru/intlayer_with_vite+react.md +157 -1
- package/docs/ru/intlayer_with_vite+solid.md +157 -1
- package/docs/ru/intlayer_with_vite+svelte.md +157 -1
- package/docs/ru/intlayer_with_vite+vue.md +157 -1
- package/docs/tr/compiler.md +85 -52
- package/docs/tr/configuration.md +83 -40
- package/docs/tr/intlayer_with_nextjs_16.md +174 -1
- package/docs/tr/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/tr/intlayer_with_react_router_v7.md +224 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/tr/intlayer_with_svelte_kit.md +158 -2
- package/docs/tr/intlayer_with_tanstack.md +159 -1
- package/docs/tr/intlayer_with_vite+preact.md +157 -1
- package/docs/tr/intlayer_with_vite+react.md +157 -1
- package/docs/tr/intlayer_with_vite+solid.md +157 -1
- package/docs/tr/intlayer_with_vite+svelte.md +157 -1
- package/docs/tr/intlayer_with_vite+vue.md +157 -1
- package/docs/uk/compiler.md +96 -61
- package/docs/uk/configuration.md +83 -37
- package/docs/uk/intlayer_with_nextjs_16.md +174 -1
- package/docs/uk/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/uk/intlayer_with_react_router_v7.md +224 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/uk/intlayer_with_svelte_kit.md +157 -1
- package/docs/uk/intlayer_with_tanstack.md +159 -1
- package/docs/uk/intlayer_with_vite+preact.md +157 -1
- package/docs/uk/intlayer_with_vite+react.md +157 -1
- package/docs/uk/intlayer_with_vite+solid.md +157 -1
- package/docs/uk/intlayer_with_vite+svelte.md +157 -1
- package/docs/uk/intlayer_with_vite+vue.md +157 -1
- package/docs/vi/compiler.md +85 -50
- package/docs/vi/configuration.md +85 -39
- package/docs/vi/intlayer_with_nextjs_16.md +174 -1
- package/docs/vi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/vi/intlayer_with_react_router_v7.md +224 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/vi/intlayer_with_svelte_kit.md +158 -2
- package/docs/vi/intlayer_with_tanstack.md +159 -1
- package/docs/vi/intlayer_with_vite+preact.md +157 -1
- package/docs/vi/intlayer_with_vite+react.md +157 -1
- package/docs/vi/intlayer_with_vite+solid.md +157 -1
- package/docs/vi/intlayer_with_vite+svelte.md +157 -1
- package/docs/vi/intlayer_with_vite+vue.md +157 -1
- package/docs/zh/compiler.md +84 -49
- package/docs/zh/configuration.md +80 -37
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_fastify.md +1 -1
- package/docs/zh/intlayer_with_hono.md +1 -1
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_nextjs_16.md +174 -1
- package/docs/zh/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/zh/intlayer_with_react_router_v7.md +227 -4
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +228 -4
- package/docs/zh/intlayer_with_svelte_kit.md +158 -2
- package/docs/zh/intlayer_with_tanstack.md +159 -1
- package/docs/zh/intlayer_with_vite+preact.md +159 -3
- package/docs/zh/intlayer_with_vite+react.md +157 -1
- package/docs/zh/intlayer_with_vite+solid.md +161 -5
- package/docs/zh/intlayer_with_vite+svelte.md +157 -1
- package/docs/zh/intlayer_with_vite+vue.md +158 -2
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-04
|
|
3
|
-
updatedAt:
|
|
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
|
-
##
|
|
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="
|
|
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&origin=http://intlayer.org&controls=0&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 -
|
|
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:
|
|
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
|
-
##
|
|
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="
|
|
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&origin=http://intlayer.org&controls=0&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 -
|
|
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:
|
|
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:
|
|
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.
|