@intlayer/docs 7.0.4-canary.0 → 7.0.4

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 (107) hide show
  1. package/blog/ar/intlayer_with_i18next.md +68 -106
  2. package/blog/ar/intlayer_with_next-i18next.md +84 -288
  3. package/blog/ar/intlayer_with_next-intl.md +58 -337
  4. package/blog/ar/intlayer_with_react-i18next.md +68 -290
  5. package/blog/ar/intlayer_with_react-intl.md +63 -266
  6. package/blog/de/intlayer_with_i18next.md +77 -97
  7. package/blog/de/intlayer_with_next-i18next.md +69 -296
  8. package/blog/de/intlayer_with_next-intl.md +59 -340
  9. package/blog/de/intlayer_with_react-i18next.md +68 -290
  10. package/blog/de/intlayer_with_react-intl.md +62 -264
  11. package/blog/en/intlayer_with_i18next.md +36 -1638
  12. package/blog/en/intlayer_with_next-i18next.md +22 -847
  13. package/blog/en/intlayer_with_next-intl.md +32 -1053
  14. package/blog/en/intlayer_with_react-i18next.md +38 -764
  15. package/blog/en/intlayer_with_react-intl.md +42 -1018
  16. package/blog/en-GB/intlayer_with_i18next.md +67 -103
  17. package/blog/en-GB/intlayer_with_next-i18next.md +71 -292
  18. package/blog/en-GB/intlayer_with_next-intl.md +58 -337
  19. package/blog/en-GB/intlayer_with_react-i18next.md +67 -289
  20. package/blog/en-GB/intlayer_with_react-intl.md +61 -264
  21. package/blog/es/intlayer_with_i18next.md +67 -103
  22. package/blog/es/intlayer_with_next-i18next.md +71 -296
  23. package/blog/es/intlayer_with_next-intl.md +57 -338
  24. package/blog/es/intlayer_with_react-i18next.md +68 -290
  25. package/blog/es/intlayer_with_react-intl.md +62 -265
  26. package/blog/fr/intlayer_with_i18next.md +66 -104
  27. package/blog/fr/intlayer_with_next-i18next.md +82 -285
  28. package/blog/fr/intlayer_with_next-intl.md +57 -338
  29. package/blog/fr/intlayer_with_react-i18next.md +67 -289
  30. package/blog/fr/intlayer_with_react-intl.md +61 -264
  31. package/blog/hi/intlayer_with_i18next.md +68 -104
  32. package/blog/hi/intlayer_with_next-i18next.md +74 -299
  33. package/blog/hi/intlayer_with_next-intl.md +57 -239
  34. package/blog/hi/intlayer_with_react-i18next.md +69 -291
  35. package/blog/hi/intlayer_with_react-intl.md +65 -268
  36. package/blog/id/intlayer_with_i18next.md +126 -0
  37. package/blog/id/intlayer_with_next-i18next.md +142 -0
  38. package/blog/id/intlayer_with_next-intl.md +113 -0
  39. package/blog/id/intlayer_with_react-i18next.md +124 -0
  40. package/blog/id/intlayer_with_react-intl.md +122 -0
  41. package/blog/it/intlayer_with_i18next.md +67 -103
  42. package/blog/it/intlayer_with_next-i18next.md +71 -296
  43. package/blog/it/intlayer_with_next-intl.md +57 -338
  44. package/blog/it/intlayer_with_react-i18next.md +68 -290
  45. package/blog/it/intlayer_with_react-intl.md +62 -265
  46. package/blog/ja/intlayer_with_i18next.md +68 -103
  47. package/blog/ja/intlayer_with_next-i18next.md +85 -283
  48. package/blog/ja/intlayer_with_next-intl.md +58 -336
  49. package/blog/ja/intlayer_with_react-i18next.md +68 -290
  50. package/blog/ja/intlayer_with_react-intl.md +62 -264
  51. package/blog/ko/intlayer_with_i18next.md +80 -96
  52. package/blog/ko/intlayer_with_next-i18next.md +85 -287
  53. package/blog/ko/intlayer_with_next-intl.md +68 -327
  54. package/blog/ko/intlayer_with_react-i18next.md +68 -290
  55. package/blog/ko/intlayer_with_react-intl.md +64 -266
  56. package/blog/pl/intlayer_with_i18next.md +126 -0
  57. package/blog/pl/intlayer_with_next-i18next.md +142 -0
  58. package/blog/pl/intlayer_with_next-intl.md +111 -0
  59. package/blog/pl/intlayer_with_react-i18next.md +124 -0
  60. package/blog/pl/intlayer_with_react-intl.md +122 -0
  61. package/blog/pt/intlayer_with_i18next.md +67 -103
  62. package/blog/pt/intlayer_with_next-i18next.md +72 -293
  63. package/blog/pt/intlayer_with_next-intl.md +57 -256
  64. package/blog/pt/intlayer_with_react-i18next.md +104 -78
  65. package/blog/pt/intlayer_with_react-intl.md +62 -266
  66. package/blog/ru/intlayer_with_i18next.md +66 -104
  67. package/blog/ru/intlayer_with_next-i18next.md +71 -296
  68. package/blog/ru/intlayer_with_next-intl.md +58 -337
  69. package/blog/ru/intlayer_with_react-i18next.md +68 -290
  70. package/blog/ru/intlayer_with_react-intl.md +62 -265
  71. package/blog/tr/intlayer_with_i18next.md +71 -107
  72. package/blog/tr/intlayer_with_next-i18next.md +72 -297
  73. package/blog/tr/intlayer_with_next-intl.md +58 -339
  74. package/blog/tr/intlayer_with_react-i18next.md +69 -291
  75. package/blog/tr/intlayer_with_react-intl.md +63 -285
  76. package/blog/vi/intlayer_with_i18next.md +126 -0
  77. package/blog/vi/intlayer_with_next-i18next.md +142 -0
  78. package/blog/vi/intlayer_with_next-intl.md +111 -0
  79. package/blog/vi/intlayer_with_react-i18next.md +124 -0
  80. package/blog/vi/intlayer_with_react-intl.md +122 -0
  81. package/blog/zh/intlayer_with_i18next.md +67 -102
  82. package/blog/zh/intlayer_with_next-i18next.md +72 -296
  83. package/blog/zh/intlayer_with_next-intl.md +58 -336
  84. package/blog/zh/intlayer_with_react-i18next.md +68 -290
  85. package/blog/zh/intlayer_with_react-intl.md +63 -106
  86. package/docs/ar/plugins/sync-json.md +244 -0
  87. package/docs/de/plugins/sync-json.md +244 -0
  88. package/docs/en/intlayer_cli.md +25 -0
  89. package/docs/en/intlayer_with_nextjs_14.md +2 -0
  90. package/docs/en/intlayer_with_nextjs_15.md +2 -0
  91. package/docs/en/intlayer_with_nextjs_16.md +2 -0
  92. package/docs/en/plugins/sync-json.md +1 -1
  93. package/docs/en-GB/plugins/sync-json.md +244 -0
  94. package/docs/es/plugins/sync-json.md +244 -0
  95. package/docs/fr/plugins/sync-json.md +244 -0
  96. package/docs/hi/plugins/sync-json.md +244 -0
  97. package/docs/id/plugins/sync-json.md +244 -0
  98. package/docs/it/plugins/sync-json.md +244 -0
  99. package/docs/ja/plugins/sync-json.md +244 -0
  100. package/docs/ko/plugins/sync-json.md +244 -0
  101. package/docs/pl/plugins/sync-json.md +244 -0
  102. package/docs/pt/plugins/sync-json.md +244 -0
  103. package/docs/ru/plugins/sync-json.md +244 -0
  104. package/docs/tr/plugins/sync-json.md +245 -0
  105. package/docs/vi/plugins/sync-json.md +244 -0
  106. package/docs/zh/plugins/sync-json.md +244 -0
  107. package/package.json +14 -14
@@ -1,346 +1,124 @@
1
1
  ---
2
2
  createdAt: 2025-01-02
3
- updatedAt: 2025-06-29
4
- title: Intlayer y react-i18next
5
- description: Comparar Intlayer con react-i18next para una aplicación React
3
+ updatedAt: 2025-10-29
4
+ title: Cómo automatizar tus traducciones JSON de react-i18next usando Intlayer
5
+ description: Automatiza tus traducciones JSON con Intlayer y react-i18next para una internacionalización mejorada en aplicaciones React.
6
6
  keywords:
7
7
  - react-i18next
8
8
  - i18next
9
9
  - Intlayer
10
10
  - Internacionalización
11
- - Blogumentación
12
- - Next.js
13
- - JavaScript
11
+ - i18n
12
+ - Blog
14
13
  - React
14
+ - JavaScript
15
+ - TypeScript
16
+ - Gestión de Contenido
15
17
  slugs:
16
18
  - blog
17
19
  - intlayer-with-react-i18next
20
+ history:
21
+ - version: 7.0.0
22
+ date: 2025-10-29
23
+ changes: Cambio al plugin syncJSON
18
24
  ---
19
25
 
20
- # React Internationalization (i18n) con react-i18next y Intlayer
21
-
22
- ## Resumen
23
-
24
- - **Intlayer** te ayuda a gestionar traducciones a través de archivos de declaración de contenido a **nivel de componente**.
25
- - **react-i18next** es una integración popular de React para **i18next** que proporciona hooks como `useTranslation` para obtener cadenas localizadas en tus componentes.
26
-
27
- Cuando se combinan, Intlayer puede **exportar** diccionarios en **JSON compatible con i18next**, de modo que react-i18next pueda **consumirlos** en tiempo de ejecución.
28
-
29
- ## ¿Por Qué Usar Intlayer con react-i18next?
30
-
31
- Los archivos de declaración de contenido **Intlayer** ofrecen una mejor experiencia para desarrolladores porque son:
32
-
33
- 1. **Flexibles en la Ubicación de Archivos**
34
- Coloca cada archivo de declaración de contenido justo al lado del componente que lo necesita. Esta estructura te permite mantener las traducciones co-localizadas, evitando traducciones huérfanas cuando los componentes se mueven o se eliminan.
35
-
36
- ```bash codeFormat="typescript"
37
- .
38
- └── src
39
- └── components
40
- └── MyComponent
41
- ├── index.content.ts # Archivo de declaración de contenido
42
- └── index.tsx
43
- ```
44
-
45
- ```bash codeFormat="esm"
46
- .
47
- └── src
48
- └── components
49
- └── MyComponent
50
- ├── index.content.mjs # Archivo de declaración de contenido
51
- └── index.mjx
52
- ```
53
-
54
- ```bash codeFormat="cjs"
55
- .
56
- └── src
57
- └── components
58
- └── MyComponent
59
- ├── index.content.cjs # Archivo de declaración de contenido
60
- └── index.cjx
61
- ```
62
-
63
- ```bash codeFormat="json"
64
- .
65
- └── src
66
- └── components
67
- └── MyComponent
68
- ├── index.content.json # Archivo de declaración de contenido
69
- └── index.jsx
70
- ```
71
-
72
- 2. **Traducciones Centralizadas**
73
- Un solo archivo de declaración de contenido recopila todas las traducciones necesarias para un componente, haciendo que las traducciones faltantes sean más fáciles de detectar.
74
- Con TypeScript, incluso obtienes errores en tiempo de compilación si faltan traducciones.
75
-
76
- ## Instalación
77
-
78
- En un proyecto de Create React App, instala estas dependencias:
79
-
80
- ```bash
81
- # Con npm
82
- npm install intlayer react-i18next i18next i18next-resources-to-backend
83
- ```
84
-
85
- ```bash
86
- # Con yarn
87
- yarn add intlayer react-i18next i18next i18next-resources-to-backend
88
- ```
89
-
90
- ```bash
91
- # Con pnpm
92
- pnpm add intlayer react-i18next i18next i18next-resources-to-backend
93
- ```
26
+ # Cómo automatizar tus traducciones JSON de react-i18next usando Intlayer
94
27
 
95
- ### ¿Qué Son Estos Paquetes?
28
+ ## ¿Qué es Intlayer?
96
29
 
97
- - **intlayer** La CLI y biblioteca central para gestionar configuraciones de i18n, declaraciones de contenido y construir salidas de diccionario.
98
- - **react-intlayer** – Integración específica de React para Intlayer, proporcionando notablemente algunos scripts para automatizar la construcción de diccionarios.
99
- - **react-i18next** – Biblioteca de integración específica de React para i18next, incluyendo el hook `useTranslation`.
100
- - **i18next** – El marco subyacente para el manejo de traducciones.
101
- - **i18next-resources-to-backend** – Un backend de i18next que importa dinámicamente recursos JSON.
30
+ **Intlayer** es una biblioteca innovadora y de código abierto para la internacionalización, diseñada para abordar las limitaciones de las soluciones i18n tradicionales. Ofrece un enfoque moderno para la gestión de contenido en aplicaciones React.
102
31
 
103
- ## Configurando Intlayer para Exportar Diccionarios de i18next
104
-
105
- Crea (o actualiza) tu `intlayer.config.ts` en la raíz de tu proyecto:
106
-
107
- ```typescript title="intlayer.config.ts"
108
- import { Locales, type IntlayerConfig } from "intlayer";
109
-
110
- const config: IntlayerConfig = {
111
- internationalization: {
112
- // Agrega tantos locales como desees
113
- locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
114
- defaultLocale: Locales.ENGLISH,
115
- },
116
- content: {
117
- // Indica a Intlayer que cree JSON compatible con i18next
118
- dictionaryOutput: ["i18next"],
32
+ Consulta una comparación concreta con react-i18next en nuestro artículo del blog [react-i18next vs. react-intl vs. Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/es/react-i18next_vs_react-intl_vs_intlayer.md).
119
33
 
120
- // Elige un directorio de salida para los recursos generados
121
- // Esta carpeta se creará si no existe.
122
- i18nextResourcesDir: "./i18next/resources",
123
- },
124
- };
34
+ ## ¿Por qué combinar Intlayer con react-i18next?
125
35
 
126
- export default config;
127
- ```
36
+ Aunque Intlayer proporciona una excelente solución i18n independiente (consulta nuestra [guía de integración con React](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/intlayer_with_vite+react.md)), es posible que desees combinarlo con react-i18next por varias razones:
128
37
 
129
- > **Nota**: Si no estás usando TypeScript, puedes crear este archivo de configuración como `.cjs`, `.mjs` o `.js` (consulta la [documentación de Intlayer](https://intlayer.org/en/doc/concept/configuration) para más detalles).
38
+ 1. **Base de código existente**: Tienes una implementación establecida de react-i18next y quieres migrar gradualmente a la mejor experiencia de desarrollo que ofrece Intlayer.
39
+ 2. **Requisitos heredados**: Tu proyecto requiere compatibilidad con plugins o flujos de trabajo existentes de react-i18next.
40
+ 3. **Familiaridad del equipo**: Tu equipo está cómodo con react-i18next pero desea una mejor gestión del contenido.
130
41
 
131
- ## Construyendo los Recursos de i18next
42
+ **Para ello, Intlayer puede implementarse como un adaptador para react-i18next que ayude a automatizar tus traducciones JSON en la línea de comandos o en pipelines CI/CD, probar tus traducciones y más.**
132
43
 
133
- Una vez que tus declaraciones de contenido estén en su lugar (sección siguiente), ejecuta el **comando de construcción de Intlayer**:
44
+ Esta guía te muestra cómo aprovechar el sistema superior de declaración de contenido de Intlayer mientras mantienes la compatibilidad con react-i18next.
134
45
 
135
- ```bash
136
- # Con npm
137
- npx run intlayer build
138
- ```
46
+ ## Tabla de Contenidos
139
47
 
140
- ```bash
141
- # Con yarn
142
- yarn intlayer build
143
- ```
48
+ <TOC/>
144
49
 
145
- ```bash
146
- # Con pnpm
147
- pnpm intlayer build
148
- ```
50
+ ## Guía paso a paso para configurar Intlayer con react-i18next
149
51
 
150
- > Esto generará tus recursos de i18next dentro del directorio `./i18next/resources` por defecto.
52
+ ### Paso 1: Instalar dependencias
151
53
 
152
- Una salida típica podría verse así:
54
+ Instala los paquetes necesarios:
153
55
 
154
- ```bash
155
- .
156
- └── i18next
157
- └── resources
158
- ├── en
159
- │ └── my-content.json
160
- ├── fr
161
- │ └── my-content.json
162
- └── es
163
- └── my-content.json
56
+ ```bash packageManager="npm"
57
+ npm install intlayer @intlayer/sync-json-plugin
164
58
  ```
165
59
 
166
- Donde cada clave de declaración de **Intlayer** se utiliza como un **espacio de nombres de i18next** (por ejemplo, `my-content.json`).
167
-
168
- ## Importando Diccionarios en tu Configuración de react-i18next
169
-
170
- Para cargar dinámicamente estos recursos en tiempo de ejecución, utiliza [`i18next-resources-to-backend`](https://www.npmjs.com/package/i18next-resources-to-backend). Por ejemplo, crea un archivo `i18n.ts` (o `.js`) en tu proyecto:
171
-
172
- ```typescript title="i18n.ts"
173
- import i18next from "i18next";
174
- import { initReactI18next } from "react-i18next";
175
- import resourcesToBackend from "i18next-resources-to-backend";
176
-
177
- i18next
178
- // plugin react-i18next
179
- .use(initReactI18next)
180
- // carga dinámicamente los recursos
181
- .use(
182
- resourcesToBackend((language: string, namespace: string) => {
183
- // Ajusta la ruta de importación a tu directorio de recursos
184
- return import(`../i18next/resources/${language}/${namespace}.json`);
185
- })
186
- )
187
- // Inicializa i18next
188
- .init({
189
- // Localidad de respaldo
190
- fallbackLng: "en",
191
-
192
- // Puedes agregar otras opciones de configuración de i18next aquí, consulta:
193
- // https://www.i18next.com/overview/configuration-options
194
- });
195
-
196
- export default i18next;
60
+ ```bash packageManager="pnpm"
61
+ pnpm add intlayer @intlayer/sync-json-plugin
197
62
  ```
198
63
 
199
- ```javascript title="i18n.js"
200
- import i18next from "i18next";
201
- import { initReactI18next } from "react-i18next";
202
- import resourcesToBackend from "i18next-resources-to-backend";
203
-
204
- i18next
205
- .use(initReactI18next)
206
- .use(
207
- resourcesToBackend(
208
- (language, namespace) =>
209
- import(`../i18next/resources/${language}/${namespace}.json`)
210
- )
211
- )
212
- .init({
213
- fallbackLng: "en",
214
- });
215
-
216
- export default i18next;
64
+ ```bash packageManager="yarn"
65
+ yarn add intlayer @intlayer/sync-json-plugin
217
66
  ```
218
67
 
219
- Luego, en tu archivo **raíz** o **índice** (por ejemplo, `src/index.tsx`), importa esta configuración de `i18n` **antes** de renderizar la `App`:
68
+ **Descripción de los paquetes:**
220
69
 
221
- ```typescript
222
- import React from "react";
223
- import ReactDOM from "react-dom/client";
224
- // Inicializa i18n antes de cualquier otra cosa
225
- import "./i18n";
226
- import App from "./App";
70
+ - **intlayer**: Biblioteca principal para la gestión de internacionalización, declaración de contenido y construcción
71
+ - **@intlayer/sync-json-plugin**: Plugin para exportar declaraciones de contenido de Intlayer a un formato JSON compatible con react-i18next
227
72
 
228
- ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
229
- <React.StrictMode>
230
- <App />
231
- </React.StrictMode>
232
- );
233
- ```
73
+ ### Paso 2: Implementar el plugin de Intlayer para envolver el JSON
234
74
 
235
- ## Creando y Gestionando Tus Declaraciones de Contenido
75
+ Crea un archivo de configuración de Intlayer para definir los locales que soportas:
236
76
 
237
- Intlayer extrae traducciones de "archivos de declaración de contenido" ubicados en cualquier lugar debajo de `./src` (por defecto).
238
- Aquí hay un ejemplo mínimo en TypeScript:
77
+ **Si también quieres exportar diccionarios JSON para react-i18next**, añade el plugin `syncJSON`:
239
78
 
240
- ```typescript title="src/components/MyComponent/MyComponent.content.ts"
241
- import { t, type Dictionary } from "intlayer";
79
+ ```typescript fileName="intlayer.config.ts"
80
+ import { Locales, type IntlayerConfig } from "intlayer";
81
+ import { syncJSON } from "@intlayer/sync-json-plugin";
242
82
 
243
- const content = {
244
- // La "clave" será tu espacio de nombres de i18next (por ejemplo, "my-component")
245
- key: "my-component",
246
- content: {
247
- // Cada llamada "t" es un nodo de traducción separado
248
- heading: t({
249
- en: "Hello World",
250
- es: "Hola Mundo",
251
- fr: "Bonjour le monde",
252
- }),
253
- description: t({
254
- en: "My i18n description text...",
255
- fr: "Ma description en i18n...",
256
- es: "Mi descripción en i18n...",
257
- }),
83
+ const config: IntlayerConfig = {
84
+ internationalization: {
85
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
86
+ defaultLocale: Locales.ENGLISH,
258
87
  },
259
- } satisfies Dictionary;
260
-
261
- export default content;
262
- ```
263
-
264
- Si prefieres JSON, `.cjs` o `.mjs`, consulta la [documentación de Intlayer](https://intlayer.org/en/doc/concept/content).
265
-
266
- > Por defecto, las declaraciones de contenido válidas coinciden con el patrón de extensión de archivo:
267
-
268
- > `*.content.{ts,tsx,js,jsx,mjs,mjx,cjs,cjx,json}`
269
-
270
- ## Usando las Traducciones en Componentes de React
271
-
272
- Después de que hayas **construido** tus recursos de Intlayer y configurado react-i18next, puedes usar directamente el hook `useTranslation` de **react-i18next**.
273
- Por ejemplo:
274
-
275
- ```tsx title="src/components/MyComponent/MyComponent.tsx"
276
- import type { FC } from "react";
277
- import { useTranslation } from "react-i18next";
278
-
279
- /**
280
- * El "espacio de nombres" de i18next es la `clave` de Intlayer de "MyComponent.content.ts"
281
- * así que pasaremos "my-component" a useTranslation().
282
- */
283
- const MyComponent: FC = () => {
284
- const { t } = useTranslation("my-component");
285
-
286
- return (
287
- <div>
288
- <h1>{t("heading")}</h1>
289
- <p>{t("description")}</p>
290
- </div>
291
- );
88
+ plugins: [
89
+ syncJSON({
90
+ source: ({ key, locale }) => `./messages/${locale}/${key}.json`,
91
+ }),
92
+ ],
292
93
  };
293
94
 
294
- export default MyComponent;
95
+ export default config;
295
96
  ```
296
97
 
297
- > Ten en cuenta que la función `t` hace referencia a **claves** dentro de tu JSON generado. Para una entrada de contenido de Intlayer llamada `heading`, usarás `t("heading")`.
98
+ El plugin `syncJSON` envolverá automáticamente el JSON. Leerá y escribirá los archivos JSON sin cambiar la arquitectura del contenido.
298
99
 
299
- ## Opcional: Integrarse con Scripts de Create React App (CRACO)
100
+ Si deseas hacer coexistir ese JSON con los archivos de declaración de contenido de intlayer (`.content`), Intlayer procederá de la siguiente manera:
300
101
 
301
- **react-intlayer** proporciona un enfoque basado en CRACO para construcciones personalizadas y configuración del servidor de desarrollo. Si deseas que el paso de construcción de Intlayer se integre sin problemas, puedes:
102
+ 1. cargar tanto los archivos JSON como los archivos de declaración de contenido y transformarlos en un diccionario de intlayer.
103
+ 2. si hay conflictos entre el JSON y los archivos de declaración de contenido, Intlayer procederá a fusionar todos esos diccionarios. Dependiendo de la prioridad de los plugins y la del archivo de declaración de contenido (todos son configurables).
302
104
 
303
- 1. **Instalar react-intlayer** (si no lo has hecho):
304
- ```bash
305
- npm install react-intlayer --save-dev
306
- ```
307
- 2. **Ajustar tus scripts de `package.json`** para usar los scripts de `react-intlayer`:
105
+ Si se realizan cambios usando la CLI para traducir el JSON, o usando el CMS, Intlayer actualizará el archivo JSON con las nuevas traducciones.
308
106
 
309
- ```jsonc
310
- "scripts": {
311
- "start": "react-intlayer start",
312
- "build": "react-intlayer build",
313
- "transpile": "intlayer build"
314
- }
315
- ```
107
+ Para ver más detalles sobre el plugin `syncJSON`, por favor consulte la [documentación del plugin syncJSON](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/plugins/sync-json.md).
316
108
 
317
- > Los scripts de `react-intlayer` se basan en [CRACO](https://craco.js.org/). También puedes implementar tu propia configuración basada en el plugin craco de intlayer. [Consulta un ejemplo aquí](https://github.com/aymericzip/intlayer/blob/main/examples/react-app/craco.config.js).
318
-
319
- Ahora, al ejecutar `npm run build`, `yarn build`, o `pnpm build` se activan las construcciones de Intlayer y CRA.
320
-
321
- ## Configuración de TypeScript
109
+ ## Configuración de Git
322
110
 
323
- **Intlayer** proporciona **definiciones de tipo autogeneradas** para tu contenido. Para asegurarte de que TypeScript las reconozca, agrega **`types`** (o `types` si lo configuraste de otro modo) a tu arreglo **include** de `tsconfig.json`:
111
+ Se recomienda ignorar los archivos generados automáticamente por Intlayer:
324
112
 
325
- ```json5 title="tsconfig.json"
326
- {
327
- "compilerOptions": {
328
- // ...
329
- },
330
- "include": ["src", "types"],
331
- }
113
+ ```plaintext fileName=".gitignore"
114
+ # Ignorar archivos generados por Intlayer
115
+ .intlayer
332
116
  ```
333
117
 
334
- > Esto permitirá que TypeScript infiera la estructura de tus traducciones para una mejor autocompletación y detección de errores.
335
-
336
- ## Configuración de Git
118
+ Estos archivos pueden ser regenerados durante su proceso de compilación y no necesitan ser comprometidos en el control de versiones.
337
119
 
338
- Se recomienda **ignorar** archivos y carpetas generados automáticamente por Intlayer. Agrega esta línea a tu `.gitignore`:
120
+ ### Extensión de VS Code
339
121
 
340
- ```plaintext
341
- # Ignorar los archivos generados por Intlayer
342
- .intlayer
343
- i18next
344
- ```
122
+ Para mejorar la experiencia del desarrollador, instale la extensión oficial **Intlayer VS Code Extension**:
345
123
 
346
- Por lo general, no debes **comprometer** estos recursos o artefactos internos de construcción `.intlayer`, ya que pueden regenerarse en cada construcción.
124
+ [Instalar desde el Marketplace de VS Code](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)