@intlayer/docs 7.0.4-canary.0 → 7.0.5

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 e react-i18next
5
- description: Confronta Intlayer con react-i18next per un'app React
3
+ updatedAt: 2025-10-29
4
+ title: Come automatizzare le traduzioni JSON di react-i18next usando Intlayer
5
+ description: Automatizza le tue traduzioni JSON con Intlayer e react-i18next per una migliore internazionalizzazione nelle applicazioni React.
6
6
  keywords:
7
7
  - react-i18next
8
8
  - i18next
9
9
  - Intlayer
10
10
  - Internazionalizzazione
11
- - Blogumentazione
12
- - Next.js
13
- - JavaScript
11
+ - i18n
12
+ - Blog
14
13
  - React
14
+ - JavaScript
15
+ - TypeScript
16
+ - Gestione Contenuti
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: Modifica al plugin syncJSON
18
24
  ---
19
25
 
20
- # React Internazionalizzazione (i18n) con react-i18next e Intlayer
21
-
22
- ## Panoramica
23
-
24
- - **Intlayer** ti aiuta a gestire le traduzioni tramite **file di dichiarazione del contenuto** a livello di componente.
25
- - **react-i18next** è un'integrazione popolare di React per **i18next** che fornisce hook come `useTranslation` per recuperare stringhe localizzate nei tuoi componenti.
26
-
27
- Quando combinati, Intlayer può **esportare** dizionari in **JSON compatibile con i18next** in modo che react-i18next possa **consumare** questi dizionari in fase di esecuzione.
28
-
29
- ## Perché Usare Intlayer con react-i18next?
30
-
31
- I file di dichiarazione del contenuto di **Intlayer** offrono una migliore esperienza per gli sviluppatori perché sono:
32
-
33
- 1. **Flessibili nella Posizione dei File**
34
- Metti ogni file di dichiarazione del contenuto accanto al componente che ne ha bisogno. Questa struttura ti consente di mantenere le traduzioni co-locate, impedendo traduzioni orfane quando i componenti si spostano o vengono eliminati.
35
-
36
- ```bash codeFormat="typescript"
37
- .
38
- └── src
39
- └── components
40
- └── MyComponent
41
- ├── index.content.ts # File di dichiarazione del contenuto
42
- └── index.tsx
43
- ```
44
-
45
- ```bash codeFormat="esm"
46
- .
47
- └── src
48
- └── components
49
- └── MyComponent
50
- ├── index.content.mjs # File di dichiarazione del contenuto
51
- └── index.mjx
52
- ```
53
-
54
- ```bash codeFormat="cjs"
55
- .
56
- └── src
57
- └── components
58
- └── MyComponent
59
- ├── index.content.cjs # File di dichiarazione del contenuto
60
- └── index.cjx
61
- ```
62
-
63
- ```bash codeFormat="json"
64
- .
65
- └── src
66
- └── components
67
- └── MyComponent
68
- ├── index.content.json # File di dichiarazione del contenuto
69
- └── index.jsx
70
- ```
71
-
72
- 2. **Traduzioni Centralizzate**
73
- Un singolo file di dichiarazione del contenuto raccoglie tutte le traduzioni necessarie per un componente, rendendo più facile rilevare traduzioni mancanti.
74
- Con TypeScript, ricevi anche errori di compilazione se le traduzioni sono mancanti.
75
-
76
- ## Installazione
77
-
78
- In un progetto Create React App, installa queste dipendenze:
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
+ # Come automatizzare le traduzioni JSON di react-i18next usando Intlayer
94
27
 
95
- ### Cosa Sono Questi Pacchetti?
28
+ ## Cos'è Intlayer?
96
29
 
97
- - **intlayer** La CLI e la libreria principale per gestire le configurazioni i18n, le dichiarazioni di contenuto e costruire output di dizionari.
98
- - **react-intlayer** – Integrazione specifica di React per Intlayer, che fornisce notevolmente qualche script per automatizzare la costruzione dei dizionari.
99
- - **react-i18next** – Libreria di integrazione specifica di React per i18next, incluso l'hook `useTranslation`.
100
- - **i18next** – Il framework sottostante per la gestione delle traduzioni.
101
- - **i18next-resources-to-backend** – Un backend i18next che importa dinamicamente risorse JSON.
30
+ **Intlayer** è una libreria di internazionalizzazione innovativa e open-source progettata per superare le limitazioni delle soluzioni i18n tradizionali. Offre un approccio moderno alla gestione dei contenuti nelle applicazioni React.
102
31
 
103
- ## Configurare Intlayer per Esportare Dizionari i18next
104
-
105
- Crea (o aggiorna) il tuo `intlayer.config.ts` nella radice del tuo progetto:
106
-
107
- ```typescript title="intlayer.config.ts"
108
- import { Locales, type IntlayerConfig } from "intlayer";
109
-
110
- const config: IntlayerConfig = {
111
- internationalization: {
112
- // Aggiungi quante più lingue desideri
113
- locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
114
- defaultLocale: Locales.ENGLISH,
115
- },
116
- content: {
117
- // Dì a Intlayer di creare JSON compatibile con i18next
118
- dictionaryOutput: ["i18next"],
32
+ Consulta un confronto concreto con react-i18next nel nostro post del blog [react-i18next vs. react-intl vs. Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/it/react-i18next_vs_react-intl_vs_intlayer.md).
119
33
 
120
- // Scegli una directory di output per le risorse generate
121
- // Questa cartella verrà creata se non esiste ancora.
122
- i18nextResourcesDir: "./i18next/resources",
123
- },
124
- };
34
+ ## Perché combinare Intlayer con react-i18next?
125
35
 
126
- export default config;
127
- ```
36
+ Sebbene Intlayer offra una soluzione i18n autonoma eccellente (vedi la nostra [guida all'integrazione con React](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_with_vite+react.md)), potresti volerlo combinare con react-i18next per diversi motivi:
128
37
 
129
- > **Nota**: Se non stai usando TypeScript, puoi creare questo file di configurazione come `.cjs`, `.mjs` o `.js` (vedi la [documentazione di Intlayer](https://intlayer.org/en/doc/concept/configuration) per dettagli).
38
+ 1. **Codice esistente**: Hai un’implementazione consolidata di react-i18next e desideri migrare gradualmente alla migliore esperienza sviluppatore offerta da Intlayer.
39
+ 2. **Requisiti legacy**: Il tuo progetto richiede la compatibilità con plugin o flussi di lavoro esistenti di react-i18next.
40
+ 3. **Familiarità del team**: Il tuo team è abituato a react-i18next ma desidera una migliore gestione dei contenuti.
130
41
 
131
- ## Costruire le Risorse i18next
42
+ **Per questo, Intlayer può essere implementato come un adattatore per react-i18next per aiutarti ad automatizzare le tue traduzioni JSON in CLI o pipeline CI/CD, testare le traduzioni e altro ancora.**
132
43
 
133
- Una volta che le tue dichiarazioni di contenuto sono pronte (sezione successiva), esegui il **comando di build di Intlayer**:
44
+ Questa guida ti mostra come sfruttare il sistema superiore di dichiarazione dei contenuti di Intlayer mantenendo la compatibilità con react-i18next.
134
45
 
135
- ```bash
136
- # Con npm
137
- npx run intlayer build
138
- ```
46
+ ## Indice
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
+ ## Guida passo-passo per configurare Intlayer con react-i18next
149
51
 
150
- > Questo genererà le tue risorse i18next all'interno della directory `./i18next/resources` per impostazione predefinita.
52
+ ### Passo 1: Installare le dipendenze
151
53
 
152
- Un output tipico potrebbe apparire così:
54
+ Installa i pacchetti necessari:
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
- Dove ogni chiave di dichiarazione di **Intlayer** viene utilizzata come un **namespace di i18next** (ad esempio, `my-content.json`).
167
-
168
- ## Importare Dizionari nella Tua Configurazione react-i18next
169
-
170
- Per caricare dinamicamente queste risorse in fase di esecuzione, usa [`i18next-resources-to-backend`](https://www.npmjs.com/package/i18next-resources-to-backend). Ad esempio, crea un file `i18n.ts` (o `.js`) nel tuo progetto:
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
- // carica dinamicamente le risorse
181
- .use(
182
- resourcesToBackend((language: string, namespace: string) => {
183
- // Regola il percorso di importazione alla tua directory delle risorse
184
- return import(`../i18next/resources/${language}/${namespace}.json`);
185
- })
186
- )
187
- // Inizializza i18next
188
- .init({
189
- // Lingua di fallback
190
- fallbackLng: "en",
191
-
192
- // Puoi aggiungere altre opzioni di configurazione di i18next qui, vedere:
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
- Poi, nel tuo file **root** o **index** (ad esempio, `src/index.tsx`), importa questa configurazione `i18n` **prima** di rendere l'`App`:
68
+ **Descrizione dei pacchetti:**
220
69
 
221
- ```typescript
222
- import React from "react";
223
- import ReactDOM from "react-dom/client";
224
- // Inizializza i18n prima di qualsiasi altra cosa
225
- import "./i18n";
226
- import App from "./App";
70
+ - **intlayer**: Libreria principale per la gestione dell'internazionalizzazione, dichiarazione dei contenuti e build
71
+ - **@intlayer/sync-json-plugin**: Plugin per esportare le dichiarazioni di contenuto di Intlayer in formato JSON compatibile 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
+ ### Passo 2: Implementare il plugin Intlayer per incapsulare il JSON
234
74
 
235
- ## Creare e Gestire le Tue Dichiarazioni di Contenuto
75
+ Crea un file di configurazione Intlayer per definire le tue localizzazioni supportate:
236
76
 
237
- Intlayer estrae le traduzioni dai “file di dichiarazione del contenuto” situati ovunque sotto `./src` (per impostazione predefinita).
238
- Ecco un esempio minimale in TypeScript:
77
+ **Se vuoi anche esportare i dizionari JSON per react-i18next**, aggiungi il 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 "chiave" sarà il tuo namespace i18next (ad esempio, "my-component")
245
- key: "my-component",
246
- content: {
247
- // Ogni chiamata "t" è un nodo di traduzione separato
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
- Se preferisci JSON, `.cjs`, o `.mjs`, fai riferimento alla [documentazione di Intlayer](https://intlayer.org/en/doc/concept/content).
265
-
266
- > Per impostazione predefinita, le dichiarazioni di contenuto valide corrispondono al modello di estensione del file:
267
-
268
- > `*.content.{ts,tsx,js,jsx,mjs,mjx,cjs,cjx,json}`
269
-
270
- ## Usare le Traduzioni nei Componenti React
271
-
272
- Dopo aver **costruito** le tue risorse Intlayer e configurato react-i18next, puoi usare direttamente l'hook `useTranslation` di **react-i18next**.
273
- Ad esempio:
274
-
275
- ```tsx title="src/components/MyComponent/MyComponent.tsx"
276
- import type { FC } from "react";
277
- import { useTranslation } from "react-i18next";
278
-
279
- /**
280
- * Il "namespace" di i18next è la `chiave` di Intlayer da "MyComponent.content.ts"
281
- * quindi passeremo "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
- > Nota che la funzione `t` fa riferimento a **chiavi** nel tuo JSON generato. Per un'inserzione di contenuto di Intlayer chiamata `heading`, utilizzerai `t("heading")`.
98
+ Il plugin `syncJSON` avvolgerà automaticamente il JSON. Leggerà e scriverà i file JSON senza modificare l'architettura del contenuto.
298
99
 
299
- ## Opzionale: Integrare con gli Script di Create React App (CRACO)
100
+ Se vuoi far coesistere quel JSON con i file di dichiarazione dei contenuti di intlayer (file `.content`), Intlayer procederà in questo modo:
300
101
 
301
- **react-intlayer** fornisce un approccio basato su CRACO per build personalizzate e configurazione del server di sviluppo. Se desideri che il passaggio di build di Intlayer sia integrato senza problemi, puoi:
102
+ 1. caricare sia i file JSON che i file di dichiarazione dei contenuti e trasformarli in un dizionario intlayer.
103
+ 2. se ci sono conflitti tra i file JSON e i file di dichiarazione dei contenuti, Intlayer procederà alla fusione di tutti questi dizionari. A seconda della priorità dei plugin e di quella del file di dichiarazione dei contenuti (tutti configurabili).
302
104
 
303
- 1. **Installare react-intlayer** (se non lo hai già fatto):
304
- ```bash
305
- npm install react-intlayer --save-dev
306
- ```
307
- 2. **Regolare i tuoi script di `package.json`** per utilizzare gli script di `react-intlayer`:
105
+ Se vengono apportate modifiche utilizzando la CLI per tradurre il JSON, o utilizzando il CMS, Intlayer aggiornerà il file JSON con le nuove traduzioni.
308
106
 
309
- ```jsonc
310
- "scripts": {
311
- "start": "react-intlayer start",
312
- "build": "react-intlayer build",
313
- "transpile": "intlayer build"
314
- }
315
- ```
107
+ Per maggiori dettagli sul plugin `syncJSON`, si prega di fare riferimento alla [documentazione del plugin syncJSON](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/plugins/sync-json.md).
316
108
 
317
- > Gli script di `react-intlayer` sono basati su [CRACO](https://craco.js.org/). Puoi anche implementare il tuo setup basato sul plugin craco di intlayer. [Vedi esempio qui](https://github.com/aymericzip/intlayer/blob/main/examples/react-app/craco.config.js).
318
-
319
- Ora, eseguendo `npm run build`, `yarn build`, o `pnpm build` attiva sia le build di Intlayer che quelle di CRA.
320
-
321
- ## Configurazione di TypeScript
109
+ ## Configurazione Git
322
110
 
323
- **Intlayer** fornisce **definizioni di tipo autogenerate** per il tuo contenuto. Per assicurarti che TypeScript le riconosca, aggiungi **`types`** (o `types` se hai configurato diversamente) all'array **include** del tuo `tsconfig.json`:
111
+ È consigliato ignorare i file Intlayer generati automaticamente:
324
112
 
325
- ```json5 title="tsconfig.json"
326
- {
327
- "compilerOptions": {
328
- // ...
329
- },
330
- "include": ["src", "types"],
331
- }
113
+ ```plaintext fileName=".gitignore"
114
+ # Ignorare i file generati da Intlayer
115
+ .intlayer
332
116
  ```
333
117
 
334
- > Questo consentirà a TypeScript di dedurre la struttura delle tue traduzioni per migliori autocompletamenti e detection degli errori.
335
-
336
- ## Configurazione Git
118
+ Questi file possono essere rigenerati durante il processo di build e non è necessario includerli nel controllo di versione.
337
119
 
338
- Si consiglia di **ignorare** file e cartelle autogenerati da Intlayer. Aggiungi questa riga al tuo `.gitignore`:
120
+ ### Estensione VS Code
339
121
 
340
- ```plaintext
341
- # Ignora i file generati da Intlayer
342
- .intlayer
343
- i18next
344
- ```
122
+ Per migliorare l'esperienza dello sviluppatore, installa l'**Estensione ufficiale Intlayer per VS Code**:
345
123
 
346
- In genere non committi queste risorse o artefatti di build interni `.intlayer`, poiché possono essere rigenerati ad ogni build.
124
+ [Installa dal Marketplace di VS Code](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)