@intlayer/docs 8.9.4 → 8.9.6-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -22
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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/plugins/sync-po.md +0 -21
- 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
|
@@ -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
|
|
@@ -160,28 +160,6 @@ syncPO({
|
|
|
160
160
|
source: ({ key, locale }) => string, // erforderlich
|
|
161
161
|
location?: string, // optionales Label, Standard: "sync-po::path/to/source"
|
|
162
162
|
priority?: number, // optionale Priorität für die Konfliktlösung, Standard: 0
|
|
163
|
-
format?: 'icu' | 'i18next' | 'vue-i18n', // optional, nur erforderlich, wenn Ihre msgstr-Werte eine spezifische Interpolationssyntax verwenden
|
|
164
|
-
});
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
#### `format` ('icu' | 'i18next' | 'vue-i18n')
|
|
168
|
-
|
|
169
|
-
PO-Dateien sind immer Gettext Portable Object-Dateien – das ist festgelegt. Diese Option beschreibt nur die **Interpolationssyntax**, die innerhalb der `msgstr`-Werte verwendet wird, damit Intlayer sie zum Zeitpunkt des Parsens (über `formatDictionary`) in sein eigenes Format konvertieren und beim Schreiben der Ausgabe zurückkonvertieren kann.
|
|
170
|
-
|
|
171
|
-
- `undefined` _(Standard)_: `msgstr`-Werte werden als einfache Zeichenfolgen behandelt – keine Transformation. Verwenden Sie dies für die meisten PO-Dateien.
|
|
172
|
-
- `'icu'`: `msgstr`-Werte verwenden die ICU-Nachrichtensyntax (z. B. `{count, plural, one {# item} other {# items}}`).
|
|
173
|
-
- `'i18next'`: `msgstr`-Werte verwenden die i18next-Interpolationssyntax (z. B. `{{variable}}`).
|
|
174
|
-
- `'vue-i18n'`: `msgstr`-Werte verwenden die Vue I18n-Syntax.
|
|
175
|
-
|
|
176
|
-
> Die Transformation wird beim Laden durch `formatDictionary` von `@intlayer/chokidar` angewendet und beim Schreiben mit `formatDictionaryOutput` umgekehrt. Bei komplexen Regeln wie ICU-Pluralen ist die Genauigkeit bei der Hin- und Rückkonvertierung nicht garantiert.
|
|
177
|
-
|
|
178
|
-
**Beispiel – PO-Dateien enthalten Interpolation im i18next-Stil:**
|
|
179
|
-
|
|
180
|
-
```ts
|
|
181
|
-
syncPO({
|
|
182
|
-
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
183
|
-
format: "i18next",
|
|
184
|
-
}),
|
|
185
163
|
```
|
|
186
164
|
|
|
187
165
|
### Mehrere PO-Quellen und Priorität
|
|
@@ -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
|
|
|
@@ -57,6 +57,13 @@ In practice, for the least optimized implementations, an internationalized page
|
|
|
57
57
|
|
|
58
58
|
The other impact is on developer experience: how you declare content, types, namespace organization, dynamic loading, and reactivity when the locale changes.
|
|
59
59
|
|
|
60
|
+
## TL;DR
|
|
61
|
+
|
|
62
|
+
- **Intlayer**: Recommended choice for professional Solid applications needing advanced features and optimization (v8.7.12).
|
|
63
|
+
- **@solid-primitives/i18n**: Excellent lightweight alternative for simple projects, though lacks advanced features like lazy loading.
|
|
64
|
+
- **solid-i18next**: Standard but heavy option (~4.7× Intlayer) with same downsides as React i18next.
|
|
65
|
+
- **Paraglide**: Innovative approach but complex DX and tree-shaking issues in some setups.
|
|
66
|
+
|
|
60
67
|
## Test your app
|
|
61
68
|
|
|
62
69
|
To quickly spot i18n leakage issues, I set up a free scanner available [here](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -88,8 +95,9 @@ For this benchmark, we compared the following libraries:
|
|
|
88
95
|
|
|
89
96
|
- `Base App` (No i18n library)
|
|
90
97
|
- `solid-intlayer` (v8.7.12)
|
|
91
|
-
- `@solid-primitives/i18n` (
|
|
98
|
+
- `@solid-primitives/i18n` (v2.2.1)
|
|
92
99
|
- `solid-i18next` (v17.0.2)
|
|
100
|
+
- `@inlang/paraglide-js` (v2.17.0)
|
|
93
101
|
|
|
94
102
|
The framework is `Solid` with a multilingual app of **10 pages** and **10 languages**.
|
|
95
103
|
|
|
@@ -133,19 +141,29 @@ I ran the same multilingual app in a real browser for every stack, then wrote do
|
|
|
133
141
|
|
|
134
142
|
### 1 - Solutions to avoid
|
|
135
143
|
|
|
144
|
+
> No clear solution to avoid in solid ecosystem.
|
|
145
|
+
|
|
146
|
+
### 2 - Acceptable solutions
|
|
147
|
+
|
|
136
148
|
**(solid-i18next)** (`solid-i18next@17.0.2`):
|
|
137
149
|
|
|
138
150
|
`solid-i18next` is probably the most popular option because it was among the first to serve JavaScript app i18n needs. It also has a wide set of community plugins for specific problems.
|
|
139
151
|
|
|
140
|
-
|
|
152
|
+
The package is heavy (~14.6kb, which is about 4.7× `solid-intlayer`).
|
|
141
153
|
|
|
142
|
-
|
|
154
|
+
Still, it shares the same major downsides as stacks built on `t('a.b.c')`: optimizations are possible but very time-consuming, and large projects risk bad practices (namespaces + dynamic loading + types).
|
|
143
155
|
|
|
144
|
-
**(@solid-primitives/i18n)** (`@solid-primitives/i18n@
|
|
156
|
+
**(@solid-primitives/i18n)** (`@solid-primitives/i18n@2.2.1`):
|
|
145
157
|
|
|
146
158
|
Solid primitive is extremely light and efficient, I recommend that solution for light projects, but it can quickly become lacking features for professional solutions including cookie management, proxy redirection, formatters etc.
|
|
147
159
|
It also misses lazy loading and scoping namespaces for page size optimization.
|
|
148
160
|
|
|
161
|
+
**(Paraglide)** (`@inlang/paraglide-js@2.17.0`):
|
|
162
|
+
|
|
163
|
+
`Paraglide` offers an innovative, well-thought-out approach. Even so, in this benchmark the tree-shaking their company advertises did not work for my implementation. The workflow and DX are also more complex than other options.
|
|
164
|
+
Personally I dislike having to regenerate JS files before every push, which creates constant merge conflict risk via PRs.
|
|
165
|
+
Finally, in comparison with other solutions, Paraglide does not use a store (e.g. Solid signal) 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.
|
|
166
|
+
|
|
149
167
|
### 3 - Recommendations
|
|
150
168
|
|
|
151
169
|
**(Intlayer)** (`solid-intlayer@8.7.12`):
|
|
@@ -57,6 +57,12 @@ In practice, for the least optimized implementations, an internationalized page
|
|
|
57
57
|
|
|
58
58
|
The other impact is on developer experience: how you declare content, types, namespace organization, dynamic loading, and reactivity when the locale changes.
|
|
59
59
|
|
|
60
|
+
## TL;DR
|
|
61
|
+
|
|
62
|
+
- **Intlayer**: The most performance-efficient choice (v8.7.12) with the smallest footprint.
|
|
63
|
+
- **Paraglide**: Strong contender for tree-shaking but has a more complex developer experience and reactivity overhead.
|
|
64
|
+
- **svelte-i18n**: Feature-complete and standard for Svelte, but carries a much larger bundle weight (~7× Intlayer).
|
|
65
|
+
|
|
60
66
|
## Test your app
|
|
61
67
|
|
|
62
68
|
To quickly spot i18n leakage issues, I set up a free scanner available [here](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -88,8 +94,8 @@ For this benchmark, we compared the following libraries:
|
|
|
88
94
|
|
|
89
95
|
- `Base App` (No i18n library)
|
|
90
96
|
- `svelte-intlayer` (v8.7.12)
|
|
91
|
-
- `svelte-i18n` (
|
|
92
|
-
- `@inlang/paraglide-js` (v2.
|
|
97
|
+
- `svelte-i18n` (v4.0.1)
|
|
98
|
+
- `@inlang/paraglide-js` (v2.17.0)
|
|
93
99
|
|
|
94
100
|
The framework is `Svelte` with a multilingual app of **10 pages** and **10 languages**.
|
|
95
101
|
|
|
@@ -133,7 +139,11 @@ I ran the same multilingual app in a real browser for every stack, then wrote do
|
|
|
133
139
|
|
|
134
140
|
### 1 - Solutions to avoid
|
|
135
141
|
|
|
136
|
-
|
|
142
|
+
> No clear solution to avoid in svelte ecosystem.
|
|
143
|
+
|
|
144
|
+
### 2 - Acceptable solutions
|
|
145
|
+
|
|
146
|
+
**(Paraglide)** (`@inlang/paraglide-js@2.17.0`):
|
|
137
147
|
|
|
138
148
|
`Paraglide` offers an innovative, well-thought-out approach. In the context of a Vite + Svelte app, the tree-shaking their company advertises works as expected, which is great.
|
|
139
149
|
But in the case of a React + TanStack Start, the tree-shaking did not work as expected, same for Next.js. That said, I would be double-checking the usage of Paraglide in a Svelte and TanStack Start project.
|
|
@@ -141,11 +151,13 @@ The workflow and DX are also more complex than other options.
|
|
|
141
151
|
Personally I dislike having to regenerate JS files before every push, which creates constant merge conflict risk via PRs. The tool also seems more focused on Vite than on Next.js.
|
|
142
152
|
Finally, in comparison with other solutions, Paraglide does not use a store (e.g. Svelte store) 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.
|
|
143
153
|
|
|
154
|
+
> 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 injection during 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.
|
|
155
|
+
|
|
144
156
|
**(svelte-i18n)** (`svelte-i18n@3.4.0`):
|
|
145
157
|
|
|
146
|
-
This solution answers all needs for i18n in a Svelte project. But as it's the case for i18next or other main i18n solutions it's a bit heavy (
|
|
158
|
+
This solution answers all needs for i18n in a Svelte project. But as it's the case for i18next or other main i18n solutions it's a bit heavy (~15.9kb, which is about 7× `svelte-intlayer`).
|
|
147
159
|
|
|
148
|
-
###
|
|
160
|
+
### 3 - Recommendations
|
|
149
161
|
|
|
150
162
|
**(Intlayer)** (`svelte-intlayer@8.7.12`):
|
|
151
163
|
|
|
@@ -57,6 +57,13 @@ In practice, for the least optimized implementations, an internationalized page
|
|
|
57
57
|
|
|
58
58
|
The other impact is on developer experience: how you declare content, types, namespace organization, dynamic loading, and reactivity when the locale changes.
|
|
59
59
|
|
|
60
|
+
## TL;DR
|
|
61
|
+
|
|
62
|
+
- **Intlayer**: Provides the best performance and smallest bundle size (v8.7.12) for TanStack Start.
|
|
63
|
+
- **react-i18next** & **use-intl**: Mature alternatives with large ecosystems, but significantly heavier and more complex to optimize.
|
|
64
|
+
- **Paraglide**: Innovative tree-shaking idea that does not work in practice. Complex DX and reactivity overhead in TanStack Start.
|
|
65
|
+
- **Avoid**: **General Translation (GT)** and **Lingo.dev** due to severe performance issues, AI quota limits, and vendor lock-in.
|
|
66
|
+
|
|
60
67
|
## Test your app
|
|
61
68
|
|
|
62
69
|
To quickly spot i18n leakage issues, I set up a free scanner available [here](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -87,7 +94,7 @@ Syntaxes built around `const t = useTranslation()` + `t('a.b.c')` are very conve
|
|
|
87
94
|
For this benchmark, we compared the following libraries:
|
|
88
95
|
|
|
89
96
|
- `Base App` (No i18n library)
|
|
90
|
-
- `react-intlayer` (v8.7.
|
|
97
|
+
- `react-intlayer` (v8.7.12)
|
|
91
98
|
- `react-i18next` (v17.0.2)
|
|
92
99
|
- `use-intl` (v4.9.1)
|
|
93
100
|
- `@lingui/core` (v5.3.0)
|
|
@@ -146,7 +153,7 @@ Issues encountered:
|
|
|
146
153
|
|
|
147
154
|
**(General Translation)** (`gt-react@latest`):
|
|
148
155
|
|
|
149
|
-
- For an app around 110kb, `gt-react` can add more than 440kb extra (
|
|
156
|
+
- For an app around 110kb, `gt-react` can add more than 440kb extra (~439.8kb, which is about 93× `react-intlayer`). There is a serious quality issue from the developer experience side.
|
|
150
157
|
- `Quota Exceeded, please upgrade your plan` on the very first build with General Translation.
|
|
151
158
|
- Translations are not rendered; I get the error `Error: <T> used on the client-side outside of <GTProvider>`, which seems to be a bug in the library.
|
|
152
159
|
- While implementing **gt-tanstack-start-react**, I also came across an [issue](https://github.com/generaltranslation/gt/issues/1210#event-24510646961) with the library: `does not provide an export named 'printAST' - @formatjs/icu-messageformat-parser`, which was making the application break. After reporting this issue, the maintainer fixed it within 24 hours.
|
|
@@ -174,15 +181,19 @@ The idea behind `Wuchale` is interesting but not yet a viable solution. I hit re
|
|
|
174
181
|
Personally I dislike having to regenerate JS files before every push, which creates constant merge conflict risk via PRs. The tool also seems more focused on Vite than on Next.js.
|
|
175
182
|
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.
|
|
176
183
|
|
|
184
|
+
> 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.
|
|
185
|
+
|
|
177
186
|
**(Tolgee)** (`@tolgee/react@7.0.0`):
|
|
178
187
|
|
|
179
188
|
`Tolgee` addresses many of the issues mentioned earlier. I found it harder to get started with than other tools with similar approaches. It does not provide type safety, which also makes catching missing keys at compile time much harder. I had to wrap Tolgee’s APIs with my own to add missing-key detection.
|
|
180
189
|
|
|
190
|
+
The package is fairly heavy (~11.1kb, which is more than 2× `react-intlayer`).
|
|
191
|
+
|
|
181
192
|
On TanStack Start I also had reactivity problems: on locale change I had to force the provider to rerender and subscribe to locale-change events so loading in another language behaved correctly.
|
|
182
193
|
|
|
183
194
|
**(use-intl)** (`use-intl@4.9.1`):
|
|
184
195
|
|
|
185
|
-
`use-intl` is the most fashionable “intl” piece in the React ecosystem (same family as `next-intl`) and is often pushed by AI agents, but in my view wrongly so in a performance-first setting. Getting started is fairly simple. In practice, the process to optimize and limit leakage is quite complex. Likewise, combining dynamic loading + namespacing + TypeScript types slows development a lot.
|
|
196
|
+
`use-intl` is the most fashionable “intl” piece in the React ecosystem (same family as `next-intl`) and is often pushed by AI agents, but in my view wrongly so in a performance-first setting. Getting started is fairly simple. In practice, the process to optimize and limit leakage is quite complex. Likewise, combining dynamic loading + namespacing + TypeScript types slows development a lot. The package is also fairly heavy (~12.8kb, which is more than 2.5× `react-intlayer`).
|
|
186
197
|
|
|
187
198
|
On TanStack Start you avoid Next.js-specific traps (`setRequestLocale`, static rendering), but the core issue is the same: without strict discipline, the bundle quickly carries too many messages and per-route namespace maintenance becomes painful.
|
|
188
199
|
|
|
@@ -192,6 +203,8 @@ On TanStack Start you avoid Next.js-specific traps (`setRequestLocale`, static r
|
|
|
192
203
|
|
|
193
204
|
Still, it shares the same major downsides as stacks built on `t('a.b.c')`: optimizations are possible but very time-consuming, and large projects risk bad practices (namespaces + dynamic loading + types).
|
|
194
205
|
|
|
206
|
+
The package is especially heavy (~17.3kb, which is about 3.5× `react-intlayer`).
|
|
207
|
+
|
|
195
208
|
Message formats also diverge: `use-intl` uses ICU MessageFormat, while `i18next` uses its own format, which complicates tooling or migrations if you mix them.
|
|
196
209
|
|
|
197
210
|
**(Lingui)** (`@lingui/core@5.3.0`):
|
|
@@ -202,6 +215,8 @@ Message formats also diverge: `use-intl` uses ICU MessageFormat, while `i18next`
|
|
|
202
215
|
|
|
203
216
|
`react-intl` is a performant implementation from the Format.js team. The DX stays verbose: `const intl = useIntl()` + `intl.formatMessage({ id: "xx.xx" })` adds complexity, extra JavaScript work, and ties the global i18n instance to many nodes in the React tree.
|
|
204
217
|
|
|
218
|
+
The package is also heavy (~14.4kb, which is about 3× `react-intlayer`).
|
|
219
|
+
|
|
205
220
|
### 4 - Recommendations
|
|
206
221
|
|
|
207
222
|
This TanStack Start benchmark has no direct equivalent to `next-translate` (Next.js plugin + `getStaticProps`). For teams that really want a `t()` API with a mature ecosystem, `react-i18next` and `use-intl` remain “reasonable” choices, but expect to invest a lot of time optimizing to avoid leakage.
|
package/docs/en/benchmark/vue.md
CHANGED
|
@@ -57,6 +57,12 @@ In practice, for the least optimized implementations, an internationalized page
|
|
|
57
57
|
|
|
58
58
|
The other impact is on developer experience: how you declare content, types, namespace organization, dynamic loading, and reactivity when the locale changes.
|
|
59
59
|
|
|
60
|
+
## TL;DR
|
|
61
|
+
|
|
62
|
+
- **Intlayer**: The most lightweight solution (v8.7.12) with built-in scoping and dynamic loading.
|
|
63
|
+
- **vue-i18n**: The industry standard with a rich ecosystem but can be significantly heavier and harder to optimize for code-splitting in large applications.
|
|
64
|
+
- **fluent-vue**: Innovative message organization but lacks type safety and is extremely heavy.
|
|
65
|
+
|
|
60
66
|
## Test your app
|
|
61
67
|
|
|
62
68
|
To quickly spot i18n leakage issues, I set up a free scanner available [here](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -88,8 +94,8 @@ For this benchmark, we compared the following libraries:
|
|
|
88
94
|
|
|
89
95
|
- `Base App` (No i18n library)
|
|
90
96
|
- `vue-intlayer` (v8.7.12)
|
|
91
|
-
- `vue-i18n` (v11.
|
|
92
|
-
- `fluent-vue` (
|
|
97
|
+
- `vue-i18n` (v11.4.0)
|
|
98
|
+
- `fluent-vue` (v3.8.2)
|
|
93
99
|
|
|
94
100
|
The framework is `Vue` with a multilingual app of **10 pages** and **10 languages**.
|
|
95
101
|
|
|
@@ -133,22 +139,22 @@ I ran the same multilingual app in a real browser for every stack, then wrote do
|
|
|
133
139
|
|
|
134
140
|
### 1 - Solutions to avoid
|
|
135
141
|
|
|
136
|
-
|
|
142
|
+
> No clear solution to avoid in vue ecosystem.
|
|
143
|
+
|
|
144
|
+
### 2 - Acceptable solutions
|
|
145
|
+
|
|
146
|
+
**(vue-i18n)** (`vue-i18n@11.4.0`):
|
|
137
147
|
|
|
138
148
|
- **vue-i18n** is without contestation the most used i18n library for vue, it has a lot of features and a huge ecosystem. but under the hood the solution is quite heavy. even if vue-i18n integrate lazy loading for messages, it miss a scoping feature. In the case of a classic Vue SPA app there is no issue, but for a nuxt app, using @nuxt/i18n, it leads to including the messages from all pages into a single one. For a big nuxt app including more than 10 pages, it can become really problematic.
|
|
139
149
|
|
|
150
|
+
The package is very heavy (~24.3kb, which is about 9× `vue-intlayer`).
|
|
151
|
+
|
|
140
152
|
**(fluent-vue)** (`fluent-vue@0.5.0`):
|
|
141
153
|
|
|
142
|
-
- **fluent-vue** offer one inovation attempt thought the .ftl format. the message organization is great, easier to get started. but in practice, the lack of typesafty increase the risk of error and can quickly become time consuming to debug. Moreever, that solution load the messages using a vite plugin that force the loading of all the content in all languages into each page. Additionally this is an
|
|
154
|
+
- **fluent-vue** offer one inovation attempt thought the .ftl format. the message organization is great, easier to get started. but in practice, the lack of typesafty increase the risk of error and can quickly become time consuming to debug. Moreever, that solution load the messages using a vite plugin that force the loading of all the content in all languages into each page. Additionally this is an extremely heavy solution (~92.7kb, which is about 34× `vue-intlayer`).
|
|
143
155
|
|
|
144
|
-
###
|
|
156
|
+
### 3 - Recommendations
|
|
145
157
|
|
|
146
158
|
**(Intlayer)** (`vue-intlayer@8.7.12`):
|
|
147
159
|
|
|
148
160
|
I will not personally judge `vue-intlayer` for objectivity’s sake, since it is my own solution.
|
|
149
|
-
|
|
150
|
-
### Personal note
|
|
151
|
-
|
|
152
|
-
This note is personal and does not affect the benchmark results. Still, in the i18n world you often see consensus around a pattern like `const { t } = useI18n()` + `<>{t('xx.xx')}</>` for translated content.
|
|
153
|
-
|
|
154
|
-
In Vue apps, injecting a function as a `VNode` is, in my view, an anti-pattern. It also adds avoidable complexity and JavaScript execution overhead (even if it is barely noticeable).
|
package/docs/en/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-05-12
|
|
4
4
|
title: Configuration
|
|
5
5
|
description: Learn how to configure Intlayer for your application. Understand the various settings and options available to customize Intlayer to your needs.
|
|
6
6
|
keywords:
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.9.4
|
|
18
|
+
date: 2026-05-12
|
|
19
|
+
changes: "Add support for LM Studio provider"
|
|
17
20
|
- version: 8.7.0
|
|
18
21
|
date: 2026-04-08
|
|
19
22
|
changes: "Add `prune` and `minify` options to the build configuration"
|
|
@@ -350,7 +353,7 @@ const config: IntlayerConfig = {
|
|
|
350
353
|
ai: {
|
|
351
354
|
/**
|
|
352
355
|
* AI provider to use.
|
|
353
|
-
* Options: 'openai', 'anthropic', 'mistral', 'deepseek', 'gemini', 'ollama', 'openrouter', 'alibaba', 'fireworks', 'groq', 'huggingface', 'bedrock', 'googlevertex', 'togetherai'
|
|
356
|
+
* Options: 'openai', 'anthropic', 'mistral', 'deepseek', 'gemini', 'ollama', 'openrouter', 'alibaba', 'fireworks', 'groq', 'huggingface', 'bedrock', 'googlevertex', 'togetherai', 'lmstudio'
|
|
354
357
|
* Default: 'openai'
|
|
355
358
|
*/
|
|
356
359
|
provider: "openai",
|
|
@@ -937,17 +940,17 @@ Intlayer supports multiple AI providers for enhanced flexibility and choice. Cur
|
|
|
937
940
|
- **Groq**
|
|
938
941
|
- **Amazon Bedrock**
|
|
939
942
|
- **Together.ai**
|
|
940
|
-
- **
|
|
941
|
-
|
|
942
|
-
| Field | Description | Type
|
|
943
|
-
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
944
|
-
| `provider` | The provider to use for the AI features of Intlayer. | `'openai'` | <br/> `'anthropic'` | <br/> `'mistral'` | <br/> `'deepseek'` | <br/> `'gemini'` | <br/> `'ollama'` | <br/> `'openrouter'` | <br/> `'alibaba'` | <br/> `'fireworks'` | <br/> `'groq'` | <br/> `'huggingface'` | <br/> `'bedrock'` | <br/> `'googleaistudio'` | <br/> `'googlevertex'` | <br/> `'togetherai'` | `undefined` | `'anthropic'` | Different providers require different API keys and have different pricing. |
|
|
945
|
-
| `model` | The model to use for AI features. | `string`
|
|
946
|
-
| `temperature` | Controls the randomness of AI responses. | `number`
|
|
947
|
-
| `apiKey` | Your API key for the selected provider. | `string`
|
|
948
|
-
| `applicationContext` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). | `string`
|
|
949
|
-
| `baseURL` | The base URL for the AI API. | `string`
|
|
950
|
-
| `dataSerialization` | Data serialization format for AI features. | `'json'` | <br/> `'toon'`
|
|
943
|
+
- **LM Studio**
|
|
944
|
+
|
|
945
|
+
| Field | Description | Type | Default | Example | Note |
|
|
946
|
+
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
947
|
+
| `provider` | The provider to use for the AI features of Intlayer. | `'openai'` | <br/> `'anthropic'` | <br/> `'mistral'` | <br/> `'deepseek'` | <br/> `'gemini'` | <br/> `'ollama'` | <br/> `'openrouter'` | <br/> `'alibaba'` | <br/> `'fireworks'` | <br/> `'groq'` | <br/> `'huggingface'` | <br/> `'bedrock'` | <br/> `'googleaistudio'` | <br/> `'googlevertex'` | <br/> `'togetherai'` | <br/> `'lmstudio'` | `undefined` | `'anthropic'` | Different providers require different API keys and have different pricing. |
|
|
948
|
+
| `model` | The model to use for AI features. | `string` | None | `'gpt-4o-2024-11-20'` | Specific model varies by provider. |
|
|
949
|
+
| `temperature` | Controls the randomness of AI responses. | `number` | None | `0.1` | Higher temperature = more creative and less predictable. |
|
|
950
|
+
| `apiKey` | Your API key for the selected provider. | `string` | None | `process.env.OPENAI_API_KEY` | Keep secret; store in environment variables. |
|
|
951
|
+
| `applicationContext` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). | `string` | None | `'My application context'` | Can be used to add rules (e.g. `"You should not transform urls"`). |
|
|
952
|
+
| `baseURL` | The base URL for the AI API. | `string` | None | `'https://api.openai.com/v1'` <br/> `'http://localhost:5000'` | Can point to a local or custom AI API endpoint. |
|
|
953
|
+
| `dataSerialization` | Data serialization format for AI features. | `'json'` | <br/> `'toon'` | `undefined` | `'toon'` | • `'json'`: standard, reliable; uses more tokens.<br/>• `'toon'`: fewer tokens, less consistent.<br/>• Additional parameters are passed to the AI model as context (reasoning effort, verbosity, etc.). |
|
|
951
954
|
|
|
952
955
|
### Build Configuration
|
|
953
956
|
|