@intlayer/docs 8.2.3 → 8.3.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +1 -1
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +1 -1
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +1 -1
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +1 -1
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +1 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/blog.d.ts +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/doc.d.ts +1 -1
- package/dist/types/frequentQuestions.d.ts +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -1
- package/dist/types/generated/legal.entry.d.ts +1 -1
- package/dist/types/legal.d.ts +1 -1
- package/docs/ar/compiler.md +73 -8
- package/docs/ar/configuration.md +53 -17
- package/docs/ar/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ar/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/ar/per_locale_file.md +1 -1
- package/docs/de/compiler.md +74 -9
- package/docs/de/configuration.md +49 -13
- package/docs/de/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/de/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/de/per_locale_file.md +1 -1
- package/docs/en/compiler.md +79 -1
- package/docs/en/configuration.md +39 -1
- package/docs/en/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/en/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/en/per_locale_file.md +1 -1
- package/docs/en-GB/compiler.md +72 -6
- package/docs/en-GB/configuration.md +39 -2
- package/docs/en-GB/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/en-GB/per_locale_file.md +1 -1
- package/docs/es/compiler.md +71 -6
- package/docs/es/configuration.md +52 -16
- package/docs/es/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/es/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/fr/compiler.md +69 -4
- package/docs/fr/configuration.md +50 -14
- package/docs/fr/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/fr/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/hi/compiler.md +74 -9
- package/docs/hi/configuration.md +49 -13
- package/docs/hi/intlayer_with_nextjs_compiler.md +15 -7
- package/docs/hi/intlayer_with_vite+react_compiler.md +15 -7
- package/docs/hi/per_locale_file.md +1 -1
- package/docs/id/compiler.md +73 -8
- package/docs/id/configuration.md +46 -10
- package/docs/id/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/id/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/id/per_locale_file.md +1 -1
- package/docs/it/compiler.md +73 -8
- package/docs/it/configuration.md +54 -18
- package/docs/it/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/it/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/it/per_locale_file.md +1 -1
- package/docs/ja/compiler.md +75 -10
- package/docs/ja/configuration.md +50 -14
- package/docs/ja/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ja/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/ko/compiler.md +75 -10
- package/docs/ko/configuration.md +50 -14
- package/docs/ko/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/ko/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/pl/compiler.md +73 -8
- package/docs/pl/configuration.md +47 -11
- package/docs/pl/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/pl/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/pl/per_locale_file.md +1 -1
- package/docs/pt/compiler.md +74 -9
- package/docs/pt/configuration.md +50 -14
- package/docs/pt/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/pt/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/pt/per_locale_file.md +1 -1
- package/docs/ru/compiler.md +74 -9
- package/docs/ru/configuration.md +49 -13
- package/docs/ru/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/ru/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/tr/compiler.md +73 -8
- package/docs/tr/configuration.md +53 -17
- package/docs/tr/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/tr/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/tr/per_locale_file.md +1 -1
- package/docs/uk/compiler.md +74 -9
- package/docs/uk/configuration.md +183 -147
- package/docs/uk/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/uk/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/vi/compiler.md +75 -10
- package/docs/vi/configuration.md +47 -11
- package/docs/vi/intlayer_with_nextjs_compiler.md +14 -6
- package/docs/vi/intlayer_with_vite+react_compiler.md +14 -6
- package/docs/vi/per_locale_file.md +1 -1
- package/docs/zh/compiler.md +75 -10
- package/docs/zh/configuration.md +54 -18
- package/docs/zh/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/zh/intlayer_with_vite+react_compiler.md +13 -5
- package/package.json +16 -16
- package/src/blog.ts +1 -1
- package/src/common.ts +2 -1
- package/src/doc.ts +1 -1
- package/src/frequentQuestions.ts +1 -1
- package/src/generated/blog.entry.ts +1 -1
- package/src/generated/docs.entry.ts +1 -1
- package/src/generated/frequentQuestions.entry.ts +1 -1
- package/src/generated/legal.entry.ts +1 -1
- package/src/legal.ts +1 -1
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
20
20
|
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
21
21
|
history:
|
|
22
|
+
- version: 8.2.0
|
|
23
|
+
date: 2026-03-09
|
|
24
|
+
changes: Update compiler options, add FilePathPattern support
|
|
22
25
|
- version: 8.1.6
|
|
23
26
|
date: 2026-02-23
|
|
24
27
|
changes: الإصدار الأولي
|
|
@@ -125,23 +128,28 @@ const config: IntlayerConfig = {
|
|
|
125
128
|
},
|
|
126
129
|
compiler: {
|
|
127
130
|
/**
|
|
128
|
-
*
|
|
131
|
+
* يشير إلى ما إذا كان يجب تمكين المجمّع.
|
|
129
132
|
*/
|
|
130
133
|
enabled: true,
|
|
131
134
|
|
|
132
135
|
/**
|
|
133
136
|
* دليل الإخراج للقواميس المحسنة.
|
|
134
137
|
*/
|
|
135
|
-
|
|
138
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* أدخل المحتوى فقط في الملف الذي تم إنشاؤه، بدون مفتاح.
|
|
142
|
+
*/
|
|
143
|
+
noMetadata: false,
|
|
136
144
|
|
|
137
145
|
/**
|
|
138
146
|
* بادئة مفتاح القاموس
|
|
139
147
|
*/
|
|
140
|
-
dictionaryKeyPrefix: "", //
|
|
148
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
141
149
|
|
|
142
150
|
/**
|
|
143
|
-
*
|
|
144
|
-
* بهذه الطريقة، يمكن تشغيل
|
|
151
|
+
* يشير إلى ما إذا كان يجب حفظ المكونات بعد تحويلها.
|
|
152
|
+
* بهذه الطريقة، يمكن تشغيل المجمّع مرة واحدة فقط لتحويل التطبيق، ثم يمكن إزالته.
|
|
145
153
|
*/
|
|
146
154
|
saveComponents: false,
|
|
147
155
|
},
|
|
@@ -128,7 +128,7 @@ const config: IntlayerConfig = {
|
|
|
128
128
|
export default config;
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
باستخدام هذا التكوين، سيتم إنشاء جميع ملفات كل لغة مع تعيين اللغة الافتراضية إلى الإنجليزية. يتضمن ذلك أيضاً إنشاء ملفات `.content` باستخدام أمر `extract` والمترجم (compiler). (انظر [Compiler](https://intlayer.org/doc/compiler) أو [Extract](https://
|
|
131
|
+
باستخدام هذا التكوين، سيتم إنشاء جميع ملفات كل لغة مع تعيين اللغة الافتراضية إلى الإنجليزية. يتضمن ذلك أيضاً إنشاء ملفات `.content` باستخدام أمر `extract` والمترجم (compiler). (انظر [Compiler](https://intlayer.org/doc/compiler) أو [Extract](https://github.com/aymericzip/intlayer/edit/main/docs/docs/en/cli/extract.md) لمزيد من المعلومات.)
|
|
132
132
|
|
|
133
133
|
## تنسيق حسب اللغة
|
|
134
134
|
|
package/docs/de/compiler.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-10
|
|
4
4
|
title: Intlayer Compiler | Automatisierte Inhaltsextraktion für i18n
|
|
5
5
|
description: Automatisieren Sie Ihren Internationalisierungsprozess mit dem Intlayer Compiler. Extrahieren Sie Inhalte direkt aus Ihren Komponenten für schnellere und effizientere i18n in Vite, Next.js und mehr.
|
|
6
6
|
keywords:
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
- doc
|
|
21
21
|
- compiler
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-10
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: Compiler-Optionen aktualisieren
|
|
@@ -157,13 +160,12 @@ import { type IntlayerConfig, Locales } from "intlayer";
|
|
|
157
160
|
const config: IntlayerConfig = {
|
|
158
161
|
compiler: {
|
|
159
162
|
/**
|
|
160
|
-
*
|
|
161
|
-
* Auf 'build-only' setzen, um den Compiler während der Entwicklung zu überspringen und die Startzeiten zu beschleunigen.
|
|
163
|
+
* Stellen Sie build-only ein, um den Compiler während der Entwicklung zu überspringen und die Startzeiten zu beschleunigen.
|
|
162
164
|
*/
|
|
163
165
|
enabled: true,
|
|
164
166
|
|
|
165
167
|
/**
|
|
166
|
-
*
|
|
168
|
+
* Pattern to traverse the code to optimize.
|
|
167
169
|
*/
|
|
168
170
|
transformPattern: [
|
|
169
171
|
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
@@ -171,23 +173,28 @@ const config: IntlayerConfig = {
|
|
|
171
173
|
],
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
|
-
*
|
|
176
|
+
* Pattern to exclude from the optimization.
|
|
175
177
|
*/
|
|
176
178
|
excludePattern: ["**/node_modules/**"],
|
|
177
179
|
|
|
178
180
|
/**
|
|
179
181
|
* Ausgabeverzeichnis für die optimierten Wörterbücher.
|
|
180
182
|
*/
|
|
181
|
-
|
|
183
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
182
184
|
|
|
183
185
|
/**
|
|
184
|
-
*
|
|
186
|
+
* Fügen Sie nur den Inhalt in die generierte Datei ein, ohne Schlüssel.
|
|
185
187
|
*/
|
|
186
|
-
|
|
188
|
+
noMetadata: false,
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Wörterbuch-Präfix
|
|
192
|
+
*/
|
|
193
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
187
194
|
|
|
188
195
|
/**
|
|
189
196
|
* Gibt an, ob die Komponenten nach der Transformation gespeichert werden sollen.
|
|
190
|
-
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und
|
|
197
|
+
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und dann entfernt werden.
|
|
191
198
|
*/
|
|
192
199
|
saveComponents: false,
|
|
193
200
|
},
|
|
@@ -209,3 +216,61 @@ npx intlayer fill # Fehlende Übersetzungen ausfüllen
|
|
|
209
216
|
```
|
|
210
217
|
|
|
211
218
|
> Weitere Informationen finden Sie in der [CLI-Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/cli/ci.md)
|
|
219
|
+
|
|
220
|
+
### Compiler-Konfigurationsreferenz
|
|
221
|
+
|
|
222
|
+
Die folgenden Eigenschaften können im Block `compiler` Ihrer Datei `intlayer.config.ts` konfiguriert werden:
|
|
223
|
+
|
|
224
|
+
- **enabled**:
|
|
225
|
+
- _Typ_: `boolean | 'build-only'`
|
|
226
|
+
- _Standard_: `true`
|
|
227
|
+
- _Beschreibung_: Gibt an, ob der Compiler aktiviert werden soll.
|
|
228
|
+
- **dictionaryKeyPrefix**:
|
|
229
|
+
- _Typ_: `string`
|
|
230
|
+
- _Standard_: `'comp-'`
|
|
231
|
+
- _Beschreibung_: Präfix für die extrahierten Wörterbuchschlüssel.
|
|
232
|
+
- **transformPattern**:
|
|
233
|
+
- _Typ_: `string | string[]`
|
|
234
|
+
- _Standard_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
+
- _Beschreibung_: Muster zum Durchlaufen des zu optimierenden Codes.
|
|
236
|
+
- **excludePattern**:
|
|
237
|
+
- _Typ_: `string | string[]`
|
|
238
|
+
- _Standard_: `['**/node_modules/**']`
|
|
239
|
+
- _Beschreibung_: Muster, die von der Optimierung ausgeschlossen werden sollen.
|
|
240
|
+
- **outputDir** (Deprecated):
|
|
241
|
+
- _Typ_: `string`
|
|
242
|
+
- _Standard_: `'compiler'`
|
|
243
|
+
- _Beschreibung_: Das Verzeichnis, in dem die extrahierten Wörterbücher gespeichert werden.
|
|
244
|
+
|
|
245
|
+
- **output**:
|
|
246
|
+
- _Typ_: `FilePathPattern`
|
|
247
|
+
- _Standard_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
|
+
- _Beschreibung_: Definiert den Pfad der Ausgabedateien. Ersetzt `outputDir`. Verarbeitet dynamische Variablen wie `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{componentFormat}}`. Kann als String im Format `'my/{{var}}/path'` oder als Funktion festgelegt werden.
|
|
249
|
+
- _Hinweis_: `./**/*` Pfade werden relativ zur Komponente aufgelöst. `/**/*` Pfade werden relativ zum Intlayer `baseDir` aufgelöst.
|
|
250
|
+
- _Beispiel_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
|
+
|
|
252
|
+
- **noMetadata**:
|
|
253
|
+
- _Typ_: `boolean`
|
|
254
|
+
- _Standard_: `false`
|
|
255
|
+
- _Beschreibung_: Gibt an, ob die Metadaten in der Datei gespeichert werden sollen. Wenn true, speichert der Compiler nicht die Metadaten der Wörterbücher (Schlüssel, Content-Wrapper).
|
|
256
|
+
- _Hinweis_: Nützlich bei Verwendung mit dem `loadJSON`-Plugin.
|
|
257
|
+
- _Beispiel_: Wenn `true`:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
Wenn `false`:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _Typ_: `boolean`
|
|
275
|
+
- _Standard_: `false`
|
|
276
|
+
- _Beschreibung_: Gibt an, ob die Komponenten nach der Transformation gespeichert werden sollen.
|
package/docs/de/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-10
|
|
4
4
|
title: Konfiguration
|
|
5
5
|
description: Erfahren Sie, wie Sie Intlayer für Ihre Anwendung konfigurieren. Verstehen Sie die verschiedenen Einstellungen und Optionen, um Intlayer an Ihre Bedürfnisse anzupassen.
|
|
6
6
|
keywords:
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.2.0
|
|
18
|
+
date: 2026-03-10
|
|
19
|
+
changes: Update compiler options, add 'output' and 'noMetadata' support
|
|
17
20
|
- version: 8.1.7
|
|
18
21
|
date: 2026-02-25
|
|
19
22
|
changes: Compiler-Optionen aktualisieren
|
|
@@ -419,7 +422,7 @@ const config: IntlayerConfig = {
|
|
|
419
422
|
*/
|
|
420
423
|
compiler: {
|
|
421
424
|
/**
|
|
422
|
-
*
|
|
425
|
+
* Gibt an, ob der Compiler aktiviert werden soll.
|
|
423
426
|
*/
|
|
424
427
|
enabled: true,
|
|
425
428
|
|
|
@@ -437,18 +440,23 @@ const config: IntlayerConfig = {
|
|
|
437
440
|
excludePattern: ["**/node_modules/**"],
|
|
438
441
|
|
|
439
442
|
/**
|
|
440
|
-
*
|
|
443
|
+
* Ausgabeverzeichnis für die optimierten Wörterbücher.
|
|
441
444
|
*/
|
|
442
|
-
|
|
445
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
443
446
|
|
|
444
447
|
/**
|
|
445
|
-
*
|
|
448
|
+
* Fügen Sie nur den Inhalt in die generierte Datei ein, ohne Schlüssel.
|
|
449
|
+
*/
|
|
450
|
+
noMetadata: false,
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Wörterbuch-Präfix
|
|
446
454
|
*/
|
|
447
455
|
dictionaryKeyPrefix: "", // Remove base prefix
|
|
448
456
|
|
|
449
457
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
458
|
+
* Gibt an, ob die Komponenten nach der Transformation gespeichert werden sollen.
|
|
459
|
+
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und dann entfernt werden.
|
|
452
460
|
*/
|
|
453
461
|
saveComponents: false,
|
|
454
462
|
},
|
|
@@ -704,7 +712,7 @@ Einstellungen im Zusammenhang mit der Inhaltsverwaltung innerhalb der Anwendung,
|
|
|
704
712
|
#### Eigenschaften
|
|
705
713
|
|
|
706
714
|
- **autoFill**:
|
|
707
|
-
- _Typ_: `boolean | string | { [key in Locales]?: string }`
|
|
715
|
+
- _Typ_: `boolean | string | FilePathPattern | { [key in Locales]?: string }`
|
|
708
716
|
- _Standard_: `undefined`
|
|
709
717
|
- _Beschreibung_: Gibt an, wie der Inhalt automatisch mit KI ausgefüllt werden soll. Kann global in der Datei `intlayer.config.ts` deklariert werden.
|
|
710
718
|
- _Beispiel_: true
|
|
@@ -962,10 +970,10 @@ Build-Optionen gelten für die Plugins `@intlayer/babel` und `@intlayer/swc`.
|
|
|
962
970
|
- _Hinweis_: Kann verwendet werden, um die Erstellung von Wörterbüchern zu deaktivieren, z.B. wenn die Ausführung in einer Node.js-Umgebung vermieden werden sollte.
|
|
963
971
|
|
|
964
972
|
- **checkTypes**:
|
|
965
|
-
-
|
|
966
|
-
-
|
|
967
|
-
-
|
|
968
|
-
-
|
|
973
|
+
- _Typ_: `boolean`
|
|
974
|
+
- _Standard_: `false`
|
|
975
|
+
- _Beschreibung_: Gibt an, ob der Build TypeScript-Typen überprüfen und Fehler protokollieren soll.
|
|
976
|
+
- _Hinweis_: Dies kann den Build-Vorgang verlangsamen.
|
|
969
977
|
|
|
970
978
|
- **optimize**:
|
|
971
979
|
- _Typ_: `boolean`
|
|
@@ -978,7 +986,7 @@ Build-Optionen gelten für die Plugins `@intlayer/babel` und `@intlayer/swc`.
|
|
|
978
986
|
- _Hinweis_: Stellen Sie sicher, dass alle Schlüssel statisch in den `useIntlayer`-Aufrufen deklariert sind, z.B. `useIntlayer('navbar')`.
|
|
979
987
|
|
|
980
988
|
- **importMode**:
|
|
981
|
-
-
|
|
989
|
+
- _Hinweis_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
982
990
|
- _Typ_: `'static' | 'dynamic' | 'fetch'`
|
|
983
991
|
- _Standard_: `'static'`
|
|
984
992
|
- _Beschreibung_: Steuert, wie Wörterbücher importiert werden.
|
|
@@ -1057,3 +1065,31 @@ Einstellungen zur Steuerung des Intlayer-Compilers, der Wörterbücher direkt au
|
|
|
1057
1065
|
- _Typ_: `string`
|
|
1058
1066
|
- _Standard_: `'compiler'`
|
|
1059
1067
|
- _Beschreibung_: Das Verzeichnis, in dem die extrahierten Wörterbücher gespeichert werden, relativ zum Basispfad Ihres Projekts.
|
|
1068
|
+
|
|
1069
|
+
- **output**:
|
|
1070
|
+
- _Typ_: `FilePathPattern`
|
|
1071
|
+
- _Standard_: `({ key }) => 'compiler/${key}.content.json'`
|
|
1072
|
+
- _Beschreibung_: Definiert den Pfad der Ausgabedateien. Ersetzt `outputDir`. Verarbeitet dynamische Variablen wie `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{componentFormat}}`. Kann als String im Format `'my/{{var}}/path'` oder als Funktion festgelegt werden.
|
|
1073
|
+
- _Hinweis_: `./**/*` Pfade werden relativ zur Komponente aufgelöst. `/**/*` Pfade werden relativ zum Intlayer `baseDir` aufgelöst.
|
|
1074
|
+
- _Beispiel_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
1075
|
+
|
|
1076
|
+
- **noMetadata**:
|
|
1077
|
+
- _Typ_: `boolean`
|
|
1078
|
+
- _Standard_: `false`
|
|
1079
|
+
- _Beschreibung_: Gibt an, ob die Metadaten in der Datei gespeichert werden sollen. Wenn true, speichert der Compiler nicht die Metadaten der Wörterbücher (Schlüssel, Content-Wrapper).
|
|
1080
|
+
- _Hinweis_: Nützlich bei Verwendung mit dem `loadJSON`-Plugin.
|
|
1081
|
+
- _Beispiel_: Wenn `true`:
|
|
1082
|
+
```json
|
|
1083
|
+
{
|
|
1084
|
+
"key": "value"
|
|
1085
|
+
}
|
|
1086
|
+
```
|
|
1087
|
+
Wenn `false`:
|
|
1088
|
+
```json
|
|
1089
|
+
{
|
|
1090
|
+
"key": "value",
|
|
1091
|
+
"content": {
|
|
1092
|
+
"key": "value"
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
```
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
|
|
21
21
|
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.6
|
|
24
27
|
date: 2026-02-23
|
|
25
28
|
changes: Erstveröffentlichung
|
|
@@ -135,16 +138,21 @@ const config: IntlayerConfig = {
|
|
|
135
138
|
/**
|
|
136
139
|
* Ausgabeverzeichnis für die optimierten Wörterbücher.
|
|
137
140
|
*/
|
|
138
|
-
|
|
141
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
|
-
*
|
|
144
|
+
* Fügen Sie nur den Inhalt in die generierte Datei ein, ohne Schlüssel.
|
|
142
145
|
*/
|
|
143
|
-
|
|
146
|
+
noMetadata: false,
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Wörterbuch-Präfix
|
|
150
|
+
*/
|
|
151
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
144
152
|
|
|
145
153
|
/**
|
|
146
154
|
* Gibt an, ob die Komponenten nach der Transformation gespeichert werden sollen.
|
|
147
|
-
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und
|
|
155
|
+
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und dann entfernt werden.
|
|
148
156
|
*/
|
|
149
157
|
saveComponents: false,
|
|
150
158
|
},
|
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
20
20
|
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
21
21
|
history:
|
|
22
|
+
- version: 8.2.0
|
|
23
|
+
date: 2026-03-09
|
|
24
|
+
changes: Update compiler options, add FilePathPattern support
|
|
22
25
|
- version: 8.1.6
|
|
23
26
|
date: 2026-02-23
|
|
24
27
|
changes: Erstveröffentlichung
|
|
@@ -132,16 +135,21 @@ const config: IntlayerConfig = {
|
|
|
132
135
|
/**
|
|
133
136
|
* Ausgabeverzeichnis für die optimierten Wörterbücher.
|
|
134
137
|
*/
|
|
135
|
-
|
|
138
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
136
139
|
|
|
137
140
|
/**
|
|
138
|
-
*
|
|
141
|
+
* Fügen Sie nur den Inhalt in die generierte Datei ein, ohne Schlüssel.
|
|
139
142
|
*/
|
|
140
|
-
|
|
143
|
+
noMetadata: false,
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Wörterbuch-Präfix
|
|
147
|
+
*/
|
|
148
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
141
149
|
|
|
142
150
|
/**
|
|
143
151
|
* Gibt an, ob die Komponenten nach der Transformation gespeichert werden sollen.
|
|
144
|
-
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und
|
|
152
|
+
* Auf diese Weise kann der Compiler nur einmal ausgeführt werden, um die App zu transformieren, und dann entfernt werden.
|
|
145
153
|
*/
|
|
146
154
|
saveComponents: false,
|
|
147
155
|
},
|
|
@@ -128,7 +128,7 @@ const config: IntlayerConfig = {
|
|
|
128
128
|
export default config;
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
Mit dieser Konfiguration werden alle Per-Locale-Dateien mit der Standard-Locale Englisch generiert. Dies beinhaltet auch die Generierung von `.content`-Dateien unter Verwendung des `extract`-Befehls und des Compilers. (Siehe [Compiler](https://intlayer.org/doc/compiler) oder [Extract](https://
|
|
131
|
+
Mit dieser Konfiguration werden alle Per-Locale-Dateien mit der Standard-Locale Englisch generiert. Dies beinhaltet auch die Generierung von `.content`-Dateien unter Verwendung des `extract`-Befehls und des Compilers. (Siehe [Compiler](https://intlayer.org/doc/compiler) oder [Extract](https://github.com/aymericzip/intlayer/edit/main/docs/docs/en/cli/extract.md) für weitere Informationen.)
|
|
132
132
|
|
|
133
133
|
## Pro-Locale-Format
|
|
134
134
|
|
package/docs/en/compiler.md
CHANGED
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
- doc
|
|
21
21
|
- compiler
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: Update compiler options
|
|
@@ -37,8 +40,11 @@ The **Intlayer Compiler** is a powerful tool designed to automate the process of
|
|
|
37
40
|
## Why Use the Intlayer Compiler?
|
|
38
41
|
|
|
39
42
|
- **Automation**: Eliminates manual copy-pasting of content into dictionaries.
|
|
43
|
+
|
|
40
44
|
- **Speed**: Optimized content extraction ensuring your build process remains fast.
|
|
45
|
+
|
|
41
46
|
- **Developer Experience**: Keep content declarations right where they are used, improving maintainability.
|
|
47
|
+
|
|
42
48
|
- **Live Updates**: Supports Hot Module Replacement (HMR) for instant feedback during development.
|
|
43
49
|
|
|
44
50
|
See the [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/compiler_vs_declarative_i18n.md) blog post for a deeper comparison.
|
|
@@ -48,6 +54,7 @@ See the [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/b
|
|
|
48
54
|
While the compiler offers an excellent "just works" experience, it also introduces some trade-offs you should be aware of:
|
|
49
55
|
|
|
50
56
|
- **Heuristic ambiguity**: The compiler must guess what is user-facing content vs. application logic (e.g., `className="active"`, status codes, product IDs). In complex codebases, this can lead to false positives or missed strings that require manual annotations and exceptions.
|
|
57
|
+
|
|
51
58
|
- **Static-only extraction**: Compiler-based extraction relies on static analysis. Strings that only exist at runtime (API error codes, CMS fields, etc.) cannot be discovered or translated by the compiler alone, so you still need a complementary runtime i18n strategy.
|
|
52
59
|
|
|
53
60
|
For a deeper architectural comparison, see the blog post [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/compiler_vs_declarative_i18n.md).
|
|
@@ -92,7 +99,9 @@ See complete tutorial: [Intlayer Compiler with Vite+React](https://github.com/ay
|
|
|
92
99
|
The Vite plugin automatically detects and handles different file types:
|
|
93
100
|
|
|
94
101
|
- **React / JSX / TSX**: Handled natively.
|
|
102
|
+
|
|
95
103
|
- **Vue**: Requires `@intlayer/vue-compiler`.
|
|
104
|
+
|
|
96
105
|
- **Svelte**: Requires `@intlayer/svelte-compiler`.
|
|
97
106
|
|
|
98
107
|
Make sure to install the appropriate compiler package for your framework:
|
|
@@ -179,7 +188,12 @@ const config: IntlayerConfig = {
|
|
|
179
188
|
/**
|
|
180
189
|
* Output directory for the optimized dictionaries.
|
|
181
190
|
*/
|
|
182
|
-
|
|
191
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Inset only content in generated file, without key.
|
|
195
|
+
*/
|
|
196
|
+
noMetadata: false,
|
|
183
197
|
|
|
184
198
|
/**
|
|
185
199
|
* Dictionary key prefix
|
|
@@ -197,6 +211,70 @@ const config: IntlayerConfig = {
|
|
|
197
211
|
export default config;
|
|
198
212
|
```
|
|
199
213
|
|
|
214
|
+
### Compiler Configuration Reference
|
|
215
|
+
|
|
216
|
+
The following properties can be configured in the `compiler` block of your `intlayer.config.ts` file:
|
|
217
|
+
|
|
218
|
+
- **enabled**:
|
|
219
|
+
- _Type_: `boolean | 'build-only'`
|
|
220
|
+
- _Default_: `true`
|
|
221
|
+
- _Description_: Indicates if the compiler should be enabled.
|
|
222
|
+
|
|
223
|
+
- **dictionaryKeyPrefix**:
|
|
224
|
+
- _Type_: `string`
|
|
225
|
+
- _Default_: `'comp-'`
|
|
226
|
+
- _Description_: Prefix for the extracted dictionary keys.
|
|
227
|
+
|
|
228
|
+
- **transformPattern**:
|
|
229
|
+
- _Type_: `string | string[]`
|
|
230
|
+
- _Default_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
231
|
+
- _Description_: Patterns to traverse the code to optimize.
|
|
232
|
+
|
|
233
|
+
- **excludePattern**:
|
|
234
|
+
- _Type_: `string | string[]`
|
|
235
|
+
- _Default_: `['**/node_modules/**']`
|
|
236
|
+
- _Description_: Patterns to exclude from the optimization.
|
|
237
|
+
|
|
238
|
+
- **outputDir** (Deprecated):
|
|
239
|
+
- _Type_: `string`
|
|
240
|
+
- _Default_: `'compiler'`
|
|
241
|
+
- _Description_: The directory where the extracted dictionaries will be stored.
|
|
242
|
+
|
|
243
|
+
- **output**:
|
|
244
|
+
- _Type_: `FilePathPattern`
|
|
245
|
+
- _Default_: `({ key }) => 'compiler/${key}.content.json'`
|
|
246
|
+
- _Description_: Defines the output files path. Replaces `outputDir`. Handles dynamic variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{componentFormat}}`. Can be set as a string using `'my/{{var}}/path'` format, or as a function.
|
|
247
|
+
- _Note_: `./**/*` Path are resolved relatively to the component. `/**/*` path are resolved relatively to the Intlayer `baseDir`.
|
|
248
|
+
- _Note_: If locale is set in the path, it will generate per-locale dictionaries.
|
|
249
|
+
- _Example_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
250
|
+
|
|
251
|
+
- **noMetadata**:
|
|
252
|
+
- _Type_: `boolean`
|
|
253
|
+
- _Default_: `false`
|
|
254
|
+
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper).
|
|
255
|
+
- _Note_: Useful if used with `loadJSON` plugin.
|
|
256
|
+
- _Example_:
|
|
257
|
+
If `true`:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
If `false`:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _Type_: `boolean`
|
|
275
|
+
- _Default_: `false`
|
|
276
|
+
- _Description_: Indicates if the components should be saved after being transformed.
|
|
277
|
+
|
|
200
278
|
### Fill missing translation
|
|
201
279
|
|
|
202
280
|
Intlayer provide a CLI tool to help you fill missing translations. You can use the `intlayer` command to test and fill missing translations from your code.
|
package/docs/en/configuration.md
CHANGED
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.2.0
|
|
18
|
+
date: 2026-03-09
|
|
19
|
+
changes: Update compiler options, add 'output' and 'noMetadata' support
|
|
17
20
|
- version: 8.1.7
|
|
18
21
|
date: 2026-02-25
|
|
19
22
|
changes: Update compiler options
|
|
@@ -478,7 +481,12 @@ const config: IntlayerConfig = {
|
|
|
478
481
|
/**
|
|
479
482
|
* Output directory for the optimized dictionaries.
|
|
480
483
|
*/
|
|
481
|
-
|
|
484
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Inset only content in generated file, without key.
|
|
488
|
+
*/
|
|
489
|
+
noMetadata: false,
|
|
482
490
|
|
|
483
491
|
/**
|
|
484
492
|
* Dictionary key prefix
|
|
@@ -1262,3 +1270,33 @@ Settings that control the Intlayer compiler, which extracts dictionaries straigh
|
|
|
1262
1270
|
- _Type_: `string`
|
|
1263
1271
|
- _Default_: `'compiler'`
|
|
1264
1272
|
- _Description_: The directory where the extracted dictionaries will be stored, relative to your project base path.
|
|
1273
|
+
|
|
1274
|
+
- **output**:
|
|
1275
|
+
- _Type_: `FilePathPattern`
|
|
1276
|
+
- _Default_: `({ key }) => 'compiler/${key}.content.json'`
|
|
1277
|
+
- _Description_: Defines the output files path. Replaces `outputDir`. Handles dynamic variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{componentFormat}}`. Can be set as a string using `'my/{{var}}/path'` format, or as a function.
|
|
1278
|
+
- _Note_: `./**/*` Path are resolved relatively to the component. `/**/*` path are resolved relatively to the Intlayer `baseDir`.
|
|
1279
|
+
- _Note_: If locale is set in the path, it will generate per-locale dictionaries.
|
|
1280
|
+
- _Example_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
1281
|
+
|
|
1282
|
+
- **noMetadata**:
|
|
1283
|
+
- _Type_: `boolean`
|
|
1284
|
+
- _Default_: `false`
|
|
1285
|
+
- _Description_: Indicates if the metadata should be saved in the file. If true, the compiler will not save the metadata of the dictionaries (key, content wrapper).
|
|
1286
|
+
- _Note_: Useful if used with `loadJSON` plugin.
|
|
1287
|
+
- _Example_:
|
|
1288
|
+
If `true`:
|
|
1289
|
+
```json
|
|
1290
|
+
{
|
|
1291
|
+
"key": "value"
|
|
1292
|
+
}
|
|
1293
|
+
```
|
|
1294
|
+
If `false`:
|
|
1295
|
+
```json
|
|
1296
|
+
{
|
|
1297
|
+
"key": "value",
|
|
1298
|
+
"content": {
|
|
1299
|
+
"key": "value"
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
```
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
|
|
21
21
|
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.6
|
|
24
27
|
date: 2026-02-23
|
|
25
28
|
changes: Initial release
|
|
@@ -135,7 +138,12 @@ const config: IntlayerConfig = {
|
|
|
135
138
|
/**
|
|
136
139
|
* Output directory for the optimized dictionaries.
|
|
137
140
|
*/
|
|
138
|
-
|
|
141
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Inset only content in generated file, without key.
|
|
145
|
+
*/
|
|
146
|
+
noMetadata: false,
|
|
139
147
|
|
|
140
148
|
/**
|
|
141
149
|
* Dictionary key prefix
|
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
20
20
|
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
21
21
|
history:
|
|
22
|
+
- version: 8.2.0
|
|
23
|
+
date: 2026-03-09
|
|
24
|
+
changes: Update compiler options, add FilePathPattern support
|
|
22
25
|
- version: 8.1.6
|
|
23
26
|
date: 2026-02-23
|
|
24
27
|
changes: Initial release
|
|
@@ -132,7 +135,12 @@ const config: IntlayerConfig = {
|
|
|
132
135
|
/**
|
|
133
136
|
* Output directory for the optimized dictionaries.
|
|
134
137
|
*/
|
|
135
|
-
|
|
138
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Inset only content in generated file, without key.
|
|
142
|
+
*/
|
|
143
|
+
noMetadata: false,
|
|
136
144
|
|
|
137
145
|
/**
|
|
138
146
|
* Dictionary key prefix
|
|
@@ -167,7 +167,7 @@ const config: IntlayerConfig = {
|
|
|
167
167
|
export default config;
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
Using this configuration, all per-locale files will be generated with the default locale set to English. It also include generation of `.content` files using the `extract` command, and the compiler. (See [Compiler](https://intlayer.org/doc/compiler) or [Extract](https://
|
|
170
|
+
Using this configuration, all per-locale files will be generated with the default locale set to English. It also include generation of `.content` files using the `extract` command, and the compiler. (See [Compiler](https://intlayer.org/doc/compiler) or [Extract](https://github.com/aymericzip/intlayer/edit/main/docs/docs/en/cli/extract.md) for more information.)
|
|
171
171
|
|
|
172
172
|
## Single File with Multiple Translations
|
|
173
173
|
|