@intlayer/docs 7.0.4 → 7.0.6
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_i18next.md +72 -19
- package/blog/ar/intlayer_with_next-i18next.md +61 -36
- package/blog/ar/intlayer_with_next-intl.md +61 -13
- package/blog/ar/intlayer_with_react-i18next.md +67 -18
- package/blog/ar/intlayer_with_react-intl.md +66 -13
- package/blog/ar/intlayer_with_vue-i18n.md +180 -0
- package/blog/de/intlayer_with_i18next.md +61 -26
- package/blog/de/intlayer_with_next-i18next.md +66 -17
- package/blog/de/intlayer_with_next-intl.md +62 -13
- package/blog/de/intlayer_with_react-i18next.md +66 -17
- package/blog/de/intlayer_with_react-intl.md +66 -14
- package/blog/de/intlayer_with_vue-i18n.md +178 -0
- package/blog/en/intlayer_with_i18next.md +53 -2
- package/blog/en/intlayer_with_next-i18next.md +52 -16
- package/blog/en/intlayer_with_next-intl.md +49 -0
- package/blog/en/intlayer_with_react-i18next.md +50 -1
- package/blog/en/intlayer_with_react-intl.md +53 -0
- package/blog/en/intlayer_with_vue-i18n.md +178 -0
- package/blog/en-GB/intlayer_with_i18next.md +58 -7
- package/blog/en-GB/intlayer_with_next-i18next.md +55 -9
- package/blog/en-GB/intlayer_with_next-intl.md +55 -6
- package/blog/en-GB/intlayer_with_react-i18next.md +55 -6
- package/blog/en-GB/intlayer_with_react-intl.md +56 -3
- package/blog/en-GB/intlayer_with_vue-i18n.md +180 -0
- package/blog/es/intlayer_with_i18next.md +69 -18
- package/blog/es/intlayer_with_next-i18next.md +70 -24
- package/blog/es/intlayer_with_next-intl.md +64 -13
- package/blog/es/intlayer_with_react-i18next.md +61 -12
- package/blog/es/intlayer_with_react-intl.md +65 -12
- package/blog/es/intlayer_with_vue-i18n.md +178 -0
- package/blog/fr/intlayer_with_i18next.md +77 -16
- package/blog/fr/intlayer_with_next-i18next.md +55 -31
- package/blog/fr/intlayer_with_next-intl.md +57 -7
- package/blog/fr/intlayer_with_react-i18next.md +64 -7
- package/blog/fr/intlayer_with_react-intl.md +63 -10
- package/blog/fr/intlayer_with_vue-i18n.md +178 -0
- package/blog/hi/intlayer_with_i18next.md +67 -16
- package/blog/hi/intlayer_with_next-i18next.md +69 -23
- package/blog/hi/intlayer_with_next-intl.md +61 -8
- package/blog/hi/intlayer_with_react-i18next.md +63 -14
- package/blog/hi/intlayer_with_react-intl.md +66 -13
- package/blog/hi/intlayer_with_vue-i18n.md +180 -0
- package/blog/id/intlayer_with_i18next.md +65 -14
- package/blog/id/intlayer_with_next-i18next.md +58 -12
- package/blog/id/intlayer_with_next-intl.md +60 -11
- package/blog/id/intlayer_with_react-i18next.md +59 -10
- package/blog/id/intlayer_with_react-intl.md +66 -13
- package/blog/id/intlayer_with_vue-i18n.md +178 -0
- package/blog/it/intlayer_with_i18next.md +70 -19
- package/blog/it/intlayer_with_next-i18next.md +68 -22
- package/blog/it/intlayer_with_next-intl.md +62 -12
- package/blog/it/intlayer_with_react-i18next.md +65 -16
- package/blog/it/intlayer_with_react-intl.md +67 -14
- package/blog/it/intlayer_with_vue-i18n.md +178 -0
- package/blog/ja/intlayer_with_i18next.md +74 -24
- package/blog/ja/intlayer_with_next-i18next.md +60 -37
- package/blog/ja/intlayer_with_next-intl.md +63 -15
- package/blog/ja/intlayer_with_react-i18next.md +70 -21
- package/blog/ja/intlayer_with_react-intl.md +73 -21
- package/blog/ja/intlayer_with_vue-i18n.md +180 -0
- package/blog/ko/intlayer_with_i18next.md +60 -29
- package/blog/ko/intlayer_with_next-i18next.md +59 -32
- package/blog/ko/intlayer_with_next-intl.md +52 -23
- package/blog/ko/intlayer_with_react-i18next.md +65 -16
- package/blog/ko/intlayer_with_react-intl.md +74 -22
- package/blog/ko/intlayer_with_vue-i18n.md +180 -0
- package/blog/pl/intlayer_with_i18next.md +63 -12
- package/blog/pl/intlayer_with_next-i18next.md +74 -17
- package/blog/pl/intlayer_with_next-intl.md +59 -8
- package/blog/pl/intlayer_with_react-i18next.md +59 -10
- package/blog/pl/intlayer_with_react-intl.md +65 -12
- package/blog/pl/intlayer_with_vue-i18n.md +180 -0
- package/blog/pt/intlayer_with_i18next.md +67 -16
- package/blog/pt/intlayer_with_next-i18next.md +65 -19
- package/blog/pt/intlayer_with_next-intl.md +62 -12
- package/blog/pt/intlayer_with_react-i18next.md +67 -18
- package/blog/pt/intlayer_with_react-intl.md +62 -10
- package/blog/pt/intlayer_with_vue-i18n.md +178 -0
- package/blog/ru/intlayer_with_i18next.md +68 -15
- package/blog/ru/intlayer_with_next-i18next.md +71 -25
- package/blog/ru/intlayer_with_next-intl.md +56 -7
- package/blog/ru/intlayer_with_react-i18next.md +65 -16
- package/blog/ru/intlayer_with_react-intl.md +69 -16
- package/blog/ru/intlayer_with_vue-i18n.md +180 -0
- package/blog/tr/intlayer_with_i18next.md +67 -16
- package/blog/tr/intlayer_with_next-i18next.md +78 -21
- package/blog/tr/intlayer_with_next-intl.md +69 -18
- package/blog/tr/intlayer_with_react-i18next.md +65 -16
- package/blog/tr/intlayer_with_react-intl.md +71 -19
- package/blog/tr/intlayer_with_vue-i18n.md +180 -0
- package/blog/vi/intlayer_with_i18next.md +64 -13
- package/blog/vi/intlayer_with_next-i18next.md +72 -26
- package/blog/vi/intlayer_with_next-intl.md +62 -11
- package/blog/vi/intlayer_with_react-i18next.md +66 -17
- package/blog/vi/intlayer_with_react-intl.md +70 -17
- package/blog/vi/intlayer_with_vue-i18n.md +180 -0
- package/blog/zh/intlayer_with_i18next.md +67 -17
- package/blog/zh/intlayer_with_next-i18next.md +67 -22
- package/blog/zh/intlayer_with_next-intl.md +61 -13
- package/blog/zh/intlayer_with_react-i18next.md +67 -18
- package/blog/zh/intlayer_with_react-intl.md +69 -17
- package/blog/zh/intlayer_with_vue-i18n.md +180 -0
- package/dist/cjs/generated/blog.entry.cjs +19 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +19 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/docs/ar/intlayer_with_nextjs_15.md +36 -9
- package/docs/ar/intlayer_with_nextjs_16.md +36 -9
- package/docs/de/intlayer_with_nextjs_15.md +36 -9
- package/docs/de/intlayer_with_nextjs_16.md +24 -6
- package/docs/en/intlayer_with_nextjs_14.md +37 -9
- package/docs/en/intlayer_with_nextjs_15.md +40 -10
- package/docs/en/intlayer_with_nextjs_16.md +40 -10
- package/docs/en/plugins/sync-json.md +152 -55
- package/docs/en/releases/v7.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_15.md +36 -9
- package/docs/en-GB/intlayer_with_nextjs_16.md +36 -9
- package/docs/en-GB/releases/v7.md +1 -1
- package/docs/es/intlayer_with_nextjs_15.md +36 -9
- package/docs/es/intlayer_with_nextjs_16.md +36 -9
- package/docs/fr/intlayer_with_nextjs_15.md +36 -9
- package/docs/fr/intlayer_with_nextjs_16.md +37 -24
- package/docs/hi/intlayer_with_nextjs_15.md +36 -9
- package/docs/hi/intlayer_with_nextjs_16.md +36 -9
- package/docs/id/intlayer_with_nextjs_16.md +36 -9
- package/docs/it/intlayer_with_nextjs_15.md +36 -9
- package/docs/it/intlayer_with_nextjs_16.md +36 -9
- package/docs/ja/intlayer_with_nextjs_15.md +36 -9
- package/docs/ja/intlayer_with_nextjs_16.md +36 -9
- package/docs/ko/intlayer_with_nextjs_15.md +36 -9
- package/docs/ko/intlayer_with_nextjs_16.md +36 -9
- package/docs/pl/intlayer_with_nextjs_16.md +36 -9
- package/docs/pt/intlayer_with_nextjs_15.md +36 -9
- package/docs/pt/intlayer_with_nextjs_16.md +36 -9
- package/docs/ru/intlayer_with_nextjs_15.md +36 -9
- package/docs/ru/intlayer_with_nextjs_16.md +36 -9
- package/docs/tr/intlayer_with_nextjs_15.md +36 -9
- package/docs/tr/intlayer_with_nextjs_16.md +39 -21
- package/docs/vi/intlayer_with_nextjs_16.md +36 -9
- package/docs/zh/intlayer_with_nextjs_15.md +36 -9
- package/docs/zh/intlayer_with_nextjs_16.md +36 -9
- package/package.json +14 -14
- package/src/generated/blog.entry.ts +19 -0
|
@@ -55,15 +55,68 @@ pnpm add -D @intlayer/sync-json-plugin
|
|
|
55
55
|
npm i -D @intlayer/sync-json-plugin
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Plugins
|
|
59
|
+
|
|
60
|
+
This package provides two plugins:
|
|
61
|
+
|
|
62
|
+
- `loadJSON`: Load JSON files into Intlayer dictionaries.
|
|
63
|
+
- This plugin is used to load JSON files from a source and will be loaded into Intlayer dictionaries. It can scan all the codebase and search for specific JSON files.
|
|
64
|
+
This plugin can be used
|
|
65
|
+
- if you use an i18n library that impose a specific location for your JSON to be loaded (ex: `next-intl`, `i18next`, `react-intl`, `vue-i18n`, etc.), but you want to place your content declaration where you want in your code base.
|
|
66
|
+
- It can also be used if you want to fetch your messages from a remote source (ex: a CMS, a API, etc.) and store your messages in JSON files.
|
|
67
|
+
|
|
68
|
+
> Under the hood, this plugin will scan all the codebase and search for specific JSON files and load them into Intlayer dictionaries.
|
|
69
|
+
> Note that this plugin will not write the output and translations back to the JSON files.
|
|
70
|
+
|
|
71
|
+
- `syncJSON`: Synchronize JSON files with Intlayer dictionaries.
|
|
72
|
+
- This plugin is used to synchronize JSON files with Intlayer dictionaries. It can scan the given location and load the JSON that match the pattern for specific JSON files. This plugin is useful if you want to get the benefits of Intlayer while using another i18n library.
|
|
73
|
+
|
|
74
|
+
## Using both plugins
|
|
75
|
+
|
|
76
|
+
```ts fileName="intlayer.config.ts"
|
|
77
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
78
|
+
import { loadJSON, syncJSON } from "@intlayer/sync-json-plugin";
|
|
79
|
+
|
|
80
|
+
const config: IntlayerConfig = {
|
|
81
|
+
internationalization: {
|
|
82
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
83
|
+
defaultLocale: Locales.ENGLISH,
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
// Keep your current JSON files in sync with Intlayer dictionaries
|
|
87
|
+
plugins: [
|
|
88
|
+
/**
|
|
89
|
+
* Will load all the JSON files in the src that match the pattern {key}.i18n json
|
|
90
|
+
*/
|
|
91
|
+
loadJSON({
|
|
92
|
+
source: ({ key }) => `./src/**/${key}.i18n.json`,
|
|
93
|
+
locale: Locales.ENGLISH,
|
|
94
|
+
priority: 1, // Ensures these JSON files take precedence over files at `./locales/en/${key}.json`
|
|
95
|
+
}),
|
|
96
|
+
/**
|
|
97
|
+
* Will load, and write the output and translations back to the JSON files in the locales directory
|
|
98
|
+
*/
|
|
99
|
+
syncJSON({
|
|
100
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
101
|
+
priority: 0,
|
|
102
|
+
}),
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export default config;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## `syncJSON` plugin
|
|
110
|
+
|
|
111
|
+
### Quick start
|
|
59
112
|
|
|
60
113
|
Add the plugin to your `intlayer.config.ts` and point it at your existing JSON structure.
|
|
61
114
|
|
|
62
115
|
```ts fileName="intlayer.config.ts"
|
|
63
|
-
import {
|
|
116
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
64
117
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
65
118
|
|
|
66
|
-
|
|
119
|
+
const config: IntlayerConfig = {
|
|
67
120
|
internationalization: {
|
|
68
121
|
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
69
122
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -76,20 +129,33 @@ export default defineConfig({
|
|
|
76
129
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
77
130
|
}),
|
|
78
131
|
],
|
|
79
|
-
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export default config;
|
|
80
135
|
```
|
|
81
136
|
|
|
82
137
|
Alternative: single file per locale (common with i18next/react-intl setups):
|
|
83
138
|
|
|
84
139
|
```ts fileName="intlayer.config.ts"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
140
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
141
|
+
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
142
|
+
|
|
143
|
+
const config: IntlayerConfig = {
|
|
144
|
+
internationalization: {
|
|
145
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
146
|
+
defaultLocale: Locales.ENGLISH,
|
|
147
|
+
},
|
|
148
|
+
plugins: [
|
|
149
|
+
syncJSON({
|
|
150
|
+
source: ({ locale }) => `./locales/${locale}.json`,
|
|
151
|
+
}),
|
|
152
|
+
],
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export default config;
|
|
90
156
|
```
|
|
91
157
|
|
|
92
|
-
|
|
158
|
+
#### How it works
|
|
93
159
|
|
|
94
160
|
- Read: the plugin discovers JSON files from your `source` builder and loads them as Intlayer dictionaries.
|
|
95
161
|
- Write: after builds and fills, it writes localized JSON back to the same paths (with a final newline to avoid formatting issues).
|
|
@@ -105,24 +171,24 @@ syncJSON({
|
|
|
105
171
|
});
|
|
106
172
|
```
|
|
107
173
|
|
|
108
|
-
|
|
174
|
+
### Multiple JSON sources and priority
|
|
109
175
|
|
|
110
176
|
You can add multiple `syncJSON` plugins to synchronize different JSON sources. This is useful when you have multiple i18n libraries or different JSON structures in your project.
|
|
111
177
|
|
|
112
|
-
|
|
178
|
+
#### Priority system
|
|
113
179
|
|
|
114
180
|
When multiple plugins target the same dictionary key, the `priority` parameter determines which plugin takes precedence:
|
|
115
181
|
|
|
116
182
|
- Higher priority numbers win over lower ones
|
|
117
183
|
- Default priority of `.content` files is `0`
|
|
118
|
-
- Default priority of plugins
|
|
184
|
+
- Default priority of plugins is `0`
|
|
119
185
|
- Plugins with the same priority are processed in the order they appear in the configuration
|
|
120
186
|
|
|
121
187
|
```ts fileName="intlayer.config.ts"
|
|
122
|
-
import {
|
|
188
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
123
189
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
124
190
|
|
|
125
|
-
|
|
191
|
+
const config: IntlayerConfig = {
|
|
126
192
|
internationalization: {
|
|
127
193
|
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
128
194
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -150,74 +216,105 @@ export default defineConfig({
|
|
|
150
216
|
priority: 1,
|
|
151
217
|
}),
|
|
152
218
|
],
|
|
153
|
-
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export default config;
|
|
154
222
|
```
|
|
155
223
|
|
|
156
|
-
|
|
224
|
+
## Load JSON plugin
|
|
157
225
|
|
|
158
|
-
|
|
226
|
+
### Quick start
|
|
159
227
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
228
|
+
Add the plugin to your `intlayer.config.ts` to ingest existing JSON files as Intlayer dictionaries. This plugin is read‑only (no writes to disk):
|
|
229
|
+
|
|
230
|
+
```ts fileName="intlayer.config.ts"
|
|
231
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
232
|
+
import { loadJSON } from "@intlayer/sync-json-plugin";
|
|
163
233
|
|
|
164
|
-
|
|
234
|
+
const config: IntlayerConfig = {
|
|
235
|
+
internationalization: {
|
|
236
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
237
|
+
defaultLocale: Locales.ENGLISH,
|
|
238
|
+
},
|
|
165
239
|
|
|
166
|
-
|
|
240
|
+
plugins: [
|
|
241
|
+
// Ingest JSON messages located anywhere in your source tree
|
|
242
|
+
loadJSON({
|
|
243
|
+
source: ({ key }) => `./src/**/${key}.i18n.json`,
|
|
244
|
+
// Load a single locale per plugin instance (defaults to the config defaultLocale)
|
|
245
|
+
locale: Locales.ENGLISH,
|
|
246
|
+
priority: 0,
|
|
247
|
+
}),
|
|
248
|
+
],
|
|
249
|
+
};
|
|
167
250
|
|
|
168
|
-
|
|
251
|
+
export default config;
|
|
252
|
+
```
|
|
169
253
|
|
|
170
|
-
|
|
254
|
+
Alternative: per‑locale layout, still read‑only (only the selected locale is loaded):
|
|
171
255
|
|
|
172
256
|
```ts fileName="intlayer.config.ts"
|
|
173
|
-
import {
|
|
257
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
258
|
+
import { loadJSON } from "@intlayer/sync-json-plugin";
|
|
174
259
|
|
|
175
|
-
|
|
260
|
+
const config: IntlayerConfig = {
|
|
261
|
+
internationalization: {
|
|
262
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
263
|
+
defaultLocale: Locales.ENGLISH,
|
|
264
|
+
},
|
|
176
265
|
plugins: [
|
|
177
|
-
|
|
266
|
+
loadJSON({
|
|
267
|
+
// Only files for Locales.FRENCH will be loaded from this pattern
|
|
178
268
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
269
|
+
locale: Locales.FRENCH,
|
|
179
270
|
}),
|
|
180
271
|
],
|
|
181
272
|
};
|
|
273
|
+
|
|
274
|
+
export default config;
|
|
182
275
|
```
|
|
183
276
|
|
|
184
|
-
###
|
|
277
|
+
### How it works
|
|
185
278
|
|
|
186
|
-
|
|
279
|
+
- Discover: builds a glob from your `source` builder and collects matching JSON files.
|
|
280
|
+
- Ingest: loads each JSON file as an Intlayer dictionary with the provided `locale`.
|
|
281
|
+
- Read‑only: does not write or format output files; use `syncJSON` if you need round‑trip sync.
|
|
282
|
+
- Auto‑fill ready: defines a `fill` pattern so `intlayer content fill` can populate missing keys.
|
|
187
283
|
|
|
188
|
-
|
|
189
|
-
plugins: [
|
|
190
|
-
syncJSON({
|
|
191
|
-
source: ({ locale, key }) => `./messages/${locale}/${key}.json`,
|
|
192
|
-
}),
|
|
193
|
-
];
|
|
194
|
-
```
|
|
284
|
+
### API
|
|
195
285
|
|
|
196
|
-
|
|
286
|
+
```ts
|
|
287
|
+
loadJSON({
|
|
288
|
+
// Build paths to your JSON. `locale` is optional if your structure has no locale segment
|
|
289
|
+
source: ({ key, locale }) => string,
|
|
197
290
|
|
|
198
|
-
|
|
291
|
+
// Target locale for the dictionaries loaded by this plugin instance
|
|
292
|
+
// Defaults to configuration.internationalization.defaultLocale
|
|
293
|
+
locale?: Locale,
|
|
199
294
|
|
|
200
|
-
|
|
295
|
+
// Optional label to identify the source
|
|
296
|
+
location?: string, // default: "plugin"
|
|
201
297
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
source: ({ locale }) => `./locales/${locale}.json`,
|
|
206
|
-
}),
|
|
207
|
-
];
|
|
298
|
+
// Priority used for conflict resolution against other sources
|
|
299
|
+
priority?: number, // default: 0
|
|
300
|
+
});
|
|
208
301
|
```
|
|
209
302
|
|
|
210
|
-
###
|
|
303
|
+
### Behavior and conventions
|
|
211
304
|
|
|
212
|
-
|
|
305
|
+
- If your `source` mask includes a locale placeholder, only files for the selected `locale` are ingested.
|
|
306
|
+
- If there is no `{key}` segment in your mask, the dictionary key is "index".
|
|
307
|
+
- Keys are derived from file paths by substituting the `{key}` placeholder in your `source` builder.
|
|
308
|
+
- The plugin only uses discovered files and does not fabricate missing locales or keys.
|
|
309
|
+
- The `fill` path is inferred from your `source` and used to update missing values via CLI when you opt‑in.
|
|
213
310
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
311
|
+
## Conflict resolution
|
|
312
|
+
|
|
313
|
+
When the same translation key exists in multiple JSON sources:
|
|
314
|
+
|
|
315
|
+
1. The plugin with the highest priority determines the final value
|
|
316
|
+
2. Lower priority sources are used as fallbacks for missing keys
|
|
317
|
+
3. This allows you to maintain legacy translations while gradually migrating to new structures
|
|
221
318
|
|
|
222
319
|
## CLI
|
|
223
320
|
|
package/docs/en/releases/v7.md
CHANGED
|
@@ -31,7 +31,7 @@ Welcome to Intlayer v7! This major release introduces significant improvements i
|
|
|
31
31
|
- Improved TypeScript type generation with locale-specific types
|
|
32
32
|
- Bundle optimization: Locales as strings instead of enum
|
|
33
33
|
- New routing modes: `prefix-no-default`, `prefix-all`, `no-prefix`, `search-params`
|
|
34
|
-
- GDPR-compliant
|
|
34
|
+
- GDPR-compliant using localStorage
|
|
35
35
|
- Flexible storage configuration: cookies, localStorage, sessionStorage, or multiple
|
|
36
36
|
- 30% smaller Visual Editor package size
|
|
37
37
|
- Enhanced middleware configuration options
|
|
@@ -998,19 +998,28 @@ const sitemap = (): MetadataRoute.Sitemap => [
|
|
|
998
998
|
{
|
|
999
999
|
url: "https://example.com",
|
|
1000
1000
|
alternates: {
|
|
1001
|
-
languages: {
|
|
1001
|
+
languages: {
|
|
1002
|
+
...getMultilingualUrls("https://example.com"),
|
|
1003
|
+
"x-default": "https://example.com",
|
|
1004
|
+
},
|
|
1002
1005
|
},
|
|
1003
1006
|
},
|
|
1004
1007
|
{
|
|
1005
1008
|
url: "https://example.com/login",
|
|
1006
1009
|
alternates: {
|
|
1007
|
-
languages: {
|
|
1010
|
+
languages: {
|
|
1011
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1012
|
+
"x-default": "https://example.com/login",
|
|
1013
|
+
},
|
|
1008
1014
|
},
|
|
1009
1015
|
},
|
|
1010
1016
|
{
|
|
1011
1017
|
url: "https://example.com/register",
|
|
1012
1018
|
alternates: {
|
|
1013
|
-
languages: {
|
|
1019
|
+
languages: {
|
|
1020
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1021
|
+
"x-default": "https://example.com/register",
|
|
1022
|
+
},
|
|
1014
1023
|
},
|
|
1015
1024
|
},
|
|
1016
1025
|
];
|
|
@@ -1025,19 +1034,28 @@ const sitemap = () => [
|
|
|
1025
1034
|
{
|
|
1026
1035
|
url: "https://example.com",
|
|
1027
1036
|
alternates: {
|
|
1028
|
-
languages: {
|
|
1037
|
+
languages: {
|
|
1038
|
+
...getMultilingualUrls("https://example.com"),
|
|
1039
|
+
"x-default": "https://example.com",
|
|
1040
|
+
},
|
|
1029
1041
|
},
|
|
1030
1042
|
},
|
|
1031
1043
|
{
|
|
1032
1044
|
url: "https://example.com/login",
|
|
1033
1045
|
alternates: {
|
|
1034
|
-
languages: {
|
|
1046
|
+
languages: {
|
|
1047
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1048
|
+
"x-default": "https://example.com/login",
|
|
1049
|
+
},
|
|
1035
1050
|
},
|
|
1036
1051
|
},
|
|
1037
1052
|
{
|
|
1038
1053
|
url: "https://example.com/register",
|
|
1039
1054
|
alternates: {
|
|
1040
|
-
languages: {
|
|
1055
|
+
languages: {
|
|
1056
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1057
|
+
"x-default": "https://example.com/register",
|
|
1058
|
+
},
|
|
1041
1059
|
},
|
|
1042
1060
|
},
|
|
1043
1061
|
];
|
|
@@ -1052,19 +1070,28 @@ const sitemap = () => [
|
|
|
1052
1070
|
{
|
|
1053
1071
|
url: "https://example.com",
|
|
1054
1072
|
alternates: {
|
|
1055
|
-
languages: {
|
|
1073
|
+
languages: {
|
|
1074
|
+
...getMultilingualUrls("https://example.com"),
|
|
1075
|
+
"x-default": "https://example.com",
|
|
1076
|
+
},
|
|
1056
1077
|
},
|
|
1057
1078
|
},
|
|
1058
1079
|
{
|
|
1059
1080
|
url: "https://example.com/login",
|
|
1060
1081
|
alternates: {
|
|
1061
|
-
languages: {
|
|
1082
|
+
languages: {
|
|
1083
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1084
|
+
"x-default": "https://example.com/login",
|
|
1085
|
+
},
|
|
1062
1086
|
},
|
|
1063
1087
|
},
|
|
1064
1088
|
{
|
|
1065
1089
|
url: "https://example.com/register",
|
|
1066
1090
|
alternates: {
|
|
1067
|
-
languages: {
|
|
1091
|
+
languages: {
|
|
1092
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1093
|
+
"x-default": "https://example.com/register",
|
|
1094
|
+
},
|
|
1068
1095
|
},
|
|
1069
1096
|
},
|
|
1070
1097
|
];
|
|
@@ -1063,19 +1063,28 @@ const sitemap = (): MetadataRoute.Sitemap => [
|
|
|
1063
1063
|
{
|
|
1064
1064
|
url: "https://example.com",
|
|
1065
1065
|
alternates: {
|
|
1066
|
-
languages: {
|
|
1066
|
+
languages: {
|
|
1067
|
+
...getMultilingualUrls("https://example.com"),
|
|
1068
|
+
"x-default": "https://example.com",
|
|
1069
|
+
},
|
|
1067
1070
|
},
|
|
1068
1071
|
},
|
|
1069
1072
|
{
|
|
1070
1073
|
url: "https://example.com/login",
|
|
1071
1074
|
alternates: {
|
|
1072
|
-
languages: {
|
|
1075
|
+
languages: {
|
|
1076
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1077
|
+
"x-default": "https://example.com/login",
|
|
1078
|
+
},
|
|
1073
1079
|
},
|
|
1074
1080
|
},
|
|
1075
1081
|
{
|
|
1076
1082
|
url: "https://example.com/register",
|
|
1077
1083
|
alternates: {
|
|
1078
|
-
languages: {
|
|
1084
|
+
languages: {
|
|
1085
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1086
|
+
"x-default": "https://example.com/register",
|
|
1087
|
+
},
|
|
1079
1088
|
},
|
|
1080
1089
|
},
|
|
1081
1090
|
];
|
|
@@ -1090,19 +1099,28 @@ const sitemap = () => [
|
|
|
1090
1099
|
{
|
|
1091
1100
|
url: "https://example.com",
|
|
1092
1101
|
alternates: {
|
|
1093
|
-
languages: {
|
|
1102
|
+
languages: {
|
|
1103
|
+
...getMultilingualUrls("https://example.com"),
|
|
1104
|
+
"x-default": "https://example.com",
|
|
1105
|
+
},
|
|
1094
1106
|
},
|
|
1095
1107
|
},
|
|
1096
1108
|
{
|
|
1097
1109
|
url: "https://example.com/login",
|
|
1098
1110
|
alternates: {
|
|
1099
|
-
languages: {
|
|
1111
|
+
languages: {
|
|
1112
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1113
|
+
"x-default": "https://example.com/login",
|
|
1114
|
+
},
|
|
1100
1115
|
},
|
|
1101
1116
|
},
|
|
1102
1117
|
{
|
|
1103
1118
|
url: "https://example.com/register",
|
|
1104
1119
|
alternates: {
|
|
1105
|
-
languages: {
|
|
1120
|
+
languages: {
|
|
1121
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1122
|
+
"x-default": "https://example.com/register",
|
|
1123
|
+
},
|
|
1106
1124
|
},
|
|
1107
1125
|
},
|
|
1108
1126
|
];
|
|
@@ -1117,19 +1135,28 @@ const sitemap = () => [
|
|
|
1117
1135
|
{
|
|
1118
1136
|
url: "https://example.com",
|
|
1119
1137
|
alternates: {
|
|
1120
|
-
languages: {
|
|
1138
|
+
languages: {
|
|
1139
|
+
...getMultilingualUrls("https://example.com"),
|
|
1140
|
+
"x-default": "https://example.com",
|
|
1141
|
+
},
|
|
1121
1142
|
},
|
|
1122
1143
|
},
|
|
1123
1144
|
{
|
|
1124
1145
|
url: "https://example.com/login",
|
|
1125
1146
|
alternates: {
|
|
1126
|
-
languages: {
|
|
1147
|
+
languages: {
|
|
1148
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1149
|
+
"x-default": "https://example.com/login",
|
|
1150
|
+
},
|
|
1127
1151
|
},
|
|
1128
1152
|
},
|
|
1129
1153
|
{
|
|
1130
1154
|
url: "https://example.com/register",
|
|
1131
1155
|
alternates: {
|
|
1132
|
-
languages: {
|
|
1156
|
+
languages: {
|
|
1157
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1158
|
+
"x-default": "https://example.com/register",
|
|
1159
|
+
},
|
|
1133
1160
|
},
|
|
1134
1161
|
},
|
|
1135
1162
|
];
|
|
@@ -30,7 +30,7 @@ Welcome to Intlayer v7! This major release introduces significant improvements i
|
|
|
30
30
|
- Improved TypeScript type generation with locale-specific types
|
|
31
31
|
- Bundle optimisation: Locales as strings instead of enum
|
|
32
32
|
- New routing modes: `prefix-no-default`, `prefix-all`, `no-prefix`, `search-params`
|
|
33
|
-
- GDPR-compliant
|
|
33
|
+
- GDPR-compliant using localStorage
|
|
34
34
|
- Flexible storage configuration: cookies, localStorage, sessionStorage, or multiple
|
|
35
35
|
- 30% smaller Visual Editor package size
|
|
36
36
|
- Enhanced middleware configuration options
|
|
@@ -970,19 +970,28 @@ const sitemap = (): MetadataRoute.Sitemap => [
|
|
|
970
970
|
{
|
|
971
971
|
url: "https://example.com",
|
|
972
972
|
alternates: {
|
|
973
|
-
languages: {
|
|
973
|
+
languages: {
|
|
974
|
+
...getMultilingualUrls("https://example.com"),
|
|
975
|
+
"x-default": "https://example.com",
|
|
976
|
+
},
|
|
974
977
|
},
|
|
975
978
|
},
|
|
976
979
|
{
|
|
977
980
|
url: "https://example.com/login",
|
|
978
981
|
alternates: {
|
|
979
|
-
languages: {
|
|
982
|
+
languages: {
|
|
983
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
984
|
+
"x-default": "https://example.com/login",
|
|
985
|
+
},
|
|
980
986
|
},
|
|
981
987
|
},
|
|
982
988
|
{
|
|
983
989
|
url: "https://example.com/register",
|
|
984
990
|
alternates: {
|
|
985
|
-
languages: {
|
|
991
|
+
languages: {
|
|
992
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
993
|
+
"x-default": "https://example.com/register",
|
|
994
|
+
},
|
|
986
995
|
},
|
|
987
996
|
},
|
|
988
997
|
];
|
|
@@ -997,19 +1006,28 @@ const sitemap = () => [
|
|
|
997
1006
|
{
|
|
998
1007
|
url: "https://example.com",
|
|
999
1008
|
alternates: {
|
|
1000
|
-
languages: {
|
|
1009
|
+
languages: {
|
|
1010
|
+
...getMultilingualUrls("https://example.com"),
|
|
1011
|
+
"x-default": "https://example.com",
|
|
1012
|
+
},
|
|
1001
1013
|
},
|
|
1002
1014
|
},
|
|
1003
1015
|
{
|
|
1004
1016
|
url: "https://example.com/login",
|
|
1005
1017
|
alternates: {
|
|
1006
|
-
languages: {
|
|
1018
|
+
languages: {
|
|
1019
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1020
|
+
"x-default": "https://example.com/login",
|
|
1021
|
+
},
|
|
1007
1022
|
},
|
|
1008
1023
|
},
|
|
1009
1024
|
{
|
|
1010
1025
|
url: "https://example.com/register",
|
|
1011
1026
|
alternates: {
|
|
1012
|
-
languages: {
|
|
1027
|
+
languages: {
|
|
1028
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1029
|
+
"x-default": "https://example.com/register",
|
|
1030
|
+
},
|
|
1013
1031
|
},
|
|
1014
1032
|
},
|
|
1015
1033
|
];
|
|
@@ -1024,19 +1042,28 @@ const sitemap = () => [
|
|
|
1024
1042
|
{
|
|
1025
1043
|
url: "https://example.com",
|
|
1026
1044
|
alternates: {
|
|
1027
|
-
languages: {
|
|
1045
|
+
languages: {
|
|
1046
|
+
...getMultilingualUrls("https://example.com"),
|
|
1047
|
+
"x-default": "https://example.com",
|
|
1048
|
+
},
|
|
1028
1049
|
},
|
|
1029
1050
|
},
|
|
1030
1051
|
{
|
|
1031
1052
|
url: "https://example.com/login",
|
|
1032
1053
|
alternates: {
|
|
1033
|
-
languages: {
|
|
1054
|
+
languages: {
|
|
1055
|
+
...getMultilingualUrls("https://example.com/login"),
|
|
1056
|
+
"x-default": "https://example.com/login",
|
|
1057
|
+
},
|
|
1034
1058
|
},
|
|
1035
1059
|
},
|
|
1036
1060
|
{
|
|
1037
1061
|
url: "https://example.com/register",
|
|
1038
1062
|
alternates: {
|
|
1039
|
-
languages: {
|
|
1063
|
+
languages: {
|
|
1064
|
+
...getMultilingualUrls("https://example.com/register"),
|
|
1065
|
+
"x-default": "https://example.com/register",
|
|
1066
|
+
},
|
|
1040
1067
|
},
|
|
1041
1068
|
},
|
|
1042
1069
|
];
|