@intlayer/docs 8.9.4-canary.0 → 8.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -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/benchmark/index.md +0 -3
- package/docs/ar/benchmark/nextjs.md +15 -6
- package/docs/ar/benchmark/solid.md +155 -0
- package/docs/ar/benchmark/svelte.md +148 -0
- package/docs/ar/benchmark/tanstack.md +12 -3
- package/docs/ar/benchmark/vue.md +160 -0
- package/docs/ar/configuration.md +16 -12
- package/docs/ar/dictionary/content_file.md +51 -1
- package/docs/ar/mcp_server.md +30 -17
- package/docs/ar/plugins/sync-po.md +333 -0
- package/docs/bn/configuration.md +16 -12
- package/docs/cs/configuration.md +16 -12
- package/docs/de/benchmark/index.md +0 -3
- package/docs/de/benchmark/nextjs.md +15 -6
- package/docs/de/benchmark/solid.md +155 -0
- package/docs/de/benchmark/svelte.md +148 -0
- package/docs/de/benchmark/tanstack.md +12 -3
- package/docs/de/benchmark/vue.md +160 -0
- package/docs/de/configuration.md +16 -12
- package/docs/de/dictionary/content_file.md +52 -2
- package/docs/de/mcp_server.md +29 -16
- package/docs/de/plugins/sync-po.md +332 -0
- package/docs/en/benchmark/nextjs.md +11 -2
- package/docs/en/benchmark/solid.md +22 -4
- package/docs/en/benchmark/svelte.md +17 -5
- package/docs/en/benchmark/tanstack.md +18 -3
- package/docs/en/benchmark/vue.md +17 -11
- package/docs/en/configuration.md +16 -13
- package/docs/en/dictionary/content_file.md +51 -1
- package/docs/en/mcp_server.md +31 -18
- package/docs/en/plugins/sync-po.md +333 -0
- package/docs/en-GB/benchmark/index.md +0 -3
- package/docs/en-GB/benchmark/nextjs.md +15 -6
- package/docs/en-GB/benchmark/solid.md +155 -0
- package/docs/en-GB/benchmark/svelte.md +148 -0
- package/docs/en-GB/benchmark/tanstack.md +12 -3
- package/docs/en-GB/benchmark/vue.md +160 -0
- package/docs/en-GB/configuration.md +15 -11
- package/docs/en-GB/dictionary/content_file.md +51 -1
- package/docs/en-GB/mcp_server.md +31 -18
- package/docs/en-GB/plugins/sync-po.md +333 -0
- package/docs/es/benchmark/index.md +0 -3
- package/docs/es/benchmark/nextjs.md +15 -6
- package/docs/es/benchmark/solid.md +155 -0
- package/docs/es/benchmark/svelte.md +148 -0
- package/docs/es/benchmark/tanstack.md +12 -3
- package/docs/es/benchmark/vue.md +160 -0
- package/docs/es/configuration.md +16 -12
- package/docs/es/dictionary/content_file.md +51 -1
- package/docs/es/mcp_server.md +30 -17
- package/docs/es/plugins/sync-po.md +333 -0
- package/docs/fr/benchmark/index.md +0 -3
- package/docs/fr/benchmark/nextjs.md +15 -6
- package/docs/fr/benchmark/solid.md +155 -0
- package/docs/fr/benchmark/svelte.md +148 -0
- package/docs/fr/benchmark/tanstack.md +12 -3
- package/docs/fr/benchmark/vue.md +160 -0
- package/docs/fr/configuration.md +16 -12
- package/docs/fr/dictionary/content_file.md +51 -1
- package/docs/fr/mcp_server.md +30 -17
- package/docs/fr/plugins/sync-po.md +333 -0
- package/docs/hi/benchmark/nextjs.md +15 -6
- package/docs/hi/benchmark/solid.md +155 -0
- package/docs/hi/benchmark/svelte.md +148 -0
- package/docs/hi/benchmark/tanstack.md +12 -3
- package/docs/hi/benchmark/vue.md +160 -0
- package/docs/hi/configuration.md +16 -12
- package/docs/hi/dictionary/content_file.md +51 -1
- package/docs/hi/mcp_server.md +31 -18
- package/docs/hi/plugins/sync-po.md +333 -0
- package/docs/id/benchmark/index.md +0 -3
- package/docs/id/benchmark/nextjs.md +15 -6
- package/docs/id/benchmark/solid.md +155 -0
- package/docs/id/benchmark/svelte.md +148 -0
- package/docs/id/benchmark/tanstack.md +12 -3
- package/docs/id/benchmark/vue.md +160 -0
- package/docs/id/configuration.md +16 -12
- package/docs/id/dictionary/content_file.md +51 -1
- package/docs/id/mcp_server.md +30 -17
- package/docs/id/plugins/sync-po.md +333 -0
- package/docs/it/benchmark/index.md +1 -4
- package/docs/it/benchmark/nextjs.md +15 -6
- package/docs/it/benchmark/solid.md +155 -0
- package/docs/it/benchmark/svelte.md +148 -0
- package/docs/it/benchmark/tanstack.md +12 -3
- package/docs/it/benchmark/vue.md +160 -0
- package/docs/it/configuration.md +16 -12
- package/docs/it/dictionary/content_file.md +51 -1
- package/docs/it/mcp_server.md +30 -17
- package/docs/it/plugins/sync-po.md +333 -0
- package/docs/ja/benchmark/index.md +5 -5
- package/docs/ja/benchmark/nextjs.md +15 -6
- package/docs/ja/benchmark/solid.md +155 -0
- package/docs/ja/benchmark/svelte.md +148 -0
- package/docs/ja/benchmark/tanstack.md +12 -3
- package/docs/ja/benchmark/vue.md +160 -0
- package/docs/ja/configuration.md +16 -12
- package/docs/ja/dictionary/content_file.md +50 -2
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +4 -3
- package/docs/ja/mcp_server.md +29 -16
- package/docs/ja/plugins/sync-po.md +333 -0
- package/docs/ko/benchmark/nextjs.md +15 -6
- package/docs/ko/benchmark/solid.md +155 -0
- package/docs/ko/benchmark/svelte.md +148 -0
- package/docs/ko/benchmark/tanstack.md +12 -3
- package/docs/ko/benchmark/vue.md +160 -0
- package/docs/ko/configuration.md +16 -12
- package/docs/ko/dictionary/content_file.md +51 -1
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +3 -2
- package/docs/ko/mcp_server.md +31 -18
- package/docs/ko/plugins/sync-po.md +333 -0
- package/docs/nl/configuration.md +16 -12
- package/docs/pl/benchmark/index.md +0 -3
- package/docs/pl/benchmark/nextjs.md +15 -6
- package/docs/pl/benchmark/solid.md +155 -0
- package/docs/pl/benchmark/svelte.md +148 -0
- package/docs/pl/benchmark/tanstack.md +12 -3
- package/docs/pl/benchmark/vue.md +160 -0
- package/docs/pl/configuration.md +16 -12
- package/docs/pl/dictionary/content_file.md +51 -1
- package/docs/pl/mcp_server.md +30 -17
- package/docs/pl/plugins/sync-po.md +333 -0
- package/docs/pt/benchmark/index.md +0 -3
- package/docs/pt/benchmark/nextjs.md +16 -7
- package/docs/pt/benchmark/solid.md +155 -0
- package/docs/pt/benchmark/svelte.md +148 -0
- package/docs/pt/benchmark/tanstack.md +13 -4
- package/docs/pt/benchmark/vue.md +160 -0
- package/docs/pt/configuration.md +16 -12
- package/docs/pt/dictionary/content_file.md +51 -1
- package/docs/pt/mcp_server.md +30 -17
- package/docs/pt/plugins/sync-po.md +333 -0
- package/docs/ru/benchmark/nextjs.md +15 -6
- package/docs/ru/benchmark/solid.md +155 -0
- package/docs/ru/benchmark/svelte.md +148 -0
- package/docs/ru/benchmark/tanstack.md +12 -3
- package/docs/ru/benchmark/vue.md +160 -0
- package/docs/ru/configuration.md +16 -12
- package/docs/ru/dictionary/content_file.md +52 -2
- package/docs/ru/mcp_server.md +30 -17
- package/docs/ru/plugins/sync-po.md +333 -0
- package/docs/tr/benchmark/index.md +0 -3
- package/docs/tr/benchmark/nextjs.md +15 -6
- package/docs/tr/benchmark/solid.md +155 -0
- package/docs/tr/benchmark/svelte.md +148 -0
- package/docs/tr/benchmark/tanstack.md +12 -3
- package/docs/tr/benchmark/vue.md +160 -0
- package/docs/tr/configuration.md +16 -12
- package/docs/tr/dictionary/content_file.md +51 -1
- package/docs/tr/mcp_server.md +31 -18
- package/docs/tr/plugins/sync-po.md +333 -0
- package/docs/uk/benchmark/nextjs.md +15 -6
- package/docs/uk/benchmark/solid.md +155 -0
- package/docs/uk/benchmark/svelte.md +148 -0
- package/docs/uk/benchmark/tanstack.md +12 -3
- package/docs/uk/benchmark/vue.md +160 -0
- package/docs/uk/configuration.md +16 -12
- package/docs/uk/dictionary/content_file.md +51 -1
- package/docs/uk/mcp_server.md +29 -16
- package/docs/uk/plugins/sync-po.md +333 -0
- package/docs/ur/configuration.md +16 -12
- package/docs/vi/benchmark/index.md +0 -3
- package/docs/vi/benchmark/nextjs.md +15 -6
- package/docs/vi/benchmark/solid.md +155 -0
- package/docs/vi/benchmark/svelte.md +148 -0
- package/docs/vi/benchmark/tanstack.md +12 -3
- package/docs/vi/benchmark/vue.md +160 -0
- package/docs/vi/configuration.md +16 -12
- package/docs/vi/dictionary/content_file.md +51 -1
- package/docs/vi/intlayer_with_nextjs_15.md +10 -57
- package/docs/vi/mcp_server.md +30 -17
- package/docs/vi/plugins/sync-po.md +333 -0
- package/docs/zh/benchmark/nextjs.md +15 -6
- package/docs/zh/benchmark/solid.md +155 -0
- package/docs/zh/benchmark/svelte.md +148 -0
- package/docs/zh/benchmark/tanstack.md +12 -3
- package/docs/zh/benchmark/vue.md +160 -0
- package/docs/zh/configuration.md +16 -12
- package/docs/zh/dictionary/content_file.md +51 -3
- package/docs/zh/mcp_server.md +31 -18
- package/docs/zh/plugins/sync-po.md +333 -0
- package/frequent_questions/ar/intlayerNode.md +3 -3
- package/frequent_questions/de/intlayerNode.md +3 -3
- package/frequent_questions/en/intlayerNode.md +3 -3
- package/frequent_questions/en-GB/intlayerNode.md +3 -3
- package/frequent_questions/es/intlayerNode.md +3 -3
- package/frequent_questions/fr/intlayerNode.md +3 -3
- package/frequent_questions/hi/intlayerNode.md +3 -3
- package/frequent_questions/id/intlayerNode.md +3 -3
- package/frequent_questions/it/intlayerNode.md +3 -3
- package/frequent_questions/ja/intlayerNode.md +3 -3
- package/frequent_questions/ko/intlayerNode.md +3 -3
- package/frequent_questions/pl/intlayerNode.md +3 -3
- package/frequent_questions/pt/intlayerNode.md +3 -3
- package/frequent_questions/ru/intlayerNode.md +3 -3
- package/frequent_questions/tr/intlayerNode.md +3 -3
- package/frequent_questions/uk/intlayerNode.md +3 -3
- package/frequent_questions/vi/intlayerNode.md +3 -3
- package/frequent_questions/zh/intlayerNode.md +3 -3
- package/package.json +8 -8
- package/src/generated/docs.entry.ts +20 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-02-07
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-05-12
|
|
4
4
|
title: Inhaltsdatei
|
|
5
5
|
description: Erfahren Sie, wie Sie die Erweiterungen für Ihre Inhaltsdeklarationsdateien anpassen können. Folgen Sie dieser Dokumentation, um Bedingungen effizient in Ihrem Projekt umzusetzen.
|
|
6
6
|
keywords:
|
|
@@ -12,6 +12,9 @@ slugs:
|
|
|
12
12
|
- concept
|
|
13
13
|
- content
|
|
14
14
|
history:
|
|
15
|
+
- version: 8.9.0
|
|
16
|
+
date: 2026-05-12
|
|
17
|
+
changes: "Inhaltstyp `plural` hinzufügen"
|
|
15
18
|
- version: 8.0.0
|
|
16
19
|
date: 2026-01-28
|
|
17
20
|
changes: "Inhaltstyp-Knoten `html` hinzugefügt"
|
|
@@ -66,6 +69,7 @@ import { type ReactNode } from "react";
|
|
|
66
69
|
import {
|
|
67
70
|
t,
|
|
68
71
|
enu,
|
|
72
|
+
plural,
|
|
69
73
|
cond,
|
|
70
74
|
nest,
|
|
71
75
|
md,
|
|
@@ -84,7 +88,8 @@ interface Content {
|
|
|
84
88
|
};
|
|
85
89
|
};
|
|
86
90
|
multilingualContent: string; // Mehrsprachiger Inhalt
|
|
87
|
-
quantityContent: string;
|
|
91
|
+
quantityContent: string;
|
|
92
|
+
pluralContent: string; // Mengeninhalt
|
|
88
93
|
conditionalContent: string; // Bedingter Inhalt
|
|
89
94
|
markdownContent: never; // Markdown-Inhalt
|
|
90
95
|
htmlContent: never; // HTML-Inhalt
|
|
@@ -121,6 +126,10 @@ export default {
|
|
|
121
126
|
">5": "Einige Autos",
|
|
122
127
|
">19": "Viele Autos",
|
|
123
128
|
}),
|
|
129
|
+
pluralContent: plural({
|
|
130
|
+
one: "One car",
|
|
131
|
+
other: "{{count}} cars",
|
|
132
|
+
}),
|
|
124
133
|
conditionalContent: cond({
|
|
125
134
|
true: "Validierung ist aktiviert",
|
|
126
135
|
false: "Validierung ist deaktiviert",
|
|
@@ -175,6 +184,13 @@ export default {
|
|
|
175
184
|
">5": "Einige Autos",
|
|
176
185
|
">19": "Viele Autos",
|
|
177
186
|
},
|
|
187
|
+
"pluralContent": {
|
|
188
|
+
"nodeType": "plural",
|
|
189
|
+
"plural": {
|
|
190
|
+
"one": "One car",
|
|
191
|
+
"other": "{{count}} cars",
|
|
192
|
+
},
|
|
193
|
+
},
|
|
178
194
|
},
|
|
179
195
|
"conditionalContent": {
|
|
180
196
|
"nodeType": "condition",
|
|
@@ -222,6 +238,7 @@ Inhaltsknoten sind die Bausteine des Wörterbuchinhalts. Sie können sein:
|
|
|
222
238
|
- **Primitive Werte**: Zeichenketten, Zahlen, Booleans, null, undefined
|
|
223
239
|
- **Typisierte Knoten**: Spezielle Inhaltstypen wie Übersetzungen, Bedingungen, Markdown usw.
|
|
224
240
|
- **Funktionen**: Dynamische Inhalte, die zur Laufzeit ausgewertet werden können [siehe Funktionsabruf](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/function_fetching.md)
|
|
241
|
+
- **Plural-Inhalt**: Siehe Plural-Inhalt [Siehe Plural-Inhalt](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/plural.md)
|
|
225
242
|
- **Verschachtelte Inhalte**: Verweise auf andere Wörterbücher
|
|
226
243
|
|
|
227
244
|
#### Inhaltstypen
|
|
@@ -540,6 +557,8 @@ multilingualContent: t({
|
|
|
540
557
|
});
|
|
541
558
|
```
|
|
542
559
|
|
|
560
|
+
> Siehe [Übersetzungsinhalt (`t`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/translation.md) für weitere Informationen.
|
|
561
|
+
|
|
543
562
|
### Bedingter Inhalt (`cond`)
|
|
544
563
|
|
|
545
564
|
Inhalt, der sich basierend auf booleschen Bedingungen ändert:
|
|
@@ -553,6 +572,8 @@ conditionalContent: cond({
|
|
|
553
572
|
});
|
|
554
573
|
```
|
|
555
574
|
|
|
575
|
+
> Siehe [Bedingter Inhalt (`cond`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/condition.md) für weitere Informationen.
|
|
576
|
+
|
|
556
577
|
### Aufzählungsinhalt (`enu`)
|
|
557
578
|
|
|
558
579
|
Inhalt, der auf aufgezählten Werten basiert und variiert:
|
|
@@ -567,6 +588,23 @@ statusContent: enu({
|
|
|
567
588
|
});
|
|
568
589
|
```
|
|
569
590
|
|
|
591
|
+
> Siehe [Aufzählungsinhalt (`enu`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/enumeration.md) für weitere Informationen.
|
|
592
|
+
|
|
593
|
+
### Plural-Inhalt (`plural`)
|
|
594
|
+
|
|
595
|
+
Inhalt, der je nach Pluralregeln variiert:
|
|
596
|
+
|
|
597
|
+
```typescript
|
|
598
|
+
import { plural } from "intlayer";
|
|
599
|
+
|
|
600
|
+
pluralContent: plural({
|
|
601
|
+
one: "One car",
|
|
602
|
+
other: "{{count}} cars",
|
|
603
|
+
});
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
> Siehe [Plural-Inhalt Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/plural.md) für weitere Informationen.
|
|
607
|
+
|
|
570
608
|
### Einfügeinhalt (`insert`)
|
|
571
609
|
|
|
572
610
|
Inhalt, der in anderen Inhalt eingefügt werden kann:
|
|
@@ -577,6 +615,8 @@ import { insert } from "intlayer";
|
|
|
577
615
|
insertionContent: insert("Dieser Text kann überall eingefügt werden");
|
|
578
616
|
```
|
|
579
617
|
|
|
618
|
+
> Siehe [Einfügeinhalt (`insert`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/insertion.md) für weitere Informationen.
|
|
619
|
+
|
|
580
620
|
### Verschachtelter Inhalt (`nest`)
|
|
581
621
|
|
|
582
622
|
Verweise auf andere Wörterbücher:
|
|
@@ -587,6 +627,8 @@ import { nest } from "intlayer";
|
|
|
587
627
|
nestedContent: nest("about-page");
|
|
588
628
|
```
|
|
589
629
|
|
|
630
|
+
> Siehe [Verschachtelter Inhalt (`nest`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/nesting.md) für weitere Informationen.
|
|
631
|
+
|
|
590
632
|
### Markdown-Inhalt (`md`)
|
|
591
633
|
|
|
592
634
|
Rich-Text-Inhalt im Markdown-Format:
|
|
@@ -599,6 +641,8 @@ markdownContent: md(
|
|
|
599
641
|
);
|
|
600
642
|
```
|
|
601
643
|
|
|
644
|
+
> Siehe [Markdown-Inhalt (`md`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/markdown.md) für weitere Informationen.
|
|
645
|
+
|
|
602
646
|
### HTML-Inhalt (`html`)
|
|
603
647
|
|
|
604
648
|
Rich-HTML-Inhalt, der Standard-Tags oder benutzerdefinierte Komponenten verwenden kann:
|
|
@@ -616,6 +660,8 @@ localizedHtmlContent: t({
|
|
|
616
660
|
});
|
|
617
661
|
```
|
|
618
662
|
|
|
663
|
+
> Siehe [HTML-Inhalt (`html`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/html.md) für weitere Informationen.
|
|
664
|
+
|
|
619
665
|
### Geschlechtsabhängiger Inhalt (`gender`)
|
|
620
666
|
|
|
621
667
|
Inhalt, der sich je nach Geschlecht unterscheidet:
|
|
@@ -630,6 +676,8 @@ genderContent: gender({
|
|
|
630
676
|
});
|
|
631
677
|
```
|
|
632
678
|
|
|
679
|
+
> Siehe [Geschlechtsabhängiger Inhalt (`gender`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/gender.md) für weitere Informationen.
|
|
680
|
+
|
|
633
681
|
### Dateiinhalt (`file`)
|
|
634
682
|
|
|
635
683
|
Verweise auf externe Dateien:
|
|
@@ -640,6 +688,8 @@ import { file } from "intlayer";
|
|
|
640
688
|
fileContent: file("./path/to/content.txt");
|
|
641
689
|
```
|
|
642
690
|
|
|
691
|
+
> Siehe [Dateiinhalt (`file`) Doc](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/file.md) für weitere Informationen.
|
|
692
|
+
|
|
643
693
|
## Erstellen von Inhaltsdateien
|
|
644
694
|
|
|
645
695
|
### Grundstruktur einer Inhaltsdatei
|
package/docs/de/mcp_server.md
CHANGED
|
@@ -51,12 +51,12 @@ Durch die Aktivierung des Intlayer MCP Servers in Ihrer IDE erhalten Sie:
|
|
|
51
51
|
|
|
52
52
|
> Die vollständige Liste der Befehle und Optionen finden Sie in der [Intlayer CLI-Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/cli/index.md).
|
|
53
53
|
|
|
54
|
-
## Lokaler Server (stdio) vs. Remote-Server (
|
|
54
|
+
## Lokaler Server (stdio) vs. Remote-Server (Streamable HTTP)
|
|
55
55
|
|
|
56
56
|
Der MCP-Server kann auf zwei Arten verwendet werden:
|
|
57
57
|
|
|
58
58
|
- Lokaler Server (stdio)
|
|
59
|
-
- Remote-Server (
|
|
59
|
+
- Remote-Server (Streamable HTTP)
|
|
60
60
|
|
|
61
61
|
### Lokaler Server (stdio) (empfohlen)
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Intlayer stellt ein NPM-Paket bereit, das lokal auf Ihrem Rechner installiert we
|
|
|
64
64
|
|
|
65
65
|
Dieser Server ist die empfohlene Methode zur Nutzung des MCP-Servers, da er alle Funktionen des MCP-Servers integriert, einschließlich der CLI-Tools.
|
|
66
66
|
|
|
67
|
-
### Remote-Server (
|
|
67
|
+
### Remote-Server (Streamable HTTP)
|
|
68
68
|
|
|
69
69
|
Der MCP-Server kann auch remote über die SSE-Transportmethode verwendet werden. Dieser Server wird von Intlayer gehostet und ist unter https://mcp.intlayer.org verfügbar. Auf diesen Server kann öffentlich, ohne Authentifizierung zuzugreifen, und die Nutzung ist kostenlos.
|
|
70
70
|
|
|
@@ -97,7 +97,7 @@ bun x intlayer init mcp
|
|
|
97
97
|
Dieser Befehl wird:
|
|
98
98
|
|
|
99
99
|
1. Sie fragen, welche Plattform Sie verwenden (Cursor, VS Code, Claude Desktop usw.).
|
|
100
|
-
2. Sie fragen, welche Transportmethode Sie verwenden möchten (lokal (stdio) oder remote (
|
|
100
|
+
2. Sie fragen, welche Transportmethode Sie verwenden möchten (lokal (stdio) oder remote (Streamable HTTP)).
|
|
101
101
|
3. Automatisch Ihre Konfigurationsdatei aktualisieren (z. B. `.cursor/mcp.json`, `.vscode/mcp.json` oder die globale Claude Desktop-Konfiguration).
|
|
102
102
|
|
|
103
103
|
---
|
|
@@ -107,7 +107,7 @@ Dieser Befehl wird:
|
|
|
107
107
|
1. Öffnen Sie die Befehlspalette (Strg+Umschalt+P oder Cmd+Umschalt+P).
|
|
108
108
|
2. Geben Sie `Intlayer: Setup AI Agent Skills` ein.
|
|
109
109
|
3. Wählen Sie die von Ihnen verwendete Plattform aus (z. B. `VS Code`, `Cursor`, `Windsurf`, `OpenCode`, `Claude Code`, `GitHub Copilot Workspace` usw.).
|
|
110
|
-
4. Wählen Sie den zu installierenden MCP aus (stdio,
|
|
110
|
+
4. Wählen Sie den zu installierenden MCP aus (stdio, Streamable HTTP).
|
|
111
111
|
5. Drücken Sie die Eingabetaste.
|
|
112
112
|
|
|
113
113
|
---
|
|
@@ -131,16 +131,16 @@ Fügen Sie im Stammverzeichnis Ihres Projekts die folgende Konfigurationsdatei `
|
|
|
131
131
|
}
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
### Remote-Server (
|
|
134
|
+
### Remote-Server (Streamable HTTP)
|
|
135
135
|
|
|
136
|
-
Um eine Verbindung zu einem entfernten Intlayer MCP-Server über Server-Sent Events (
|
|
136
|
+
Um eine Verbindung zu einem entfernten Intlayer MCP-Server über Server-Sent Events (Streamable HTTP) herzustellen, können Sie Ihren MCP-Client so konfigurieren, dass er sich mit dem gehosteten Dienst verbindet.
|
|
137
137
|
|
|
138
138
|
```json fileName=".cursor/mcp.json"
|
|
139
139
|
{
|
|
140
140
|
"mcpServers": {
|
|
141
|
-
"intlayer": {
|
|
142
|
-
"
|
|
143
|
-
"
|
|
141
|
+
"intlayer-sse": {
|
|
142
|
+
"command": "npx",
|
|
143
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -172,16 +172,16 @@ Erstellen Sie eine Datei `.vscode/mcp.json` im Stammverzeichnis Ihres Projekts:
|
|
|
172
172
|
}
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
### Remote-Server (
|
|
175
|
+
### Remote-Server (Streamable HTTP)
|
|
176
176
|
|
|
177
|
-
Um eine Verbindung zu einem entfernten Intlayer MCP-Server über Server-Sent Events (
|
|
177
|
+
Um eine Verbindung zu einem entfernten Intlayer MCP-Server über Server-Sent Events (Streamable HTTP) herzustellen, können Sie Ihren MCP-Client so konfigurieren, dass er sich mit dem gehosteten Dienst verbindet.
|
|
178
178
|
|
|
179
179
|
```json fileName=".vscode/mcp.json"
|
|
180
180
|
{
|
|
181
181
|
"servers": {
|
|
182
|
-
"intlayer": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
182
|
+
"intlayer-sse": {
|
|
183
|
+
"command": "npx",
|
|
184
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -191,7 +191,7 @@ Um eine Verbindung zu einem entfernten Intlayer MCP-Server über Server-Sent Eve
|
|
|
191
191
|
|
|
192
192
|
## Einrichtung in ChatGPT
|
|
193
193
|
|
|
194
|
-
### Remote-Server (
|
|
194
|
+
### Remote-Server (Streamable HTTP)
|
|
195
195
|
|
|
196
196
|
Folgen Sie der [offiziellen Dokumentation](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server), um den MCP-Server in ChatGPT zu konfigurieren.
|
|
197
197
|
|
|
@@ -231,6 +231,19 @@ Pfad der Konfigurationsdatei:
|
|
|
231
231
|
}
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
+
### Remote-Server (Streamable HTTP)
|
|
235
|
+
|
|
236
|
+
```json fileName="claude_desktop_config.json"
|
|
237
|
+
{
|
|
238
|
+
"mcpServers": {
|
|
239
|
+
"intlayer-sse": {
|
|
240
|
+
"command": "npx",
|
|
241
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
234
247
|
---
|
|
235
248
|
|
|
236
249
|
## Verwendung des MCP-Servers über die CLI
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-05-10
|
|
3
|
+
updatedAt: 2026-05-10
|
|
4
|
+
title: Sync PO Plugin
|
|
5
|
+
description: Synchronisieren Sie Intlayer-Wörterbücher mit Gettext PO-Dateien. Behalten Sie Ihr bestehendes i18n bei, während Sie Intlayer zum Verwalten, Übersetzen und Testen Ihrer Nachrichten verwenden.
|
|
6
|
+
keywords:
|
|
7
|
+
- Intlayer
|
|
8
|
+
- Sync PO
|
|
9
|
+
- Gettext
|
|
10
|
+
- i18n
|
|
11
|
+
- Übersetzungen
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- plugin
|
|
15
|
+
- sync-po
|
|
16
|
+
youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
|
|
17
|
+
history:
|
|
18
|
+
- version: 8.9.4
|
|
19
|
+
date: 2026-05-10
|
|
20
|
+
changes: "Erste Dokumentation für das Sync PO Plugin"
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Sync PO (i18n Brücken) - Sync PO mit ICU / i18next Unterstützung
|
|
24
|
+
|
|
25
|
+
Verwenden Sie Intlayer als Add-on zu Ihrem bestehenden i18n-Stack. Dieses Plugin hält Ihre Gettext PO-Nachrichten mit Intlayer-Wörterbüchern synchron, damit Sie:
|
|
26
|
+
|
|
27
|
+
- Ihren bestehenden PO-basierten Übersetzungs-Workflow beibehalten können.
|
|
28
|
+
- Ihre Nachrichten mit Intlayer (CLI, CI, Anbieter, CMS) verwalten und übersetzen können, ohne Ihre App zu refaktorisieren.
|
|
29
|
+
- Tutorials und SEO-Inhalte für jedes Ökosystem bereitstellen können, während Sie Intlayer als PO-Verwaltungsebene vorschlagen.
|
|
30
|
+
|
|
31
|
+
Hinweise und aktueller Umfang:
|
|
32
|
+
|
|
33
|
+
- Externalisierung in das CMS funktioniert für Übersetzungen und klassischen Text.
|
|
34
|
+
- Noch keine Unterstützung für Platzhalter, Plurale/ICU oder fortgeschrittene Laufzeitfunktionen anderer Bibliotheken innerhalb der PO-Einträge selbst.
|
|
35
|
+
- Der visuelle Editor wird für i18n-Ausgaben von Drittanbietern noch nicht unterstützt.
|
|
36
|
+
|
|
37
|
+
### Wann Sie dieses Plugin verwenden sollten
|
|
38
|
+
|
|
39
|
+
- Sie verwenden bereits Gettext PO-Dateien für Ihre Übersetzungen.
|
|
40
|
+
- Sie möchten KI-gestütztes Ausfüllen, Tests in der CI und Content-Ops nutzen, ohne Ihre Rendering-Laufzeit zu ändern.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add -D @intlayer/sync-po-plugin
|
|
46
|
+
# oder
|
|
47
|
+
npm i -D @intlayer/sync-po-plugin
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Plugins
|
|
51
|
+
|
|
52
|
+
Dieses Paket bietet zwei Plugins:
|
|
53
|
+
|
|
54
|
+
- `loadPO`: Lädt PO-Dateien in Intlayer-Wörterbücher.
|
|
55
|
+
- Dieses Plugin wird verwendet, um PO-Dateien aus einer Quelle zu laden und in Intlayer-Wörterbücher zu integrieren. Es kann die gesamte Codebasis scannen und nach spezifischen PO-Dateien suchen.
|
|
56
|
+
Dieses Plugin kann verwendet werden:
|
|
57
|
+
- wenn Sie eine i18n-Bibliothek verwenden, die einen bestimmten Ort für das Laden Ihrer PO-Dateien vorschreibt, Sie aber Ihre Inhaltsdeklaration an einer beliebigen Stelle in Ihrer Codebasis platzieren möchten.
|
|
58
|
+
- Es kann auch verwendet werden, wenn Sie Ihre Nachrichten von einer Remote-Quelle (z. B. einem CMS, einer API usw.) abrufen und Ihre Nachrichten in PO-Dateien speichern möchten.
|
|
59
|
+
|
|
60
|
+
> Unter der Haube scannt dieses Plugin die gesamte Codebasis, sucht nach spezifischen PO-Dateien und lädt sie in Intlayer-Wörterbücher.
|
|
61
|
+
> Beachten Sie, dass dieses Plugin die Ausgabe und Übersetzungen nicht zurück in die PO-Dateien schreibt.
|
|
62
|
+
|
|
63
|
+
- `syncPO`: Synchronisiert PO-Dateien mit Intlayer-Wörterbüchern.
|
|
64
|
+
- Dieses Plugin wird verwendet, um PO-Dateien mit Intlayer-Wörterbüchern zu synchronisieren. Es kann den angegebenen Ort scannen und die PO-Dateien laden, die dem Muster für spezifische PO-Dateien entsprechen. Dieses Plugin ist nützlich, wenn Sie die Vorteile von Intlayer nutzen möchten, während Sie eine andere i18n-Bibliothek verwenden.
|
|
65
|
+
|
|
66
|
+
## Verwendung beider Plugins
|
|
67
|
+
|
|
68
|
+
```ts fileName="intlayer.config.ts"
|
|
69
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
70
|
+
import { loadPO, syncPO } from "@intlayer/sync-po-plugin";
|
|
71
|
+
|
|
72
|
+
const config: IntlayerConfig = {
|
|
73
|
+
internationalization: {
|
|
74
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
75
|
+
defaultLocale: Locales.ENGLISH,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// Halten Sie Ihre aktuellen PO-Dateien mit Intlayer-Wörterbüchern synchron
|
|
79
|
+
plugins: [
|
|
80
|
+
/**
|
|
81
|
+
* Lädt alle PO-Dateien in src, die dem Muster {key}.i18n.po entsprechen
|
|
82
|
+
*/
|
|
83
|
+
loadPO({
|
|
84
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
85
|
+
locale: Locales.ENGLISH,
|
|
86
|
+
priority: 1, // Stellt sicher, dass diese PO-Dateien Vorrang vor Dateien unter `./locales/en/${key}.po` haben
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* Lädt die Ausgabe und Übersetzungen und schreibt sie zurück in die PO-Dateien im Verzeichnis locales
|
|
90
|
+
*/
|
|
91
|
+
syncPO({
|
|
92
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
93
|
+
priority: 0,
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default config;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## `syncPO` Plugin
|
|
102
|
+
|
|
103
|
+
### Schnellstart
|
|
104
|
+
|
|
105
|
+
Fügen Sie das Plugin zu Ihrer `intlayer.config.ts` hinzu und verweisen Sie auf Ihre bestehende PO-Struktur.
|
|
106
|
+
|
|
107
|
+
```ts fileName="intlayer.config.ts"
|
|
108
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
109
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
110
|
+
|
|
111
|
+
const config: IntlayerConfig = {
|
|
112
|
+
internationalization: {
|
|
113
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
114
|
+
defaultLocale: Locales.ENGLISH,
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
// Halten Sie Ihre aktuellen PO-Dateien mit Intlayer-Wörterbüchern synchron
|
|
118
|
+
plugins: [
|
|
119
|
+
syncPO({
|
|
120
|
+
// Layout pro Sprache und pro Namespace
|
|
121
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
122
|
+
}),
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export default config;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Alternative: Eine Datei pro Sprache:
|
|
130
|
+
|
|
131
|
+
```ts fileName="intlayer.config.ts"
|
|
132
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
133
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
134
|
+
|
|
135
|
+
const config: IntlayerConfig = {
|
|
136
|
+
internationalization: {
|
|
137
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
138
|
+
defaultLocale: Locales.ENGLISH,
|
|
139
|
+
},
|
|
140
|
+
plugins: [
|
|
141
|
+
syncPO({
|
|
142
|
+
source: ({ locale }) => `./locales/${locale}.po`,
|
|
143
|
+
}),
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export default config;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### Wie es funktioniert
|
|
151
|
+
|
|
152
|
+
- Lesen: Das Plugin entdeckt PO-Dateien über Ihren `source`-Builder und lädt sie als Intlayer-Wörterbücher.
|
|
153
|
+
- Schreiben: Nach dem Build und Ausfüllen schreibt es lokalisierte PO-Dateien zurück in dieselben Pfade (mit korrekten Gettext-Headern).
|
|
154
|
+
- Automatisches Ausfüllen: Das Plugin deklariert einen `autoFill`-Pfad für jedes Wörterbuch. Das Ausführen von `intlayer fill` aktualisiert standardmäßig nur fehlende Übersetzungen in Ihren PO-Dateien.
|
|
155
|
+
|
|
156
|
+
API:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
syncPO({
|
|
160
|
+
source: ({ key, locale }) => string, // erforderlich
|
|
161
|
+
location?: string, // optionales Label, Standard: "sync-po::path/to/source"
|
|
162
|
+
priority?: number, // optionale Priorität für die Konfliktlösung, Standard: 0
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Mehrere PO-Quellen und Priorität
|
|
166
|
+
|
|
167
|
+
Sie können mehrere `syncPO`-Plugins hinzufügen, um verschiedene PO-Quellen zu synchronisieren. Dies ist nützlich, wenn Sie mehrere Übersetzungsquellen oder unterschiedliche PO-Strukturen in Ihrem Projekt haben.
|
|
168
|
+
|
|
169
|
+
#### Prioritätssystem
|
|
170
|
+
|
|
171
|
+
Wenn mehrere Plugins auf denselben Wörterbuchschlüssel abzielen, bestimmt der Parameter `priority`, welches Plugin Vorrang hat:
|
|
172
|
+
|
|
173
|
+
- Höhere Prioritätszahlen gewinnen gegenüber niedrigeren
|
|
174
|
+
- Die Standardpriorität von `.content`-Dateien ist `0`
|
|
175
|
+
- Die Standardpriorität von Plugins ist `0`
|
|
176
|
+
- Plugins mit derselben Priorität werden in der Reihenfolge verarbeitet, in der sie in der Konfiguration erscheinen
|
|
177
|
+
|
|
178
|
+
```ts fileName="intlayer.config.ts"
|
|
179
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
180
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
181
|
+
|
|
182
|
+
const config: IntlayerConfig = {
|
|
183
|
+
internationalization: {
|
|
184
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
185
|
+
defaultLocale: Locales.ENGLISH,
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
plugins: [
|
|
189
|
+
// Primäre PO-Quelle (höchste Priorität)
|
|
190
|
+
syncPO({
|
|
191
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
192
|
+
location: "main-translations",
|
|
193
|
+
priority: 10,
|
|
194
|
+
}),
|
|
195
|
+
|
|
196
|
+
// Fallback PO-Quelle (niedrigere Priorität)
|
|
197
|
+
syncPO({
|
|
198
|
+
source: ({ locale }) => `./fallback-locales/${locale}.po`,
|
|
199
|
+
location: "fallback-translations",
|
|
200
|
+
priority: 5,
|
|
201
|
+
}),
|
|
202
|
+
|
|
203
|
+
// Legacy PO-Quelle (niedrigste Priorität)
|
|
204
|
+
syncPO({
|
|
205
|
+
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.po`,
|
|
206
|
+
location: "legacy-translations",
|
|
207
|
+
priority: 1,
|
|
208
|
+
}),
|
|
209
|
+
],
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export default config;
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Load PO Plugin
|
|
216
|
+
|
|
217
|
+
### Schnellstart
|
|
218
|
+
|
|
219
|
+
Fügen Sie das Plugin zu Ihrer `intlayer.config.ts` hinzu, um bestehende PO-Dateien als Intlayer-Wörterbücher zu erfassen. Dieses Plugin ist schreibgeschützt (keine Schreibvorgänge auf die Festplatte):
|
|
220
|
+
|
|
221
|
+
```ts fileName="intlayer.config.ts"
|
|
222
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
223
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
224
|
+
|
|
225
|
+
const config: IntlayerConfig = {
|
|
226
|
+
internationalization: {
|
|
227
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
228
|
+
defaultLocale: Locales.ENGLISH,
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
plugins: [
|
|
232
|
+
// Erfassen Sie PO-Nachrichten, die sich an einer beliebigen Stelle in Ihrem Quellbaum befinden
|
|
233
|
+
loadPO({
|
|
234
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
235
|
+
// Lädt eine einzelne Sprache pro Plugin-Instanz (standardmäßig die defaultLocale der Konfiguration)
|
|
236
|
+
locale: Locales.ENGLISH,
|
|
237
|
+
priority: 0,
|
|
238
|
+
}),
|
|
239
|
+
],
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export default config;
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Alternative: Layout pro Sprache, weiterhin schreibgeschützt (nur die ausgewählte Sprache wird geladen):
|
|
246
|
+
|
|
247
|
+
```ts fileName="intlayer.config.ts"
|
|
248
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
249
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
250
|
+
|
|
251
|
+
const config: IntlayerConfig = {
|
|
252
|
+
internationalization: {
|
|
253
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
254
|
+
defaultLocale: Locales.ENGLISH,
|
|
255
|
+
},
|
|
256
|
+
plugins: [
|
|
257
|
+
loadPO({
|
|
258
|
+
// Nur Dateien für Locales.FRENCH werden über dieses Muster geladen
|
|
259
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
260
|
+
locale: Locales.FRENCH,
|
|
261
|
+
}),
|
|
262
|
+
],
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
export default config;
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Wie es funktioniert
|
|
269
|
+
|
|
270
|
+
- Entdecken: Erstellt einen Glob aus Ihrem `source`-Builder und sammelt passende PO-Dateien.
|
|
271
|
+
- Erfassen: Lädt jede PO-Datei mit der angegebenen `locale` als Intlayer-Wörterbuch.
|
|
272
|
+
- Schreibgeschützt: Schreibt oder formatiert keine Ausgabedateien; verwenden Sie `syncPO`, wenn Sie eine bidirektionale Synchronisierung benötigen.
|
|
273
|
+
- Bereit für automatisches Ausfüllen: Definiert einen `fill`-Pfad, damit `intlayer content fill` fehlende Schlüssel ausfüllen kann.
|
|
274
|
+
|
|
275
|
+
### API
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
loadPO({
|
|
279
|
+
// Pfade zu Ihren PO-Dateien erstellen. `locale` ist optional, wenn Ihre Struktur kein Sprachsegment hat
|
|
280
|
+
source: ({ key, locale }) => string,
|
|
281
|
+
|
|
282
|
+
// Zielsprache für die von dieser Plugin-Instanz geladenen Wörterbücher
|
|
283
|
+
// Standardmäßig configuration.internationalization.defaultLocale
|
|
284
|
+
locale?: Locale,
|
|
285
|
+
|
|
286
|
+
// Optionales Label zur Identifizierung der Quelle
|
|
287
|
+
location?: string, // Standard: "plugin"
|
|
288
|
+
|
|
289
|
+
// Priorität für die Konfliktlösung mit anderen Quellen
|
|
290
|
+
priority?: number, // Standard: 0
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Verhalten und Konventionen
|
|
295
|
+
|
|
296
|
+
- Wenn Ihre `source`-Maske einen Sprach-Platzhalter enthält, werden nur Dateien für die ausgewählte `locale` erfasst.
|
|
297
|
+
- Wenn kein `{key}`-Segment in Ihrer Maske vorhanden ist, lautet der Wörterbuchschlüssel "index".
|
|
298
|
+
- Schlüssel werden aus Dateipfaden abgeleitet, indem der Platzhalter `{key}` in Ihrem `source`-Builder ersetzt wird.
|
|
299
|
+
- Das Plugin verwendet nur entdeckte Dateien und erzeugt keine fehlenden Sprachen oder Schlüssel.
|
|
300
|
+
- Der `fill`-Pfad wird aus Ihrer `source` abgeleitet und verwendet, um fehlende Werte über die CLI zu aktualisieren, wenn Sie sich dafür entscheiden.
|
|
301
|
+
|
|
302
|
+
## Konfliktlösung
|
|
303
|
+
|
|
304
|
+
Wenn derselbe Übersetzungsschlüssel in mehreren PO-Quellen vorhanden ist:
|
|
305
|
+
|
|
306
|
+
1. Das Plugin mit der höchsten Priorität bestimmt den endgültigen Wert
|
|
307
|
+
2. Quellen mit niedrigerer Priorität werden als Fallback für fehlende Schlüssel verwendet
|
|
308
|
+
3. Dies ermöglicht es Ihnen, Legacy-Übersetzungen beizubehalten, während Sie schrittweise zu neuen Strukturen migrieren
|
|
309
|
+
|
|
310
|
+
## CLI
|
|
311
|
+
|
|
312
|
+
Die synchronisierten PO-Dateien werden wie andere `.content`-Dateien behandelt. Das bedeutet, dass alle Intlayer-Befehle für die synchronisierten PO-Dateien verfügbar sind. Einschließlich:
|
|
313
|
+
|
|
314
|
+
- `intlayer content test`, um zu testen, ob Übersetzungen fehlen
|
|
315
|
+
- `intlayer content list`, um die synchronisierten PO-Dateien aufzulisten
|
|
316
|
+
- `intlayer content fill`, um fehlende Übersetzungen auszufüllen
|
|
317
|
+
- `intlayer content push`, um die synchronisierten PO-Dateien hochzuladen
|
|
318
|
+
- `intlayer content pull`, um die synchronisierten PO-Dateien herunterzuladen
|
|
319
|
+
|
|
320
|
+
Weitere Details finden Sie im [Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/index.md).
|
|
321
|
+
|
|
322
|
+
## Einschränkungen (aktuell)
|
|
323
|
+
|
|
324
|
+
- Keine Unterstützung für Platzhalter oder Plurale/ICU bei der Zieladressierung von Drittanbieter-Bibliotheken.
|
|
325
|
+
- Der visuelle Editor ist für Nicht-Intlayer-Laufzeiten noch nicht verfügbar.
|
|
326
|
+
- Nur PO-Synchronisation; andere Katalogformate als PO werden nicht unterstützt.
|
|
327
|
+
|
|
328
|
+
## Warum das wichtig ist
|
|
329
|
+
|
|
330
|
+
- Wir können etablierte i18n-Lösungen empfehlen und Intlayer als Add-on positionieren.
|
|
331
|
+
- Wir nutzen deren SEO/Keywords mit Tutorials, die damit enden, Intlayer für die PO-Verwaltung vorzuschlagen.
|
|
332
|
+
- Erweitert die Zielgruppe von „neuen Projekten“ auf „jedes Team, das bereits i18n verwendet“.
|
|
@@ -61,6 +61,13 @@ Because the problem is hard, many solutions exist—some focused on DX, others o
|
|
|
61
61
|
|
|
62
62
|
Intlayer tries to optimize across these dimensions.
|
|
63
63
|
|
|
64
|
+
## TL;DR
|
|
65
|
+
|
|
66
|
+
- **Intlayer** & **next-translate**: Top picks for Next.js performance, offering the smallest footprint and best static rendering support.
|
|
67
|
+
- **next-intl**: Trendiest option but heavy and complex to optimize for large applications.
|
|
68
|
+
- **next-i18next**: Popular and plugin-rich, but carries significant bundle weight (~3× Intlayer).
|
|
69
|
+
- **Avoid**: **gt-next** and **lingo.dev** due to severe performance issues, vendor lock-in, and build-breaking bugs.
|
|
70
|
+
|
|
64
71
|
## Test your app
|
|
65
72
|
|
|
66
73
|
To surface these issues, I built a free scanner you can try [here](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -99,7 +106,7 @@ Finally, `Intlayer` applies a build-time optimization so `useIntlayer('my-key')`
|
|
|
99
106
|
For this benchmark, we compared the following libraries:
|
|
100
107
|
|
|
101
108
|
- `Base App` (No i18n library)
|
|
102
|
-
- `next-intlayer` (v8.7.
|
|
109
|
+
- `next-intlayer` (v8.7.12)
|
|
103
110
|
- `next-i18next` (v16.0.5)
|
|
104
111
|
- `next-intl` (v4.9.1)
|
|
105
112
|
- `@lingui/core` (v5.3.0)
|
|
@@ -187,6 +194,8 @@ Personally I dislike having to regenerate JS files before every push, which crea
|
|
|
187
194
|
Even if in theory the tree-shaking strategy works, it does include all locales in the bundle anyway. Paraglide offers no way to lazy-load the content. That means your page size grows in line with the number of locales you have.
|
|
188
195
|
Finally, in comparison with other solutions, Paraglide does not use a store (e.g. React context) to retrieve the current locale to render the content. For each node parsed, it will request the locale from the localStorage / cookie etc. It leads to execution of unnecessary logic that impacts the component reactivity.
|
|
189
196
|
|
|
197
|
+
> Note on paraglide: the solution inject code in your codebase to import, as a result the metric 'lib size' in the benchmark report is almost 0. Code gen is a good think, because the function used will include only the necessary logic (prefix all vs no prefix, cookie vs storage etc). In comparison Intlayer process to this filtering using env variables injections in the build to force the bundler to tree shake the content depending of the logic. Thanks to this, paraglide and intlayer end up being solution 6-10 times lighter than i18next or next-intl.
|
|
198
|
+
|
|
190
199
|
### 3 - Acceptable solutions
|
|
191
200
|
|
|
192
201
|
**(Tolgee)** (`@tolgee/react@7.0.0`):
|
|
@@ -217,7 +226,7 @@ Message formats also differ: `next-intl` uses ICU MessageFormat, while `i18next`
|
|
|
217
226
|
|
|
218
227
|
`next-translate` is my main recommendation if you like a `t()`-style API. It is elegant via `next-translate-plugin`, loading namespaces through `getStaticProps` with a Webpack / Turbopack loader. It is also the lightest option here (~2.5kb). For namespacing, defining namespaces per page or route in config is well thought out and easier to maintain than main alternatives like **next-intl** or **next-i18next**. In version `3.1.2`, I noted that static rendering did not work; Next.js fell back to dynamic rendering.
|
|
219
228
|
|
|
220
|
-
**(Intlayer)** (`next-intlayer@8.7.
|
|
229
|
+
**(Intlayer)** (`next-intlayer@8.7.12`):
|
|
221
230
|
|
|
222
231
|
I will not personally judge `next-intlayer` for objectivity’s sake, since it is my own solution.
|
|
223
232
|
|