@intlayer/docs 7.0.0-canary.1 → 7.0.0-canary.3

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 (43) hide show
  1. package/dist/cjs/common.cjs.map +1 -1
  2. package/dist/esm/common.mjs.map +1 -1
  3. package/dist/types/common.d.ts +5 -0
  4. package/dist/types/common.d.ts.map +1 -1
  5. package/docs/ar/intlayer_with_nextjs_16.md +1652 -0
  6. package/docs/ar/releases/v7.md +486 -0
  7. package/docs/de/intlayer_with_nextjs_16.md +1662 -0
  8. package/docs/de/releases/v7.md +503 -0
  9. package/docs/en/intlayer_with_nextjs_15.md +5 -2
  10. package/docs/en/intlayer_with_nextjs_16.md +4 -4
  11. package/docs/en-GB/intlayer_with_nextjs_16.md +1642 -0
  12. package/docs/en-GB/releases/v7.md +486 -0
  13. package/docs/es/intlayer_with_nextjs_16.md +1670 -0
  14. package/docs/es/releases/v7.md +503 -0
  15. package/docs/fr/intlayer_with_nextjs_16.md +1692 -0
  16. package/docs/fr/releases/v7.md +504 -0
  17. package/docs/hi/intlayer_with_nextjs_16.md +1618 -0
  18. package/docs/hi/releases/v7.md +486 -0
  19. package/docs/id/intlayer_with_nextjs_16.md +1604 -0
  20. package/docs/id/releases/v7.md +503 -0
  21. package/docs/it/intlayer_with_nextjs_16.md +1600 -0
  22. package/docs/it/releases/v7.md +505 -0
  23. package/docs/ja/intlayer_CMS.md +0 -9
  24. package/docs/ja/intlayer_with_nextjs_16.md +1788 -0
  25. package/docs/ja/releases/v7.md +504 -0
  26. package/docs/ko/intlayer_with_nextjs_16.md +1641 -0
  27. package/docs/ko/releases/v7.md +504 -0
  28. package/docs/pl/intlayer_with_nextjs_16.md +1645 -0
  29. package/docs/pl/releases/v7.md +486 -0
  30. package/docs/pt/intlayer_with_nextjs_16.md +1646 -0
  31. package/docs/pt/introduction.md +0 -15
  32. package/docs/pt/releases/v7.md +486 -0
  33. package/docs/ru/intlayer_with_nextjs_16.md +1610 -0
  34. package/docs/ru/releases/v7.md +486 -0
  35. package/docs/tr/intlayer_with_nextjs_16.md +1599 -0
  36. package/docs/tr/releases/v7.md +486 -0
  37. package/docs/vi/intlayer_with_nextjs_16.md +1597 -0
  38. package/docs/vi/releases/v7.md +486 -0
  39. package/docs/zh/intlayer_CMS.md +0 -23
  40. package/docs/zh/intlayer_with_nextjs_16.md +1628 -0
  41. package/docs/zh/releases/v7.md +487 -0
  42. package/package.json +14 -14
  43. package/src/common.ts +5 -0
@@ -0,0 +1,503 @@
1
+ ---
2
+ createdAt: 2025-09-22
3
+ updatedAt: 2025-09-23
4
+ title: Neue Intlayer v7 - Was ist neu?
5
+ description: Entdecken Sie, was neu ist in Intlayer v7. Wichtige Verbesserungen in Leistung, Entwicklererfahrung und neue Funktionen zur Optimierung Ihres Internationalisierungs-Workflows.
6
+ keywords:
7
+ - Intlayer
8
+ - Lokalisierung
9
+ - Entwicklung
10
+ - Leistung
11
+ - Entwicklererfahrung
12
+ - Funktionen
13
+ - React
14
+ - Next.js
15
+ - JavaScript
16
+ - TypeScript
17
+ slugs:
18
+ - doc
19
+ - releases
20
+ - v7
21
+ ---
22
+
23
+ # Neue Intlayer v7 - Was ist neu?
24
+
25
+ Willkommen bei Intlayer v7! Dieses große Release bringt bedeutende Verbesserungen in Leistung, Typsicherheit und Entwicklererfahrung. Nachfolgend finden Sie die Highlights, Migrationshinweise und praktische Beispiele.
26
+
27
+ ## Highlights
28
+
29
+ - Caching-Strategie für schnellere Builds
30
+ - Verbesserte TypeScript-Typgenerierung mit sprachspezifischen Typen
31
+ - Bundle-Optimierung: Sprachen als Strings statt als Enum
32
+ - Neue Routing-Modi: `prefix-no-default`, `prefix-all`, `no-prefix`, `search-params`
33
+ - DSGVO-konforme Sprachspeicherung mit localStorage als Standard
34
+ - Flexible Speicher-Konfiguration: Cookies, localStorage, sessionStorage oder mehrere gleichzeitig
35
+ - 30 % kleinere Paketgröße des Visual Editors
36
+ - Erweiterte Middleware-Konfigurationsoptionen
37
+ - Aktualisiertes Verhalten des Fill-Kommandos für bessere Inhaltsverwaltung
38
+ - Verbesserte Stabilität durch vollständige Aktualisierung der Content-Declaration-Dateien
39
+ - Intelligentes Retry-Management für höhere Übersetzungsgenauigkeit
40
+ - Parallelisierung für schnellere Übersetzungsverarbeitung
41
+ - Intelligentes Chunking zur Handhabung großer Dateien innerhalb der KI-Kontextgrenzen
42
+
43
+ ---
44
+
45
+ ## Leistung: Caching für schnellere Builds
46
+
47
+ Anstatt bei jedem Build die Content-Declaration-Dateien mit esbuild neu zu erstellen, implementiert Version 7 eine Caching-Strategie, die den Build-Prozess beschleunigt.
48
+
49
+ ```bash
50
+ npx intlayer build
51
+ ```
52
+
53
+ Das neue Caching-System:
54
+
55
+ - Speichert kompilierte Content-Declaration-Dateien, um redundante Verarbeitung zu vermeiden
56
+ - Erkennt Änderungen und baut nur modifizierte Dateien neu auf
57
+ - Reduziert die Build-Zeiten bei großen Projekten erheblich
58
+
59
+ ---
60
+
61
+ ## TypeScript: Sprachspezifische Typgenerierung
62
+
63
+ TypeScript-Typen werden nun pro Sprache generiert, was eine stärkere Typisierung ermöglicht und Union-Typen über alle Sprachen hinweg eliminiert.
64
+
65
+ **Verhalten in v6:**
66
+
67
+ ```tsx
68
+ const content = getIntlayer("my-title-content", "en");
69
+ // typeof content = { title: "My title" } | { title: "Mon titre" } | { title: "Mi título" }
70
+ ```
71
+
72
+ **Verhalten in v7:**
73
+
74
+ ```tsx
75
+ const content = getIntlayer("my-title-content", "en");
76
+ // typeof content = { title: "My title" }
77
+ ```
78
+
79
+ Vorteile:
80
+
81
+ - Präzisere Autovervollständigung in Ihrer IDE
82
+ - Bessere Typensicherheit ohne Typverschmutzung über verschiedene Sprachen hinweg
83
+ - Verbesserte Leistung durch Reduzierung der Typkomplexität
84
+
85
+ ---
86
+
87
+ ## Bundle-Optimierung: Sprachen als Strings
88
+
89
+ Der Typ `Locales` ist kein Enum mehr, was bedeutet, dass er jetzt vollständig tree-shakeable ist und Ihr Bundle nicht mehr mit tausenden ungenutzten Sprachdatensätzen aufbläht.
90
+
91
+ **v6:**
92
+
93
+ ```typescript
94
+ import { Locales } from "intlayer";
95
+ // Enum, das alle Sprachen enthält -> nicht tree-shakeable
96
+
97
+ const locale: Locales = Locales.ENGLISH;
98
+ ```
99
+
100
+ **v7:**
101
+
102
+ ```typescript
103
+ import { Locales, Locale } from "intlayer";
104
+ // String-Typ -> vollständig tree-shakeable
105
+
106
+ const locale: Locale = Locales.ENGLISH;
107
+ ```
108
+
109
+ > Da `Locales` kein Enum mehr ist, müssen Sie den Typ von `Locales` zu `Locale` ändern, um die Sprache als Typ zu erhalten.
110
+
111
+ Siehe die [Implementierungsdetails](https://github.com/aymericzip/intlayer/blob/main/packages/%40intlayer/types/src/index.ts) für weitere Informationen.
112
+
113
+ ---
114
+
115
+ ## Neue Routing-Modi für mehr Flexibilität
116
+
117
+ v7 führt eine einheitliche `routing.mode`-Konfiguration ein, die die vorherigen Optionen `prefixDefault` und `noPrefix` ersetzt und eine feinere Steuerung der URL-Struktur ermöglicht.
118
+
119
+ ### Verfügbare Routing-Modi
120
+
121
+ - **`prefix-no-default`** (Standard): Die Standardsprache hat kein Präfix, andere Sprachen schon
122
+ - `/dashboard` (en) oder `/fr/dashboard` (fr)
123
+ - **`prefix-all`**: Alle Sprachen haben ein Präfix
124
+ - `/en/dashboard` (en) oder `/fr/dashboard` (fr)
125
+ - **`no-prefix`**: Keine Sprachpräfixe in URLs (Sprache wird über Speicher/Header gehandhabt)
126
+ - `/dashboard` für alle Sprachen
127
+ - **`search-params`**: Sprache wird als Abfrageparameter übergeben
128
+ - `/dashboard?locale=en` oder `/dashboard?locale=fr`
129
+
130
+ ### Grundkonfiguration
131
+
132
+ ```typescript
133
+ // intlayer.config.ts
134
+ export default {
135
+ internationalization: {
136
+ locales: ["en", "fr", "es"],
137
+ defaultLocale: "en",
138
+ },
139
+ routing: {
140
+ mode: "prefix-no-default", // Standard
141
+ },
142
+ };
143
+ ```
144
+
145
+ ---
146
+
147
+ ## DSGVO-Konformität: localStorage / Cookie-Speicherung
148
+
149
+ v7 legt besonderen Wert auf den Schutz der Privatsphäre der Nutzer, indem `localStorage` als Standard-Speichermechanismus anstelle von Cookies verwendet wird. Diese Änderung unterstützt die DSGVO-Konformität, indem sie die Notwendigkeit einer Cookie-Einwilligung für Spracheinstellungen vermeidet.
150
+
151
+ ### Speicher-Konfigurationsoptionen
152
+
153
+ Das neue Feld `routing.storage` ist zusätzlich zu den bisherigen Optionen `middleware.cookieName` und `middleware.serverSetCookie` verfügbar und bietet flexible Speicher-Konfigurationen:
154
+
155
+ ```typescript
156
+ // Speicher deaktivieren
157
+ storage: false
158
+
159
+ // Einfache Speichertypen
160
+ storage: 'cookie'
161
+ storage: 'localStorage'
162
+ storage: 'sessionStorage'
163
+
164
+ // Cookie mit benutzerdefinierten Attributen
165
+ storage: {
166
+ type: 'cookie',
167
+ name: 'custom-locale',
168
+ domain: '.example.com',
169
+ secure: true,
170
+ sameSite: 'strict'
171
+ }
172
+
173
+ // localStorage mit benutzerdefiniertem Schlüssel
174
+ storage: {
175
+ type: 'localStorage',
176
+ name: 'custom-locale'
177
+ }
178
+
179
+ // Mehrere Speichertypen zur Redundanz
180
+ storage: ['cookie', 'localStorage']
181
+ ```
182
+
183
+ ### DSGVO-konformes Konfigurationsbeispiel
184
+
185
+ Für produktive Anwendungen, die Funktionalität mit DSGVO-Konformität in Einklang bringen müssen:
186
+
187
+ ```typescript
188
+ // intlayer.config.ts
189
+ export default {
190
+ internationalization: {
191
+ locales: ["en", "fr", "es"],
192
+ defaultLocale: "en",
193
+ },
194
+ routing: {
195
+ mode: "prefix-no-default",
196
+ storage: [
197
+ {
198
+ type: "localStorage", // Primärer Speicher (kein Einverständnis erforderlich)
199
+ name: "user-locale",
200
+ },
201
+ {
202
+ type: "cookie", // Optionale Cookie-Speicherung (erfordert Einverständnis)
203
+ name: "user-locale",
204
+ secure: true,
205
+ sameSite: "strict",
206
+ httpOnly: false,
207
+ },
208
+ ],
209
+ },
210
+ };
211
+ ```
212
+
213
+ ### Aktivieren / Deaktivieren der Cookie-Speicherung
214
+
215
+ Beispiel mit React / Next.js:
216
+
217
+ Kann global definiert werden:
218
+
219
+ ```typescript
220
+ <IntlayerProvider isCookieEnabled={false}>
221
+ <App />
222
+ </IntlayerProvider>
223
+ ```
224
+
225
+ Kann lokal für jeden Hook überschrieben werden:
226
+
227
+ ```ts
228
+ const { setLocale } = useLocale({ isCookieEnabled: false });
229
+
230
+ setLocale("en");
231
+ ```
232
+
233
+ **Hinweis:** Cookies sind standardmäßig aktiviert.
234
+ **Hinweis:** Prüfen Sie die [DSGVO-Cookie-Anforderungen](https://gdpr.eu/cookies/) für Ihren spezifischen Anwendungsfall.
235
+
236
+ ---
237
+
238
+ ## Visual Editor: 30 % kleineres Paket
239
+
240
+ Das Visual Editor-Paket wurde optimiert und ist nun 30 % kleiner als die vorherige Version, dank:
241
+
242
+ - Verbesserungen der Leistung des Code-Editors
243
+ - Entfernung unnötiger Abhängigkeiten von Intlayer-Kernpaketen
244
+ - Besseres Tree-Shaking und Modul-Bündelung
245
+
246
+ Dies führt zu schnelleren Downloadzeiten und verbesserter Laufzeitleistung Ihrer Anwendung.
247
+
248
+ ---
249
+
250
+ ## Fill-Befehl: Aktualisiertes Verhalten für besseres Content-Management
251
+
252
+ v7 führt ein verbessertes Verhalten für den `fill`-Befehl ein, das ein vorhersehbareres und flexibleres Content-Management ermöglicht:
253
+
254
+ ### Neues Fill-Verhalten
255
+
256
+ - **`fill: true`** - Überschreibt die aktuelle Datei mit ausgefülltem Inhalt für alle Sprachen
257
+ - **`fill: "path/to/file"`** - Füllt die angegebene Datei, ohne die aktuelle Datei zu verändern
258
+ - **`fill: false`** - Deaktiviert das automatische Ausfüllen vollständig
259
+
260
+ ### Verbesserte Unterstützung für komplexe Inhaltsstrukturen
261
+
262
+ Der Fill-Befehl unterstützt jetzt komplexe Inhaltsdeklarationsstrukturen, einschließlich:
263
+
264
+ - **Zusammengesetzte Objekte**: Inhaltsdeklarationen, die auf andere Objekte verweisen
265
+ - **Destrukturierter Inhalt**: Inhalt, der Destrukturierungsmuster verwendet
266
+ - **Verschachtelte Verweise**: Objekte, die sich in komplexen Hierarchien gegenseitig aufrufen
267
+ - **Dynamische Inhaltsstrukturen**: Inhalt mit bedingten oder berechneten Eigenschaften
268
+
269
+ ### Vorteile
270
+
271
+ - **Klarere Absicht**: Das Verhalten ist jetzt expliziter bezüglich dessen, was geändert wird
272
+ - **Bessere Trennung**: Inhaltsdateien können von ausgefüllten Übersetzungen getrennt gehalten werden
273
+ - **Verbesserter Arbeitsablauf**: Entwickler haben mehr Kontrolle darüber, wo Übersetzungen gespeichert werden
274
+ - **Unterstützung komplexer Strukturen**: Umgang mit anspruchsvollen Inhaltsarchitekturen mit mehreren miteinander verbundenen Objekten
275
+
276
+ ### Beispielanwendung
277
+
278
+ ```typescript
279
+ // Überschreibt die aktuelle Datei mit allen Sprachversionen
280
+ const content = {
281
+ key: "example",
282
+ fill: true, // Überschreibt diese Datei
283
+ content: {
284
+ title: "Hello World",
285
+ },
286
+ };
287
+
288
+ // Füllt eine separate Datei, ohne die aktuelle Datei zu ändern
289
+ const content = {
290
+ key: "example",
291
+ fill: "./translations.json", // Erstellt/aktualisiert translations.json
292
+ content: {
293
+ title: "Hello World",
294
+ },
295
+ };
296
+
297
+ // Deaktiviert Auto-Fill
298
+ const content = {
299
+ key: "example",
300
+ fill: false, // Kein Auto-Fill
301
+ content: {
302
+ title: "Hallo Welt",
303
+ },
304
+ };
305
+
306
+ // Komplexe Inhaltsstruktur mit zusammengesetzten Objekten
307
+ const sharedContent = {
308
+ buttons: {
309
+ save: "Speichern", // Speichern-Button
310
+ cancel: "Abbrechen", // Abbrechen-Button
311
+ },
312
+ };
313
+
314
+ const content = {
315
+ key: "complex-example",
316
+ fill: true,
317
+ content: {
318
+ // Verweise auf andere Objekte
319
+ sharedContent,
320
+
321
+ // Destrukturierter Inhalt
322
+ ...sharedContent,
323
+
324
+ // Verschachtelte Verweise
325
+ sections: [
326
+ {
327
+ ...sharedContent.buttons,
328
+ header: "Abschnitt 1",
329
+ },
330
+ ],
331
+ },
332
+ };
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Verbesserte Stabilität und Übersetzungsverwaltung
338
+
339
+ v7 führt mehrere Verbesserungen ein, um die Inhaltsübersetzung zuverlässiger und effizienter zu gestalten:
340
+
341
+ ### Vollständige Aktualisierung der Inhaltsdeklarationsdateien
342
+
343
+ Das System aktualisiert jetzt `.content.{ts,js,cjs,mjs}`-Dateien anstelle von Teilaktualisierungen, was sicherstellt:
344
+
345
+ - **Datenintegrität**: Vollständige Datei-Neuschreibungen verhindern partielle Updates, die Inhalte beschädigen könnten
346
+ - **Konsistenz**: Alle Sprachversionen werden atomar aktualisiert, um Synchronisation zu gewährleisten
347
+ - **Zuverlässigkeit**: Verringert das Risiko unvollständiger oder fehlerhafter Inhaltsdateien
348
+
349
+ ### Intelligentes Wiederholungsmanagement
350
+
351
+ Neue Wiederholungsmechanismen verhindern das Hochladen von Inhalten in falschen Formaten und vermeiden, dass der gesamte Füllprozess bei einem fehlgeschlagenen Request abbricht.
352
+
353
+ ### Parallelisierung für schnellere Verarbeitung
354
+
355
+ Übersetzungsoperationen werden jetzt in einer Warteschlange ausgeführt, um sie parallel laufen zu lassen. Dies beschleunigt den Prozess erheblich.
356
+
357
+ ### Intelligentes Chunking für große Dateien
358
+
359
+ Fortschrittliche Chunking-Strategien verarbeiten große Inhaltsdateien, ohne die Kontextfenster der KI zu überschreiten:
360
+
361
+ ### Beispiel-Workflow
362
+
363
+ ```typescript
364
+ // Große Inhaltsdatei wird automatisch in Chunks aufgeteilt
365
+ const content = {
366
+ key: "large-documentation",
367
+ fill: true,
368
+ content: {
369
+ // Große Inhalte werden automatisch für die KI-Verarbeitung in Abschnitte unterteilt
370
+ introduction: "..." // 5000+ Zeichen
371
+ sections: [
372
+ // Mehrere große Abschnitte
373
+ ]
374
+ }
375
+ };
376
+ ```
377
+
378
+ Das System führt automatisch aus:
379
+
380
+ 1. Analysiert die Größe und Struktur des Inhalts
381
+ 2. Unterteilt den Inhalt angemessen in Abschnitte
382
+ 3. Verarbeitet die Abschnitte parallel
383
+ 4. Validiert und versucht bei Bedarf erneut
384
+ 5. Rekonstruiert die vollständige Datei
385
+
386
+ ---
387
+
388
+ ## Migrationshinweise von v6
389
+
390
+ ### Entfernte Konfigurationen
391
+
392
+ - **`middleware.cookieName`**: Ersetzt durch `routing.storage`
393
+ - **`middleware.serverSetCookie`**: Ersetzt durch `routing.storage`
394
+ - **`middleware.prefixDefault`**: Ersetzt durch `routing.mode`
395
+ - **`middleware.noPrefix`**: Ersetzt durch `routing.mode`
396
+
397
+ ### Migrationszuordnung
398
+
399
+ #### Konfigurationszuordnung
400
+
401
+ | v6 Konfiguration | v7 Konfiguration |
402
+ | -------------------------- | -------------------------------------------------------------------- |
403
+ | `autoFill: xxx` | `fill: xxx` |
404
+ | `prefixDefault: false` | `mode: 'prefix-no-default'` |
405
+ | `prefixDefault: true` | `mode: 'prefix-all'` |
406
+ | `noPrefix: true` | `mode: 'no-prefix'` |
407
+ | `cookieName: 'my-locale'` | `storage: { type: 'cookie', name: 'my-locale' }` |
408
+ | `serverSetCookie: 'never'` | `storage: false` oder entfernen Sie den Cookie aus dem Storage-Array |
409
+
410
+ #### Beispiel Migration
411
+
412
+ **Vorher (v6):**
413
+
414
+ ````typescript
415
+ export default {
416
+ #### Konfigurationszuordnung
417
+
418
+ | v6 Konfiguration | v7 Konfiguration |
419
+ | -------------------------- | ---------------------------------------------------- |
420
+ | `autoFill: xxx` | `fill: xxx` |
421
+ | `prefixDefault: false` | `mode: 'prefix-no-default'` |
422
+ | `prefixDefault: true` | `mode: 'prefix-all'` |
423
+ | `noPrefix: true` | `mode: 'no-prefix'` |
424
+ | `cookieName: 'my-locale'` | `storage: { type: 'cookie', name: 'my-locale' }` |
425
+ | `serverSetCookie: 'never'` | `storage: false` oder Entfernen des Cookies aus dem Speicher-Array |
426
+
427
+ #### Beispiel Migration
428
+
429
+ **Vorher (v6):**
430
+
431
+ ```typescript
432
+ export default {
433
+ middleware: {
434
+ headerName: "x-intlayer-locale",
435
+ cookieName: "intlayer-locale",
436
+ prefixDefault: false,
437
+ basePath: "",
438
+ serverSetCookie: "always",
439
+ noPrefix: false,
440
+ },
441
+ };
442
+ ````
443
+
444
+ **Nachher (v7):**
445
+
446
+ ```typescript
447
+ export default {
448
+ routing: {
449
+ mode: "prefix-no-default",
450
+ storage: "localStorage", // oder 'cookie', falls Cookie-Speicherung benötigt wird
451
+ headerName: "x-intlayer-locale",
452
+ basePath: "",
453
+ detectLocaleOnPrefetchNoPrefix: false,
454
+ },
455
+ };
456
+ ```
457
+
458
+ #### Wörterbuch-Inhaltszuordnung
459
+
460
+ | v6 Wörterbuch-Inhalt | v7 Wörterbuch-Inhalt |
461
+ | -------------------- | -------------------- |
462
+ | `autoFill: xxx` | `fill: xxx` |
463
+
464
+ #### Beispiel Migration
465
+
466
+ **Vorher (v6):**
467
+
468
+ ```typescript
469
+ const content = {
470
+ key: "example",
471
+ autoFill: true, // Überschreibt diese Datei
472
+ content: {
473
+ title: "Hallo Welt",
474
+ },
475
+ };
476
+ ```
477
+
478
+ **Nach (v7):**
479
+
480
+ ```typescript
481
+ const content = {
482
+ key: "example",
483
+ fill: true, // Überschreibt diese Datei
484
+ content: {
485
+ title: "Hallo Welt",
486
+ },
487
+ };
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Migrationshinweise von v5 zu v6
493
+
494
+ Siehe die [Migrationshinweise von v5 zu v6](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/releases/v6.md) für weitere Informationen.
495
+
496
+ ---
497
+
498
+ ## Nützliche Links
499
+
500
+ - [Konfigurationsreferenz](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/configuration.md)
501
+ - [Middleware-Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/next-intlayer/index.md)
502
+ - [TypeScript-Typen](https://github.com/aymericzip/intlayer/blob/main/packages/%40intlayer/types/src/index.ts)
503
+ - [DSGVO Cookie-Richtlinien](https://gdpr.eu/cookies/)
@@ -1,6 +1,6 @@
1
1
  ---
2
- createdAt: 2024-12-06
3
- updatedAt: 2025-10-09
2
+ createdAt: 2025-10-25
3
+ updatedAt: 2025-10-25
4
4
  title: How to translate your Next.js 15 app – i18n guide 2025
5
5
  description: Discover how to make your Next.js 15 website multilingual. Follow the documentation to internationalize (i18n) and translate it.
6
6
  keywords:
@@ -18,6 +18,9 @@ slugs:
18
18
  applicationTemplate: https://github.com/aymericzip/intlayer-next-15-template
19
19
  youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
20
20
  history:
21
+ - version: 7.0.0
22
+ date: 2025-10-25
23
+ changes: Added mention of `withIntlayerSync()` function
21
24
  - version: 6.2.0
22
25
  date: 2025-10-09
23
26
  changes: Added docs for `useLocale` hook with `onLocaleChange` option
@@ -130,7 +130,7 @@ const config = {
130
130
  module.exports = config;
131
131
  ```
132
132
 
133
- > Through this configuration file, you can set up localized URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md).
133
+ > Through this configuration file, you can set up localized URLs, proxy redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md).
134
134
 
135
135
  ### Step 3: Integrate Intlayer in Your Next.js Configuration
136
136
 
@@ -290,7 +290,7 @@ module.exports = LocaleLayout;
290
290
 
291
291
  > The `[locale]` path segment is used to define the locale. Example: `/en-US/about` will refer to `en-US` and `/fr/about` to `fr`.
292
292
 
293
- > At this stage, you will encounter the error: `Error: Missing <html> and <body> tags in the root layout.`. This is expected because the `/app/page.tsx` file is no longer in use and can be removed. Instead, the `[locale]` path segment will activate the `/app/[locale]/page.tsx` page. Consequently, pages will be accessible via paths like `/en`, `/fr`, `/es` in your browser. To set the default locale as the root page, refer to the `middleware` setup in step 7.
293
+ > At this stage, you will encounter the error: `Error: Missing <html> and <body> tags in the root layout.`. This is expected because the `/app/page.tsx` file is no longer in use and can be removed. Instead, the `[locale]` path segment will activate the `/app/[locale]/page.tsx` page. Consequently, pages will be accessible via paths like `/en`, `/fr`, `/es` in your browser. To set the default locale as the root page, refer to the `proxy` setup in step 7.
294
294
 
295
295
  Then, implement the `generateStaticParams` function in your application Layout.
296
296
 
@@ -637,7 +637,7 @@ const ServerComponentExample = () => {
637
637
 
638
638
  ### (Optional) Step 7: Configure Proxy for Locale Detection
639
639
 
640
- Set up middleware to detect the user's preferred locale:
640
+ Set up proxy to detect the user's preferred locale:
641
641
 
642
642
  ```typescript fileName="src/proxy.ts" codeFormat="typescript"
643
643
  export { intlayerProxy as proxy } from "next-intlayer/proxy";
@@ -1488,7 +1488,7 @@ export const myServerAction = async () => {
1488
1488
 
1489
1489
  > The `getLocale` function follows a cascading strategy to determine the user's locale:
1490
1490
  >
1491
- > 1. First, it checks the request headers for a locale value that may have been set by the middleware
1491
+ > 1. First, it checks the request headers for a locale value that may have been set by the proxy
1492
1492
  > 2. If no locale is found in headers, it looks for a locale stored in cookies
1493
1493
  > 3. If no cookie is found, it attempts to detect the user's preferred language from their browser settings
1494
1494
  > 4. As a last resort, it falls back to the application's configured default locale