@intlayer/docs 5.7.8 → 5.8.0-canary.0
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/blog/ar/intlayer_with_next-i18next.md +3 -4
- package/blog/ar/intlayer_with_next-intl.md +3 -4
- package/blog/ar/intlayer_with_react-i18next.md +1 -1
- package/blog/ar/intlayer_with_react-intl.md +1 -1
- package/blog/de/intlayer_with_next-i18next.md +3 -4
- package/blog/de/intlayer_with_react-intl.md +1 -1
- package/blog/en/intlayer_with_next-i18next.md +3 -4
- package/blog/en/intlayer_with_next-intl.md +3 -4
- package/blog/en/intlayer_with_react-i18next.md +1 -1
- package/blog/en/intlayer_with_react-intl.md +1 -1
- package/blog/en-GB/intlayer_with_next-i18next.md +3 -4
- package/blog/en-GB/intlayer_with_next-intl.md +3 -4
- package/blog/en-GB/intlayer_with_react-i18next.md +1 -1
- package/blog/en-GB/intlayer_with_react-intl.md +1 -1
- package/blog/es/intlayer_with_next-i18next.md +3 -4
- package/blog/es/intlayer_with_next-intl.md +3 -4
- package/blog/es/intlayer_with_react-i18next.md +1 -1
- package/blog/es/intlayer_with_react-intl.md +1 -1
- package/blog/fr/intlayer_with_next-i18next.md +3 -4
- package/blog/fr/intlayer_with_next-intl.md +3 -4
- package/blog/fr/intlayer_with_react-i18next.md +1 -1
- package/blog/fr/intlayer_with_react-intl.md +1 -1
- package/blog/hi/intlayer_with_next-i18next.md +3 -4
- package/blog/hi/intlayer_with_next-intl.md +3 -4
- package/blog/hi/intlayer_with_react-i18next.md +1 -1
- package/blog/hi/intlayer_with_react-intl.md +1 -1
- package/blog/it/intlayer_with_next-i18next.md +3 -4
- package/blog/it/intlayer_with_next-intl.md +3 -4
- package/blog/it/intlayer_with_react-i18next.md +1 -1
- package/blog/it/intlayer_with_react-intl.md +1 -1
- package/blog/ja/intlayer_with_next-i18next.md +3 -4
- package/blog/ja/intlayer_with_next-intl.md +3 -4
- package/blog/ja/intlayer_with_react-intl.md +1 -1
- package/blog/ko/intlayer_with_next-i18next.md +3 -4
- package/blog/ko/intlayer_with_next-intl.md +3 -4
- package/blog/ko/intlayer_with_react-intl.md +1 -1
- package/blog/pt/intlayer_with_next-i18next.md +3 -4
- package/blog/pt/intlayer_with_next-intl.md +3 -4
- package/blog/pt/intlayer_with_react-intl.md +1 -1
- package/blog/ru/intlayer_with_next-i18next.md +3 -4
- package/blog/ru/intlayer_with_next-intl.md +3 -4
- package/blog/ru/intlayer_with_react-i18next.md +1 -1
- package/blog/ru/intlayer_with_react-intl.md +1 -1
- package/blog/zh/intlayer_with_next-i18next.md +3 -4
- package/blog/zh/intlayer_with_next-intl.md +3 -4
- package/blog/zh/intlayer_with_react-i18next.md +1 -1
- package/blog/zh/intlayer_with_react-intl.md +1 -1
- package/dist/cjs/generated/docs.entry.cjs +41 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +41 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/formatters.md +239 -0
- package/docs/ar/interest_of_intlayer.md +162 -49
- package/docs/ar/introduction.md +3 -3
- package/docs/ar/packages/intlayer/index.md +3 -3
- package/docs/ar/packages/next-intlayer/index.md +3 -3
- package/docs/de/formatters.md +239 -0
- package/docs/de/interest_of_intlayer.md +161 -47
- package/docs/de/introduction.md +3 -3
- package/docs/de/packages/intlayer/index.md +3 -3
- package/docs/de/packages/next-intlayer/index.md +3 -3
- package/docs/de/packages/react-intlayer/index.md +3 -3
- package/docs/en/formatters.md +250 -0
- package/docs/en/interest_of_intlayer.md +159 -46
- package/docs/en/introduction.md +3 -3
- package/docs/en/packages/intlayer/index.md +3 -3
- package/docs/en/packages/next-intlayer/index.md +3 -3
- package/docs/en/packages/react-intlayer/index.md +3 -3
- package/docs/en-GB/formatters.md +239 -0
- package/docs/en-GB/interest_of_intlayer.md +160 -53
- package/docs/en-GB/packages/intlayer/index.md +3 -3
- package/docs/en-GB/packages/next-intlayer/index.md +3 -3
- package/docs/en-GB/packages/react-intlayer/index.md +3 -3
- package/docs/es/formatters.md +239 -0
- package/docs/es/interest_of_intlayer.md +159 -47
- package/docs/es/introduction.md +3 -3
- package/docs/es/packages/intlayer/index.md +3 -3
- package/docs/es/packages/next-intlayer/index.md +3 -3
- package/docs/fr/formatters.md +239 -0
- package/docs/fr/interest_of_intlayer.md +160 -46
- package/docs/fr/introduction.md +3 -3
- package/docs/fr/packages/intlayer/index.md +3 -3
- package/docs/fr/packages/next-intlayer/index.md +3 -3
- package/docs/fr/packages/react-intlayer/index.md +3 -3
- package/docs/hi/formatters.md +239 -0
- package/docs/hi/interest_of_intlayer.md +158 -42
- package/docs/hi/introduction.md +3 -3
- package/docs/hi/packages/intlayer/index.md +3 -3
- package/docs/hi/packages/next-intlayer/index.md +3 -3
- package/docs/hi/packages/react-intlayer/index.md +3 -3
- package/docs/it/formatters.md +239 -0
- package/docs/it/interest_of_intlayer.md +160 -46
- package/docs/it/introduction.md +3 -3
- package/docs/it/packages/intlayer/index.md +3 -3
- package/docs/it/packages/next-intlayer/index.md +3 -3
- package/docs/it/packages/react-intlayer/index.md +3 -3
- package/docs/ja/formatters.md +261 -0
- package/docs/ja/interest_of_intlayer.md +157 -48
- package/docs/ja/introduction.md +3 -3
- package/docs/ja/packages/intlayer/index.md +3 -3
- package/docs/ja/packages/next-intlayer/index.md +3 -3
- package/docs/ja/packages/react-intlayer/index.md +3 -3
- package/docs/ko/formatters.md +258 -0
- package/docs/ko/interest_of_intlayer.md +160 -48
- package/docs/ko/introduction.md +3 -3
- package/docs/ko/packages/intlayer/index.md +3 -3
- package/docs/ko/packages/next-intlayer/index.md +3 -3
- package/docs/ko/packages/react-intlayer/index.md +3 -3
- package/docs/pt/formatters.md +239 -0
- package/docs/pt/interest_of_intlayer.md +162 -47
- package/docs/pt/introduction.md +3 -3
- package/docs/pt/packages/intlayer/index.md +3 -3
- package/docs/pt/packages/next-intlayer/index.md +3 -3
- package/docs/pt/packages/react-intlayer/index.md +3 -3
- package/docs/ru/formatters.md +239 -0
- package/docs/ru/interest_of_intlayer.md +168 -50
- package/docs/ru/introduction.md +3 -3
- package/docs/ru/packages/intlayer/index.md +3 -3
- package/docs/ru/packages/next-intlayer/index.md +3 -3
- package/docs/ru/packages/react-intlayer/index.md +3 -3
- package/docs/zh/formatters.md +239 -0
- package/docs/zh/interest_of_intlayer.md +158 -48
- package/docs/zh/introduction.md +3 -3
- package/docs/zh/packages/intlayer/index.md +3 -3
- package/docs/zh/packages/next-intlayer/index.md +3 -3
- package/docs/zh/packages/react-intlayer/index.md +3 -3
- package/package.json +12 -12
- package/src/generated/docs.entry.ts +41 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2024-08-13
|
|
3
|
+
updatedAt: 2025-08-20
|
|
4
|
+
title: Formattatori
|
|
5
|
+
description: Utilità di formattazione sensibili alla localizzazione basate su Intl per numeri, percentuali, valuta, date, tempo relativo, unità e notazione compatta. Include un helper Intl con cache.
|
|
6
|
+
keywords:
|
|
7
|
+
- Formattatori
|
|
8
|
+
- Intl
|
|
9
|
+
- Numero
|
|
10
|
+
- Valuta
|
|
11
|
+
- Percentuale
|
|
12
|
+
- Data
|
|
13
|
+
- Tempo Relativo
|
|
14
|
+
- Unità
|
|
15
|
+
- Compatto
|
|
16
|
+
- Internazionalizzazione
|
|
17
|
+
slugs:
|
|
18
|
+
- doc
|
|
19
|
+
- formatters
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Formattatori Intlayer
|
|
23
|
+
|
|
24
|
+
## Panoramica
|
|
25
|
+
|
|
26
|
+
Intlayer fornisce un insieme di helper leggeri costruiti sopra le API native `Intl`, oltre a un wrapper `Intl` con cache per evitare di costruire ripetutamente formattatori pesanti. Queste utilità sono completamente sensibili alla localizzazione e possono essere utilizzate dal pacchetto principale `intlayer`.
|
|
27
|
+
|
|
28
|
+
### Importazione
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
Intl,
|
|
33
|
+
number,
|
|
34
|
+
percentage,
|
|
35
|
+
currency,
|
|
36
|
+
date,
|
|
37
|
+
relativeTime,
|
|
38
|
+
units,
|
|
39
|
+
compact,
|
|
40
|
+
} da "intlayer";
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Se usi React, sono disponibili anche gli hook; vedi `react-intlayer/format`.
|
|
44
|
+
|
|
45
|
+
## Intl con cache
|
|
46
|
+
|
|
47
|
+
L'`Intl` esportato è un sottile wrapper con cache attorno all'`Intl` globale. Memorizza in cache le istanze di `NumberFormat`, `DateTimeFormat`, `RelativeTimeFormat`, evitando di ricostruire ripetutamente lo stesso formattatore.
|
|
48
|
+
|
|
49
|
+
Poiché la costruzione del formattatore è relativamente costosa, questa cache migliora le prestazioni senza modificare il comportamento. Il wrapper espone la stessa API dell'`Intl` nativo, quindi l'uso è identico.
|
|
50
|
+
|
|
51
|
+
- La cache è per processo e trasparente per chi chiama.
|
|
52
|
+
|
|
53
|
+
> Se `Intl.DisplayNames` non è disponibile nell'ambiente, viene stampato un singolo avviso solo per gli sviluppatori (considera un polyfill).
|
|
54
|
+
|
|
55
|
+
Esempio:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { Intl } from "intlayer";
|
|
59
|
+
|
|
60
|
+
const numberFormat = new Intl.NumberFormat("en-GB", {
|
|
61
|
+
style: "currency",
|
|
62
|
+
currency: "GBP",
|
|
63
|
+
});
|
|
64
|
+
numberFormat.format(1234.5); // "£1,234.50"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Formattatori
|
|
68
|
+
|
|
69
|
+
Tutti gli helper seguenti sono esportati da `intlayer`.
|
|
70
|
+
|
|
71
|
+
### `number(value, options?)`
|
|
72
|
+
|
|
73
|
+
Formatta un valore numerico utilizzando raggruppamenti e decimali sensibili alla localizzazione.
|
|
74
|
+
|
|
75
|
+
- **value**: `number | string`
|
|
76
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
77
|
+
|
|
78
|
+
Esempi:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { number } from "intlayer";
|
|
82
|
+
|
|
83
|
+
number(123456.789); // "123,456.789" (in en-US)
|
|
84
|
+
number("1000000", { locale: "fr" }); // "1 000 000"
|
|
85
|
+
number(1234.5, { minimumFractionDigits: 2 }); // "1,234.50"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### `percentage(value, options?)`
|
|
89
|
+
|
|
90
|
+
Formatta un numero come stringa percentuale.
|
|
91
|
+
|
|
92
|
+
Comportamento: i valori maggiori di 1 sono interpretati come percentuali intere e normalizzati (es. `25` → `25%`, `0.25` → `25%`).
|
|
93
|
+
|
|
94
|
+
- **value**: `number | string`
|
|
95
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
96
|
+
|
|
97
|
+
Esempi:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { percentage } from "intlayer";
|
|
101
|
+
|
|
102
|
+
percentage(0.25); // "25%"
|
|
103
|
+
percentage(25); // "25%"
|
|
104
|
+
percentage(0.237, { minimumFractionDigits: 1 }); // "23.7%"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `currency(value, options?)`
|
|
108
|
+
|
|
109
|
+
Formatta un valore come valuta localizzata. Il default è `USD` con due cifre decimali.
|
|
110
|
+
|
|
111
|
+
- **value**: `number | string`
|
|
112
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
113
|
+
- Campi comuni: `currency` (es. `"EUR"`), `currencyDisplay` (`"symbol" | "code" | "name"`)
|
|
114
|
+
|
|
115
|
+
Esempi:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import { currency } from "intlayer";
|
|
119
|
+
|
|
120
|
+
currency(1234.5, { currency: "EUR" }); // "€1.234,50"
|
|
121
|
+
currency("5000", { locale: "fr", currency: "CAD", currencyDisplay: "code" }); // "5 000,00 CAD"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `date(date, optionsOrPreset?)`
|
|
125
|
+
|
|
126
|
+
Formatta un valore data/ora con `Intl.DateTimeFormat`.
|
|
127
|
+
|
|
128
|
+
- **date**: `Date | string | number`
|
|
129
|
+
- **optionsOrPreset**: `Intl.DateTimeFormatOptions & { locale?: LocalesValues }` oppure uno dei preset:
|
|
130
|
+
- Preset: `"short" | "long" | "dateOnly" | "timeOnly" | "full"`
|
|
131
|
+
|
|
132
|
+
Esempi:
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { date } from "intlayer";
|
|
136
|
+
|
|
137
|
+
date(new Date(), "short"); // es., "08/02/25, 14:30"
|
|
138
|
+
date("2025-08-02T14:30:00Z", { locale: "fr", month: "long", day: "numeric" }); // "2 août"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### `relativeTime(from, to = new Date(), options?)`
|
|
142
|
+
|
|
143
|
+
Formatta il tempo relativo tra due istanti con `Intl.RelativeTimeFormat`.
|
|
144
|
+
|
|
145
|
+
- Passa "now" come primo argomento e il target come secondo per ottenere una formulazione naturale.
|
|
146
|
+
- **from**: `Date | string | number`
|
|
147
|
+
- **to**: `Date | string | number` (predefinito `new Date()`)
|
|
148
|
+
- **options**: `{ locale?: LocalesValues; unit?: Intl.RelativeTimeFormatUnit; numeric?: Intl.RelativeTimeFormatNumeric; style?: Intl.RelativeTimeFormatStyle }`
|
|
149
|
+
- L'unità predefinita è `"second"`.
|
|
150
|
+
|
|
151
|
+
Esempi:
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import { relativeTime } from "intlayer";
|
|
155
|
+
|
|
156
|
+
const now = new Date();
|
|
157
|
+
const in3Days = new Date(now.getTime() + 3 * 864e5);
|
|
158
|
+
relativeTime(now, in3Days, { unit: "day" }); // "tra 3 giorni"
|
|
159
|
+
|
|
160
|
+
const twoHoursAgo = new Date(now.getTime() - 2 * 3600e3);
|
|
161
|
+
relativeTime(now, twoHoursAgo, { unit: "hour", numeric: "auto" }); // "2 ore fa"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### `units(value, options?)`
|
|
165
|
+
|
|
166
|
+
Formatta un valore numerico come stringa di unità localizzata utilizzando `Intl.NumberFormat` con `style: 'unit'`.
|
|
167
|
+
|
|
168
|
+
- **value**: `number | string`
|
|
169
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }`
|
|
170
|
+
- Campi comuni: `unit` (es. `"kilometer"`, `"byte"`), `unitDisplay` (`"short" | "narrow" | "long"`)
|
|
171
|
+
- Predefiniti: `unit: 'day'`, `unitDisplay: 'short'`, `useGrouping: false`
|
|
172
|
+
|
|
173
|
+
Esempi:
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
import { units } from "intlayer";
|
|
177
|
+
|
|
178
|
+
units(5, { unit: "kilometer", unitDisplay: "long", locale: "en-GB" }); // "5 kilometers"
|
|
179
|
+
units(1024, { unit: "byte", unitDisplay: "narrow" }); // "1,024B" (dipendente dalla localizzazione)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### `compact(value, options?)`
|
|
183
|
+
|
|
184
|
+
Formatta un numero usando la notazione compatta (es. `1.2K`, `1M`).
|
|
185
|
+
|
|
186
|
+
- **value**: `number | string`
|
|
187
|
+
- **options**: `Intl.NumberFormatOptions & { locale?: LocalesValues }` (usa internamente `notation: 'compact'`)
|
|
188
|
+
|
|
189
|
+
Esempi:
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
import { compact } from "intlayer";
|
|
193
|
+
|
|
194
|
+
compact(1200); // "1.2K"
|
|
195
|
+
compact("1000000", { locale: "fr", compactDisplay: "long" }); // "1 million"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Note
|
|
199
|
+
|
|
200
|
+
- Tutti gli helper accettano input di tipo `string`; internamente vengono convertiti in numeri o date.
|
|
201
|
+
- La locale predefinita è quella configurata in `internationalization.defaultLocale` se non specificata.
|
|
202
|
+
- Queste utility sono semplici wrapper; per formattazioni avanzate, passa le opzioni standard di `Intl`.
|
|
203
|
+
|
|
204
|
+
## Punti di ingresso e re-export (`@index.ts`)
|
|
205
|
+
|
|
206
|
+
I formatter risiedono nel pacchetto core e sono re-esportati da pacchetti di livello superiore per mantenere gli import ergonomici attraverso i runtime:
|
|
207
|
+
|
|
208
|
+
Esempi:
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
// Codice dell'app (consigliato)
|
|
212
|
+
import { number, currency, date, Intl } from "intlayer";
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### React
|
|
216
|
+
|
|
217
|
+
Componenti client:
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { useNumber, useCurrency, useDate } from "react-intlayer/format";
|
|
221
|
+
// oppure nelle app Next.js
|
|
222
|
+
import { useNumber, useCurrency, useDate } from "next-intlayer/client/format";
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Componenti server (o runtime React Server):
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
import { useNumber, useCurrency, useDate } from "intlayer/server/format";
|
|
229
|
+
// oppure nelle app Next.js
|
|
230
|
+
import { useNumber, useCurrency, useDate } from "next-intlayer/server/format";
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
> Questi hook considereranno la locale fornita da `IntlayerProvider` o `IntlayerServerProvider`
|
|
234
|
+
|
|
235
|
+
## Cronologia della documentazione
|
|
236
|
+
|
|
237
|
+
| Versione | Data | Modifiche |
|
|
238
|
+
| -------- | ---------- | ------------------------------------- |
|
|
239
|
+
| 5.8.0 | 2025-08-18 | Aggiunta documentazione dei formatter |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-14
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-08-20
|
|
4
4
|
title: Interesse di Intlayer
|
|
5
5
|
description: Scopri i benefici e i vantaggi dell'utilizzo di Intlayer nei tuoi progetti. Comprendi perché Intlayer si distingue tra gli altri framework.
|
|
6
6
|
keywords:
|
|
@@ -11,41 +11,104 @@ keywords:
|
|
|
11
11
|
- Confronto
|
|
12
12
|
slugs:
|
|
13
13
|
- doc
|
|
14
|
-
-
|
|
15
|
-
- interest
|
|
14
|
+
- why
|
|
16
15
|
---
|
|
17
16
|
|
|
18
|
-
#
|
|
17
|
+
# Perché dovresti considerare Intlayer?
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
## Cos'è Intlayer?
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
**Intlayer** è una libreria di internazionalizzazione progettata specificamente per sviluppatori JavaScript. Permette la dichiarazione del tuo contenuto ovunque nel tuo codice. Converte le dichiarazioni di contenuti multilingue in dizionari strutturati per integrarsi facilmente nel tuo codice. Utilizzando TypeScript, **Intlayer** rende il tuo sviluppo più solido ed efficiente.
|
|
22
|
+
|
|
23
|
+
## Perché è stato creato Intlayer?
|
|
24
|
+
|
|
25
|
+
Intlayer è stato creato per risolvere un problema comune che interessa tutte le librerie i18n più diffuse come `next-intl`, `react-i18next`, `react-intl`, `next-i18next`, `react-intl` e `vue-i18n`.
|
|
26
|
+
|
|
27
|
+
Tutte queste soluzioni adottano un approccio centralizzato per elencare e gestire i tuoi contenuti. Per esempio:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
.
|
|
31
|
+
├── locales
|
|
32
|
+
│ ├── en.json
|
|
33
|
+
│ ├── fr.json
|
|
34
|
+
│ └── es.json
|
|
35
|
+
├── i18n.ts
|
|
36
|
+
└── src
|
|
37
|
+
└── components
|
|
38
|
+
└── MyComponent
|
|
39
|
+
└── index.tsx
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Oppure qui usando i namespace:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
.
|
|
46
|
+
├── locales
|
|
47
|
+
│ ├── en
|
|
48
|
+
│ │ ├── footer.json
|
|
49
|
+
│ │ └── navbar.json
|
|
50
|
+
│ ├── fr
|
|
51
|
+
│ │ ├── footer.json
|
|
52
|
+
│ │ └── navbar.json
|
|
53
|
+
│ └── es
|
|
54
|
+
│ ├── footer.json
|
|
55
|
+
│ └── navbar.json
|
|
56
|
+
├── i18n.ts
|
|
57
|
+
└── src
|
|
58
|
+
└── components
|
|
59
|
+
└── MyComponent
|
|
60
|
+
└── index.tsx
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Questo tipo di architettura rallenta il processo di sviluppo e rende la codebase più complessa da mantenere per diversi motivi:
|
|
64
|
+
|
|
65
|
+
1. **Per ogni nuovo componente creato, dovresti:**
|
|
66
|
+
- Creare la nuova risorsa/namespace nella cartella `locales`
|
|
67
|
+
- Ricordarti di importare il nuovo namespace nella tua pagina
|
|
68
|
+
- Tradurre i tuoi contenuti (spesso fatto manualmente tramite copia/incolla da fornitori AI)
|
|
69
|
+
|
|
70
|
+
2. **Per ogni modifica apportata ai tuoi componenti, dovresti:**
|
|
71
|
+
- Cercare la risorsa/namespace correlata (lontano dal componente)
|
|
72
|
+
- Tradurre i tuoi contenuti
|
|
73
|
+
- Assicurarti che i tuoi contenuti siano aggiornati per ogni locale
|
|
74
|
+
- Verificare che il tuo namespace non includa chiavi/valori inutilizzati
|
|
75
|
+
- Assicurarti che la struttura dei tuoi file JSON sia la stessa per tutti i locali
|
|
76
|
+
|
|
77
|
+
Nei progetti professionali che utilizzano queste soluzioni, spesso si ricorre a piattaforme di localizzazione per aiutare a gestire la traduzione dei contenuti. Tuttavia, questo può diventare rapidamente costoso per progetti di grandi dimensioni.
|
|
78
|
+
|
|
79
|
+
Per risolvere questo problema, Intlayer adotta un approccio che delimita i contenuti per componente e mantiene i contenuti vicini al componente stesso, come spesso facciamo con il CSS (`styled-components`), i tipi, la documentazione (`storybook`) o i test unitari (`jest`).
|
|
23
80
|
|
|
24
81
|
```bash codeFormat="typescript"
|
|
25
82
|
.
|
|
26
|
-
└──
|
|
83
|
+
└── components
|
|
27
84
|
└── MyComponent
|
|
28
85
|
├── index.content.ts
|
|
86
|
+
├── index.test.tsx
|
|
87
|
+
├── index.stories.tsx
|
|
29
88
|
└── index.tsx
|
|
30
89
|
```
|
|
31
90
|
|
|
32
91
|
```bash codeFormat="commonjs"
|
|
33
92
|
.
|
|
34
|
-
└──
|
|
93
|
+
└── components
|
|
35
94
|
└── MyComponent
|
|
36
95
|
├── index.content.cjs
|
|
37
|
-
|
|
96
|
+
├── index.test.mjs
|
|
97
|
+
├── index.stories.mjs
|
|
98
|
+
└── index.tsx
|
|
38
99
|
```
|
|
39
100
|
|
|
40
101
|
```bash codeFormat="esm"
|
|
41
102
|
.
|
|
42
|
-
└──
|
|
103
|
+
└── components
|
|
43
104
|
└── MyComponent
|
|
44
105
|
├── index.content.mjs
|
|
45
|
-
|
|
106
|
+
├── index.test.mjs
|
|
107
|
+
├── index.stories.mjs
|
|
108
|
+
└── index.tsx
|
|
46
109
|
```
|
|
47
110
|
|
|
48
|
-
```tsx fileName="./
|
|
111
|
+
```tsx fileName="./components/MyComponent/index.content.ts" codeFormat="typescript"
|
|
49
112
|
import { t, type Dictionary } from "intlayer";
|
|
50
113
|
|
|
51
114
|
const componentExampleContent = {
|
|
@@ -53,8 +116,8 @@ const componentExampleContent = {
|
|
|
53
116
|
content: {
|
|
54
117
|
myTranslatedContent: t({
|
|
55
118
|
en: "Hello World",
|
|
56
|
-
fr: "Bonjour le monde",
|
|
57
119
|
es: "Hola Mundo",
|
|
120
|
+
fr: "Bonjour le monde",
|
|
58
121
|
}),
|
|
59
122
|
},
|
|
60
123
|
} satisfies Dictionary;
|
|
@@ -62,18 +125,17 @@ const componentExampleContent = {
|
|
|
62
125
|
export default componentExampleContent;
|
|
63
126
|
```
|
|
64
127
|
|
|
65
|
-
```jsx fileName="./
|
|
128
|
+
```jsx fileName="./components/MyComponent/index.mjx" codeFormat="esm"
|
|
66
129
|
import { t } from "intlayer";
|
|
67
130
|
|
|
68
131
|
/** @type {import('intlayer').Dictionary} */
|
|
69
|
-
// Dizionario di esempio per il componente
|
|
70
132
|
const componentExampleContent = {
|
|
71
133
|
key: "component-example",
|
|
72
134
|
content: {
|
|
73
135
|
myTranslatedContent: t({
|
|
74
136
|
en: "Hello World",
|
|
75
|
-
fr: "Bonjour le monde",
|
|
76
137
|
es: "Hola Mundo",
|
|
138
|
+
fr: "Bonjour le monde",
|
|
77
139
|
}),
|
|
78
140
|
},
|
|
79
141
|
};
|
|
@@ -81,18 +143,18 @@ const componentExampleContent = {
|
|
|
81
143
|
export default componentExampleContent;
|
|
82
144
|
```
|
|
83
145
|
|
|
84
|
-
```jsx fileName="./
|
|
146
|
+
```jsx fileName="./components/MyComponent/index.csx" codeFormat="commonjs"
|
|
85
147
|
const { t } = require("intlayer");
|
|
86
148
|
|
|
87
149
|
/** @type {import('intlayer').Dictionary} */
|
|
88
|
-
// Dizionario
|
|
150
|
+
// Dizionario dei contenuti tradotti per il componente
|
|
89
151
|
const componentExampleContent = {
|
|
90
152
|
key: "component-example",
|
|
91
153
|
content: {
|
|
92
154
|
myTranslatedContent: t({
|
|
93
155
|
en: "Hello World",
|
|
94
|
-
fr: "Bonjour le monde",
|
|
95
156
|
es: "Hola Mundo",
|
|
157
|
+
fr: "Bonjour le monde",
|
|
96
158
|
}),
|
|
97
159
|
},
|
|
98
160
|
};
|
|
@@ -100,7 +162,7 @@ const componentExampleContent = {
|
|
|
100
162
|
module.exports = componentExampleContent;
|
|
101
163
|
```
|
|
102
164
|
|
|
103
|
-
```tsx fileName="./
|
|
165
|
+
```tsx fileName="./components/MyComponent/index.tsx" codeFormat="typescript"
|
|
104
166
|
import { useIntlayer } from "react-intlayer";
|
|
105
167
|
|
|
106
168
|
export const ComponentExample = () => {
|
|
@@ -110,7 +172,7 @@ export const ComponentExample = () => {
|
|
|
110
172
|
};
|
|
111
173
|
```
|
|
112
174
|
|
|
113
|
-
```jsx fileName="./
|
|
175
|
+
```jsx fileName="./components/MyComponent/index.mjx" codeFormat="esm"
|
|
114
176
|
import { useIntlayer } from "react-intlayer";
|
|
115
177
|
|
|
116
178
|
const ComponentExample = () => {
|
|
@@ -120,7 +182,7 @@ const ComponentExample = () => {
|
|
|
120
182
|
};
|
|
121
183
|
```
|
|
122
184
|
|
|
123
|
-
```jsx fileName="./
|
|
185
|
+
```jsx fileName="./components/MyComponent/index.csx" codeFormat="commonjs"
|
|
124
186
|
const { useIntlayer } = require("react-intlayer");
|
|
125
187
|
|
|
126
188
|
const ComponentExample = () => {
|
|
@@ -130,27 +192,79 @@ const ComponentExample = () => {
|
|
|
130
192
|
};
|
|
131
193
|
```
|
|
132
194
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
195
|
+
Questo approccio ti permette di:
|
|
196
|
+
|
|
197
|
+
1. **Aumentare la velocità di sviluppo**
|
|
198
|
+
- I file `.content.{{ts|mjs|cjs|json}}` possono essere creati utilizzando un'estensione di VSCode
|
|
199
|
+
- Gli strumenti di completamento automatico basati su AI nel tuo IDE (come GitHub Copilot) possono aiutarti a dichiarare il tuo contenuto, riducendo il copia/incolla
|
|
200
|
+
|
|
201
|
+
2. **Ridurre la complessità della tua codebase**
|
|
202
|
+
|
|
203
|
+
3. **Aumentare la manutenibilità della tua codebase**
|
|
204
|
+
|
|
205
|
+
4. **Duplicare i tuoi componenti e i loro contenuti correlati più facilmente (esempio: componenti di login/registrazione, ecc.)**
|
|
206
|
+
- Limitando il rischio di impattare il contenuto di altri componenti
|
|
207
|
+
- Copiando/incollando il tuo contenuto da un'applicazione all'altra senza dipendenze esterne
|
|
208
|
+
|
|
209
|
+
5. **Evitare di inquinare la tua codebase con chiavi/valori inutilizzati per componenti non usati**
|
|
210
|
+
- Se non usi un componente, non devi importarne il contenuto
|
|
211
|
+
- Se elimini un componente, ti sarà più facile ricordarti di rimuovere il suo contenuto correlato poiché sarà presente nella stessa cartella
|
|
212
|
+
|
|
213
|
+
6. **Ridurre il costo di ragionamento per gli agenti AI nella dichiarazione del tuo contenuto multilingue**
|
|
214
|
+
- L'agente AI non dovrà scansionare l'intera codebase per sapere dove implementare il tuo contenuto
|
|
215
|
+
- Le traduzioni possono essere facilmente effettuate dagli strumenti di completamento automatico basati su AI nel tuo IDE (come GitHub Copilot)
|
|
216
|
+
|
|
217
|
+
7. **Ottimizzare le prestazioni di caricamento**
|
|
218
|
+
- Se un componente viene caricato in modo lazy, il suo contenuto correlato sarà caricato contemporaneamente
|
|
219
|
+
|
|
220
|
+
## Funzionalità aggiuntive di Intlayer
|
|
221
|
+
|
|
222
|
+
| Funzionalità | Descrizione |
|
|
223
|
+
| ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
224
|
+
|  | **Supporto Cross-Framework**<br><br>Intlayer è compatibile con tutti i principali framework e librerie, inclusi Next.js, React, Vite, Vue.js, Nuxt, Preact, Express e altri ancora. |
|
|
225
|
+
|  | **Gestione dei Contenuti con JavaScript**<br><br>Sfrutta la flessibilità di JavaScript per definire e gestire i tuoi contenuti in modo efficiente. <br><br> - [Dichiarazione dei contenuti](https://intlayer.org/doc/concept/content) |
|
|
226
|
+
|  | **File di Dichiarazione del Contenuto per Locale**<br><br>Accelera il tuo sviluppo dichiarando il contenuto una sola volta, prima della generazione automatica.<br><br> - [File di Dichiarazione del Contenuto per Locale](https://intlayer.org/doc/concept/per-locale-file) |
|
|
227
|
+
|  | **Ambiente Type-Safe**<br><br>Sfrutta TypeScript per garantire che le tue definizioni di contenuto e il codice siano privi di errori, beneficiando anche dell'autocompletamento nell'IDE.<br><br> - [Configurazione di TypeScript](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
|
|
228
|
+
|  | **Configurazione Semplificata**<br><br>Inizia rapidamente con una configurazione minima. Regola facilmente le impostazioni per l'internazionalizzazione, il routing, l'IA, la build e la gestione dei contenuti.<br><br> - [Esplora l'integrazione con Next.js](https://intlayer.org/doc/environment/nextjs) |
|
|
229
|
+
|  | **Recupero Contenuti Semplificato**<br><br>Non è necessario chiamare la tua funzione `t` per ogni singolo contenuto. Recupera tutto il tuo contenuto direttamente usando un singolo hook.<br><br> - [Integrazione React](https://intlayer.org/doc/environment/create-react-app) |
|
|
230
|
+
|  | **Implementazione Coerente dei Componenti Server**<br><br>Perfettamente adatto per i componenti server di Next.js, utilizza la stessa implementazione sia per i componenti client che per quelli server, senza bisogno di passare la tua funzione `t` attraverso ogni componente server. <br><br> - [Componenti Server](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
|
|
231
|
+
|  | **Codebase Organizzato**<br><br>Tieni il tuo codice più organizzato: 1 componente = 1 dizionario nella stessa cartella. Le traduzioni vicine ai rispettivi componenti migliorano la manutenibilità e la chiarezza. <br><br> - [Come funziona Intlayer](https://intlayer.org/doc/concept/how-works-intlayer) |
|
|
232
|
+
|  | **Routing Avanzato**<br><br>Pieno supporto al routing dell'app, adattandosi perfettamente a strutture applicative complesse, per Next.js, React, Vite, Vue.js, ecc.<br><br> - [Esplora l'integrazione con Next.js](https://intlayer.org/doc/environment/nextjs) |
|
|
233
|
+
|  | **Supporto Markdown**<br><br>Importa e interpreta file di localizzazione e Markdown remoto per contenuti multilingue come politiche sulla privacy, documentazione, ecc. Interpreta e rendi accessibili i metadati Markdown nel tuo codice.<br><br> - [File di contenuto](https://intlayer.org/doc/concept/content/file) |
|
|
234
|
+
|  | **Editor Visivo e CMS Gratuiti**<br><br>Un editor visivo gratuito e un CMS sono disponibili per i content writer, eliminando la necessità di una piattaforma di localizzazione. Mantieni il tuo contenuto sincronizzato usando Git, oppure esternalizzalo totalmente o parzialmente con il CMS.<br><br> - [Editor Intlayer](https://intlayer.org/doc/concept/editor) <br> - [CMS Intlayer](https://intlayer.org/doc/concept/cms) |
|
|
235
|
+
|  | **Contenuto Tree-shakable**<br><br>Contenuto tree-shakable, che riduce la dimensione del bundle finale. Carica il contenuto per componente, escludendo qualsiasi contenuto non utilizzato dal tuo bundle. Supporta il lazy loading per migliorare l'efficienza del caricamento dell'app. <br><br> - [Ottimizzazione della build dell'app](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
|
|
236
|
+
|  | **Rendering Statico**<br><br>Non blocca il Rendering Statico. <br><br> - [Integrazione Next.js](https://intlayer.org/doc/environment/nextjs) |
|
|
237
|
+
|  | **Traduzione Potenziata dall'IA**<br><br>Trasforma il tuo sito web in 231 lingue con un solo clic utilizzando gli avanzati strumenti di traduzione potenziati dall'IA di Intlayer, sfruttando il tuo provider IA/chiave API personale. <br><br> - [Integrazione CI/CD](https://intlayer.org/doc/concept/ci-cd) <br> - [CLI di Intlayer](https://intlayer.org/doc/concept/cli) <br> - [Compilazione automatica](https://intlayer.org/doc/concept/auto-fill) |
|
|
238
|
+
|  | **Integrazione Server MCP**<br><br>Fornisce un server MCP (Model Context Protocol) per l'automazione dell'IDE, consentendo una gestione dei contenuti e flussi di lavoro i18n senza interruzioni direttamente all'interno del tuo ambiente di sviluppo. <br><br> - [Server MCP](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/mcp_server.md) |
|
|
239
|
+
|  | **Estensione VSCode**<br><br>Intlayer fornisce un'estensione per VSCode per aiutarti a gestire i tuoi contenuti e traduzioni, costruire i tuoi dizionari, tradurre i tuoi contenuti e altro ancora. <br><br> - [Estensione VSCode](https://intlayer.org/doc/vs-code-extension) |
|
|
240
|
+
|  | **Interoperabilità**<br><br>Consente l'interoperabilità con react-i18next, next-i18next, next-intl e react-intl. <br><br> - [Intlayer e react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer e next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer e next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) |
|
|
241
|
+
|
|
242
|
+
## Confronto di Intlayer con altre soluzioni
|
|
243
|
+
|
|
244
|
+
| Funzionalità | Intlayer | React-i18next / i18next | React-Intl (FormatJS) | LinguiJS | next-intl | next-i18next | vue-i18n |
|
|
245
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
246
|
+
| **Traduzioni Vicino ai Componenti** | Sì, contenuto collocato con ogni componente | No | No | No | No | No | Sì - usando `Single File Components` (SFCs) |
|
|
247
|
+
| **Integrazione TypeScript** | Avanzata, tipi rigorosi generati automaticamente | Base; configurazione extra per sicurezza | Buona, ma meno rigorosa | Tipizzazioni, necessita configurazione | Buona | Base | Buona (tipi disponibili; sicurezza delle chiavi necessita configurazione) |
|
|
248
|
+
| **Rilevamento Traduzioni Mancanti** | Errore/avviso in fase di compilazione | Principalmente stringhe di fallback a runtime | Stringhe di fallback | Richiede configurazione aggiuntiva | Fallback a runtime | Fallback a runtime | Fallback/avvisi a runtime (configurabile) |
|
|
249
|
+
| **Contenuti Ricchi (JSX/Markdown/componenti)** | Supporto diretto, anche per nodi React | Limitato / solo interpolazione | Sintassi ICU, non vero JSX | Limitato | Non progettato per nodi ricchi | Limitato | Limitato (componenti tramite `<i18n-t>`, Markdown tramite plugin) |
|
|
250
|
+
| **Traduzione basata su AI** | Sì, supporta più provider AI. Utilizzabile con le proprie chiavi API. Considera il contesto della tua applicazione e l'ambito del contenuto | No | No | No | No | No | No |
|
|
251
|
+
| **Editor Visivo** | Sì, Editor Visivo locale + CMS opzionale; può esternalizzare il contenuto del codice; integrabile | No / disponibile tramite piattaforme di localizzazione esterne | No / disponibile tramite piattaforme di localizzazione esterne | No / disponibile tramite piattaforme di localizzazione esterne | No / disponibile tramite piattaforme di localizzazione esterne | No / disponibile tramite piattaforme di localizzazione esterne | No / disponibile tramite piattaforme di localizzazione esterne |
|
|
252
|
+
| **Routing Localizzato** | Integrato, supporto middleware | Plugin o configurazione manuale | Non integrato | Plugin/configurazione manuale | Integrato | Integrato | Manuale tramite Vue Router (gestito da Nuxt i18n) |
|
|
253
|
+
| **Generazione Dinamica delle Rotte** | Sì | Plugin/ecosistema o configurazione manuale | Non fornito | Plugin/manuale | Sì | Sì | Non fornito (fornito da Nuxt i18n) |
|
|
254
|
+
| **Pluralizzazione** | Modelli basati su enumerazione; vedere la documentazione | Configurabile (plugin come i18next-icu) | Avanzato (ICU) | Avanzato (ICU/messageformat) | Buono | Buono | Avanzato (regole di plurale integrate) |
|
|
255
|
+
| **Formattazione (date, numeri, valute)** | Formatter ottimizzati (Intl sotto il cofano) | Tramite plugin o uso personalizzato di Intl | Formatter ICU avanzati | Helper ICU/CLI | Buono (helper Intl) | Buono (helper Intl) | Formatter integrati per date/numeri (Intl) |
|
|
256
|
+
| **Formato del Contenuto** | .tsx, .ts, .js, .json, .md, .txt | .json | .json, .js | .po, .json | .json, .js, .ts | .json | .json, .js |
|
|
257
|
+
| **Supporto ICU** | In lavorazione (ICU nativo) | Tramite plugin (i18next-icu) | Sì | Sì | Sì | Tramite plugin (i18next-icu) | Tramite formatter/compiler personalizzato |
|
|
258
|
+
| **Helper SEO (hreflang, sitemap)** | Strumenti integrati: helper per sitemap, **robots.txt**, metadata | Plugin della community/manuale | Non core | Non core | Buono | Buono | Non core (Nuxt i18n fornisce helper) |
|
|
259
|
+
| **Ecosistema / Comunità** | Più piccolo ma in rapida crescita e reattivo | Il più grande e maturo | Grande, enterprise | In crescita, più piccolo | Di medie dimensioni, focalizzato su Next.js | Di medie dimensioni, focalizzato su Next.js | Grande nell'ecosistema Vue |
|
|
260
|
+
| **Rendering lato server e Componenti Server** | Sì, ottimizzato per SSR / Componenti Server di React | Supportato, necessita di qualche configurazione | Supportato in Next.js | Supportato | Supporto completo | Supporto completo | SSR tramite Nuxt/Vue SSR (senza RSC) |
|
|
261
|
+
| **Tree-shaking (caricamento solo del contenuto utilizzato)** | Sì, per componente al momento della build tramite plugin Babel/SWC | Di solito carica tutto (può essere migliorato con namespace/code-splitting) | Di solito carica tutto | Non di default | Parziale | Parziale | Parziale (con code-splitting/configurazione manuale) |
|
|
262
|
+
| **Caricamento lazy** | Sì, per locale/per componente | Sì (es. backend/namespace su richiesta) | Sì (bundle di locale suddivisi) | Sì (import dinamico del catalogo) | Sì (per rotta/per locale) | Sì (per rotta/per locale) | Sì (messaggi di locale asincroni) |
|
|
263
|
+
| **Gestione di Grandi Progetti** | Incoraggia la modularità, adatto per design-system | Richiede una buona disciplina dei file | I cataloghi centrali possono diventare grandi | Può diventare complesso | Modulare con configurazione | Modulare con configurazione | Modulare con configurazione Vue Router/Nuxt i18n |
|
|
264
|
+
|
|
265
|
+
## Storia del Documento
|
|
266
|
+
|
|
267
|
+
| Versione | Data | Modifiche |
|
|
268
|
+
| -------- | ---------- | --------------------------------- |
|
|
269
|
+
| 5.8.0 | 2025-08-19 | Aggiornamento tabella comparativa |
|
|
270
|
+
| 5.5.10 | 2025-06-29 | Inizializzazione della storia |
|
package/docs/it/introduction.md
CHANGED
|
@@ -44,8 +44,8 @@ const componentContent = {
|
|
|
44
44
|
content: {
|
|
45
45
|
myTranslatedContent: t({
|
|
46
46
|
en: "Hello World",
|
|
47
|
-
fr: "Bonjour le monde",
|
|
48
47
|
es: "Hola Mundo",
|
|
48
|
+
fr: "Bonjour le monde",
|
|
49
49
|
}),
|
|
50
50
|
},
|
|
51
51
|
} satisfies Dictionary;
|
|
@@ -63,8 +63,8 @@ const componentContent = {
|
|
|
63
63
|
content: {
|
|
64
64
|
myTranslatedContent: t({
|
|
65
65
|
en: "Hello World",
|
|
66
|
-
fr: "Bonjour le monde",
|
|
67
66
|
es: "Hola Mundo",
|
|
67
|
+
fr: "Bonjour le monde",
|
|
68
68
|
}),
|
|
69
69
|
},
|
|
70
70
|
};
|
|
@@ -82,8 +82,8 @@ const componentContent = {
|
|
|
82
82
|
content: {
|
|
83
83
|
myTranslatedContent: t({
|
|
84
84
|
en: "Hello World",
|
|
85
|
-
fr: "Bonjour le monde",
|
|
86
85
|
es: "Hola Mundo",
|
|
86
|
+
fr: "Bonjour le monde",
|
|
87
87
|
}),
|
|
88
88
|
},
|
|
89
89
|
};
|