@intlayer/docs 8.2.4 → 8.3.0-canary.1
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 +74 -27
- package/docs/ar/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ar/intlayer_with_tanstack.md +22 -1
- package/docs/ar/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/de/compiler.md +74 -9
- package/docs/de/configuration.md +61 -22
- package/docs/de/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/de/intlayer_with_tanstack.md +22 -1
- package/docs/de/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/en/compiler.md +79 -1
- package/docs/en/configuration.md +50 -9
- package/docs/en/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/en/intlayer_with_tanstack.md +23 -2
- package/docs/en/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/en-GB/compiler.md +72 -6
- package/docs/en-GB/configuration.md +50 -10
- package/docs/en-GB/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/en-GB/intlayer_with_tanstack.md +22 -1
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/es/compiler.md +71 -6
- package/docs/es/configuration.md +65 -26
- package/docs/es/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/es/intlayer_with_tanstack.md +22 -1
- package/docs/es/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/fr/compiler.md +69 -4
- package/docs/fr/configuration.md +62 -23
- package/docs/fr/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/fr/intlayer_with_tanstack.md +22 -1
- package/docs/fr/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/hi/compiler.md +74 -9
- package/docs/hi/configuration.md +70 -23
- package/docs/hi/intlayer_with_nextjs_compiler.md +15 -7
- package/docs/hi/intlayer_with_tanstack.md +22 -1
- package/docs/hi/intlayer_with_vite+react_compiler.md +15 -7
- package/docs/id/compiler.md +73 -8
- package/docs/id/configuration.md +67 -20
- package/docs/id/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/id/intlayer_with_tanstack.md +22 -1
- package/docs/id/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/it/compiler.md +73 -8
- package/docs/it/configuration.md +66 -27
- package/docs/it/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/it/intlayer_with_tanstack.md +22 -1
- package/docs/it/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/ja/compiler.md +75 -10
- package/docs/ja/configuration.md +70 -23
- package/docs/ja/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ja/intlayer_with_tanstack.md +22 -1
- package/docs/ja/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/ko/compiler.md +75 -10
- package/docs/ko/configuration.md +70 -23
- package/docs/ko/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/ko/intlayer_with_tanstack.md +22 -1
- package/docs/ko/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/pl/compiler.md +73 -8
- package/docs/pl/configuration.md +71 -29
- package/docs/pl/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/pl/intlayer_with_tanstack.md +22 -1
- package/docs/pl/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/pt/compiler.md +74 -9
- package/docs/pt/configuration.md +62 -23
- package/docs/pt/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/pt/intlayer_with_tanstack.md +22 -1
- package/docs/pt/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/ru/compiler.md +74 -9
- package/docs/ru/configuration.md +61 -22
- package/docs/ru/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/ru/intlayer_with_tanstack.md +22 -1
- package/docs/ru/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/tr/compiler.md +73 -8
- package/docs/tr/configuration.md +77 -42
- package/docs/tr/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/tr/intlayer_with_tanstack.md +22 -1
- package/docs/tr/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/uk/compiler.md +74 -9
- package/docs/uk/configuration.md +207 -165
- package/docs/uk/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/uk/intlayer_with_tanstack.md +22 -1
- package/docs/uk/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/vi/compiler.md +75 -10
- package/docs/vi/configuration.md +97 -21
- package/docs/vi/intlayer_with_nextjs_compiler.md +14 -6
- package/docs/vi/intlayer_with_tanstack.md +22 -1
- package/docs/vi/intlayer_with_vite+react_compiler.md +14 -6
- package/docs/zh/compiler.md +75 -10
- package/docs/zh/configuration.md +77 -42
- package/docs/zh/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/zh/intlayer_with_tanstack.md +22 -1
- package/docs/zh/intlayer_with_vite+react_compiler.md +13 -5
- package/package.json +17 -17
- 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
package/docs/hi/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 | i18n के लिए स्वचालित सामग्री निष्कर्षण
|
|
5
5
|
description: Intlayer Compiler के साथ अपने अंतरराष्ट्रीयकरण प्रक्रिया को स्वचालित करें। Vite, Next.js, और अन्य में तेज़, अधिक कुशल i18n के लिए सीधे अपने कंपोनेंट्स से सामग्री निकालें।
|
|
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-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: कंपाइलर विकल्पों को अपडेट करें
|
|
@@ -157,13 +160,12 @@ import { type IntlayerConfig, Locales } from "intlayer";
|
|
|
157
160
|
const config: IntlayerConfig = {
|
|
158
161
|
compiler: {
|
|
159
162
|
/**
|
|
160
|
-
*
|
|
161
|
-
* विकास के दौरान कंपाइलर को छोड़ने और स्टार्टअप समय को तेज़ करने के लिए 'build-only' पर सेट करें।
|
|
163
|
+
* विकास के दौरान कंपाइलर को छोड़ने और स्टार्टअप समय को तेज करने के लिए 'build-only' पर सेट करें।
|
|
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
|
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
180
182
|
*/
|
|
181
|
-
|
|
183
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
187
|
+
*/
|
|
188
|
+
noMetadata: false,
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* शब्दकोश कुंजी उपसर्ग
|
|
185
192
|
*/
|
|
186
|
-
dictionaryKeyPrefix: "", //
|
|
193
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
187
194
|
|
|
188
195
|
/**
|
|
189
|
-
* इंगित करता है कि क्या
|
|
190
|
-
* इस तरह,
|
|
196
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
197
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
191
198
|
*/
|
|
192
199
|
saveComponents: false,
|
|
193
200
|
},
|
|
@@ -209,3 +216,61 @@ npx intlayer fill # लापता अनुवाद भरें
|
|
|
209
216
|
```
|
|
210
217
|
|
|
211
218
|
> अधिक विवरण के लिए, [CLI दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/ci.md) देखें।
|
|
219
|
+
|
|
220
|
+
### कंपाइलर कॉन्फ़िगरेशन संदर्भ
|
|
221
|
+
|
|
222
|
+
निम्नलिखित गुणों को आपकी `intlayer.config.ts` फ़ाइल के `compiler` ब्लॉक में कॉन्फ़िगर किया जा सकता है:
|
|
223
|
+
|
|
224
|
+
- **enabled**:
|
|
225
|
+
- _प्रकार_: `boolean | 'build-only'`
|
|
226
|
+
- _डिफ़ॉल्ट_: `true`
|
|
227
|
+
- _विवरण_: इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
228
|
+
- **dictionaryKeyPrefix**:
|
|
229
|
+
- _प्रकार_: `string`
|
|
230
|
+
- _डिफ़ॉल्ट_: `'comp-'`
|
|
231
|
+
- _विवरण_: निकाली गई शब्दकोश कुंजियों के लिए उपसर्ग।
|
|
232
|
+
- **transformPattern**:
|
|
233
|
+
- _प्रकार_: `string | string[]`
|
|
234
|
+
- _डिफ़ॉल्ट_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
+
- _विवरण_: ऑप्टिमाइज़ करने के लिए कोड को पार करने के पैटर्न।
|
|
236
|
+
- **excludePattern**:
|
|
237
|
+
- _प्रकार_: `string | string[]`
|
|
238
|
+
- _डिफ़ॉल्ट_: `['**/node_modules/**']`
|
|
239
|
+
- _विवरण_: ऑप्टिमाइज़ेशन से बाहर रखने के पैटर्न।
|
|
240
|
+
- **outputDir** (Deprecated):
|
|
241
|
+
- _प्रकार_: `string`
|
|
242
|
+
- _डिफ़ॉल्ट_: `'compiler'`
|
|
243
|
+
- _विवरण_: वह निर्देशिका जहाँ निकाली गई शब्दकोश सामग्री संग्रहीत की जाएगी।
|
|
244
|
+
|
|
245
|
+
- **output**:
|
|
246
|
+
- _प्रकार_: `FilePathPattern`
|
|
247
|
+
- _डिफ़ॉल्ट_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
|
+
- _विवरण_: आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है। `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, और `{{componentFormat}}` जैसे गतिशील चरों को संभालता है। इसे `'my/{{var}}/path'` प्रारूप का उपयोग करके एक स्ट्रिंग के रूप में, या एक फ़ंक्शन के रूप में सेट किया जा सकता है।
|
|
249
|
+
- _नोट_: `./**/*` पथ घटक के सापेक्ष हल किए जाते हैं। `/**/*` पथ Intlayer `baseDir` के सापेक्ष हल किए जाते हैं।
|
|
250
|
+
- _उदाहरण_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
|
+
|
|
252
|
+
- **noMetadata**:
|
|
253
|
+
- _प्रकार_: `boolean`
|
|
254
|
+
- _डिफ़ॉल्ट_: `false`
|
|
255
|
+
- _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा।
|
|
256
|
+
- _नोट_: `loadJSON` प्लगइन के साथ उपयोग किए जाने पर उपयोगी।
|
|
257
|
+
- _उदाहरण_: यदि `सही` है:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
यदि `गलत` है:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _प्रकार_: `boolean`
|
|
275
|
+
- _डिफ़ॉल्ट_: `false`
|
|
276
|
+
- _विवरण_: इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
package/docs/hi/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-11
|
|
4
4
|
title: कॉन्फ़िगरेशन
|
|
5
5
|
description: अपने एप्लिकेशन के लिए Intlayer को कॉन्फ़िगर करना सीखें। Intlayer को अपनी आवश्यकताओं के अनुसार अनुकूलित करने के लिए विभिन्न सेटिंग्स और विकल्पों को समझें।
|
|
6
6
|
keywords:
|
|
@@ -14,18 +14,24 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.3.0
|
|
18
|
+
data: 2026-03-11
|
|
19
|
+
changes: 'baseDir' को 'content' से 'system' कॉन्फिग में ले जाया गया
|
|
20
|
+
- version: 8.2.0
|
|
21
|
+
date: 2026-03-09
|
|
22
|
+
changes: कंपाइलर विकल्पों को अपडेट करें, 'output' और 'noMetadata' समर्थन जोड़ें
|
|
17
23
|
- version: 8.1.7
|
|
18
24
|
date: 2026-02-25
|
|
19
25
|
changes: कंपाइलर विकल्पों को अपडेट करें
|
|
20
26
|
- version: 8.0.6
|
|
21
27
|
date: 2026-02-12
|
|
22
|
-
changes:
|
|
28
|
+
changes: Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, और Together.ai प्रदाताओं के लिए समर्थन जोड़ें
|
|
23
29
|
- version: 8.0.5
|
|
24
30
|
date: 2026-02-06
|
|
25
31
|
changes: AI कॉन्फ़िगरेशन में `dataSerialization` जोड़ें
|
|
26
32
|
- version: 8.0.0
|
|
27
33
|
date: 2026-01-22
|
|
28
|
-
changes:
|
|
34
|
+
changes: आयात मोड निर्माण कॉन्फ़िगरेशन को शब्दकोश कॉन्फ़िगरेशन में ले जाएं।
|
|
29
35
|
- version: 8.0.0
|
|
30
36
|
date: 2026-01-18
|
|
31
37
|
changes: सिस्टम कॉन्फ़िगरेशन को सामग्री कॉन्फ़िगरेशन से अलग करें। आंतरिक पथों को `system` गुण में ले जाएं। सामग्री फ़ाइलों को कोड परिवर्तन से अलग करने के लिए `codeDir` जोड़ें।
|
|
@@ -419,7 +425,7 @@ const config: IntlayerConfig = {
|
|
|
419
425
|
*/
|
|
420
426
|
compiler: {
|
|
421
427
|
/**
|
|
422
|
-
*
|
|
428
|
+
* इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
423
429
|
*/
|
|
424
430
|
enabled: true,
|
|
425
431
|
|
|
@@ -437,18 +443,23 @@ const config: IntlayerConfig = {
|
|
|
437
443
|
excludePattern: ["**/node_modules/**"],
|
|
438
444
|
|
|
439
445
|
/**
|
|
440
|
-
*
|
|
446
|
+
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
441
447
|
*/
|
|
442
|
-
|
|
448
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
443
449
|
|
|
444
450
|
/**
|
|
445
|
-
*
|
|
451
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
452
|
+
*/
|
|
453
|
+
noMetadata: false,
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
446
457
|
*/
|
|
447
458
|
dictionaryKeyPrefix: "", // Remove base prefix
|
|
448
459
|
|
|
449
460
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
461
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
462
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
452
463
|
*/
|
|
453
464
|
saveComponents: false,
|
|
454
465
|
},
|
|
@@ -704,7 +715,7 @@ export default config;
|
|
|
704
715
|
#### गुण
|
|
705
716
|
|
|
706
717
|
- **autoFill**:
|
|
707
|
-
- _प्रकार_: `boolean | string | { [key in Locales]?: string }`
|
|
718
|
+
- _प्रकार_: `boolean | string | FilePathPattern | { [key in Locales]?: string }`
|
|
708
719
|
- _डिफ़ॉल्ट_: `undefined`
|
|
709
720
|
- _विवरण_: यह संकेत करता है कि सामग्री को AI का उपयोग करके स्वचालित रूप से कैसे भरा जाना चाहिए। इसे वैश्विक रूप से `intlayer.config.ts` फ़ाइल में घोषित किया जा सकता है।
|
|
710
721
|
- _उदाहरण_: true
|
|
@@ -727,13 +738,6 @@ export default config;
|
|
|
727
738
|
- _उदाहरण_: `['.data.ts', '.data.js', '.data.json']`
|
|
728
739
|
- _टिप्पणी_: फ़ाइल एक्सटेंशन को कस्टमाइज़ करने से टकराव से बचा जा सकता है।
|
|
729
740
|
|
|
730
|
-
- **baseDir**:
|
|
731
|
-
- _प्रकार_: `string`
|
|
732
|
-
- _डिफ़ॉल्ट_: `process.cwd()`
|
|
733
|
-
- _विवरण_: परियोजना के लिए मूल निर्देशिका।
|
|
734
|
-
- _उदाहरण_: `'/path/to/project'`
|
|
735
|
-
- _टिप्पणी_: इसका उपयोग सभी Intlayer-संबंधित निर्देशिकाओं को हल करने के लिए किया जाता है।
|
|
736
|
-
|
|
737
741
|
- **dictionaryOutput**:
|
|
738
742
|
- _प्रकार_: `string[]`
|
|
739
743
|
- _डिफ़ॉल्ट_: `['intlayer']`
|
|
@@ -802,6 +806,21 @@ export default config;
|
|
|
802
806
|
- _विवरण_: सामग्री खोज से बाहर किए गए निर्देशिकाएँ।
|
|
803
807
|
- _नोट_: यह सेटिंग अभी उपयोग में नहीं है, लेकिन भविष्य में लागू करने की योजना है।
|
|
804
808
|
|
|
809
|
+
---
|
|
810
|
+
|
|
811
|
+
### सिस्टम कॉन्फ़िगरेशन
|
|
812
|
+
|
|
813
|
+
Intlayer के आंतरिक पथों और आउटपुट परिणामों से संबंधित सेटिंग्स। ये सेटिंग्स आमतौर पर आंतरिक होती हैं और उपयोगकर्ता द्वारा संशोधित करने की आवश्यकता नहीं होनी चाहिए।
|
|
814
|
+
|
|
815
|
+
#### गुण
|
|
816
|
+
|
|
817
|
+
- **baseDir**:
|
|
818
|
+
- _प्रकार_: `string`
|
|
819
|
+
- _डिफ़ॉल्ट_: `process.cwd()`
|
|
820
|
+
- _विवरण_: परियोजना के लिए मूल निर्देशिका।
|
|
821
|
+
- _उदाहरण_: `'/path/to/project'`
|
|
822
|
+
- _टिप्पणी_: इसका उपयोग सभी Intlayer-संबंधित निर्देशिकाओं को हल करने के लिए किया जाता है।
|
|
823
|
+
|
|
805
824
|
### शब्दकोश कॉन्फ़िगरेशन
|
|
806
825
|
|
|
807
826
|
सेटिंग्स जो शब्दकोश संचालन को नियंत्रित करती हैं, जिसमें ऑटो-फिल व्यवहार और सामग्री जनरेशन शामिल है।
|
|
@@ -847,7 +866,7 @@ export default config;
|
|
|
847
866
|
- _डिफ़ॉल्ट_: `'[intlayer] '`
|
|
848
867
|
- _विवरण_: लॉगर का उपसर्ग।
|
|
849
868
|
- _उदाहरण_: `'[my custom prefix] '`
|
|
850
|
-
-
|
|
869
|
+
- _नोट_: लॉगर का उपसर्ग।
|
|
851
870
|
|
|
852
871
|
### एआई कॉन्फ़िगरेशन
|
|
853
872
|
|
|
@@ -950,10 +969,10 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
950
969
|
- _नोट_: शब्दकोश बिल्ड को अक्षम करने के लिए उपयोग किया जा सकता है, उदाहरण के लिए जब Node.js वातावरण में निष्पादन से बचना चाहिए।
|
|
951
970
|
|
|
952
971
|
- **checkTypes**:
|
|
953
|
-
-
|
|
954
|
-
-
|
|
955
|
-
-
|
|
956
|
-
-
|
|
972
|
+
- _प्रकार_: `boolean`
|
|
973
|
+
- _डिफ़ॉल्ट_: `false`
|
|
974
|
+
- _विवरण_: इंगित करता है कि क्या बिल्ड को TypeScript प्रकारों की जांच करनी चाहिए और त्रुटियों को लॉग करना चाहिए।
|
|
975
|
+
- _नोट_: यह बिल्ड को धीमा कर सकता है।
|
|
957
976
|
|
|
958
977
|
- **optimize**:
|
|
959
978
|
- _प्रकार_: `boolean`
|
|
@@ -966,7 +985,7 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
966
985
|
- _नोट_: सुनिश्चित करें कि सभी कुंजियाँ `useIntlayer` कॉल्स में स्थैतिक रूप से घोषित हों। उदाहरण के लिए `useIntlayer('navbar')`।
|
|
967
986
|
|
|
968
987
|
- **importMode**:
|
|
969
|
-
-
|
|
988
|
+
- _नोट_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
970
989
|
- _प्रकार_: `'static' | 'dynamic' | 'fetch'`
|
|
971
990
|
- _डिफ़ॉल्ट_: `'static'`
|
|
972
991
|
- _विवरण_: नियंत्रित करता है कि शब्दकोश कैसे आयात किए जाते हैं।
|
|
@@ -1045,3 +1064,31 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
1045
1064
|
- _प्रकार_: `string`
|
|
1046
1065
|
- _डिफ़ॉल्ट_: `'compiler'`
|
|
1047
1066
|
- _विवरण_: वह निर्देशिका जहाँ निकाले गए शब्दकोश संग्रहीत किए जाएंगे, आपके प्रोजेक्ट बेस पाथ के सापेक्ष।
|
|
1067
|
+
|
|
1068
|
+
- **output**:
|
|
1069
|
+
- _प्रकार_: `FilePathPattern`
|
|
1070
|
+
- _डिफ़ॉल्ट_: `({ key }) => 'compiler/${key}.content.json'`
|
|
1071
|
+
- _विवरण_: आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है। `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, और `{{componentFormat}}` जैसे गतिशील चरों को संभालता है। इसे `'my/{{var}}/path'` प्रारूप का उपयोग करके एक स्ट्रिंग के रूप में, या एक फ़ंक्शन के रूप में सेट किया जा सकता है।
|
|
1072
|
+
- _नोट_: `./**/*` पथ घटक के सापेक्ष हल किए जाते हैं। `/**/*` पथ Intlayer `baseDir` के सापेक्ष हल किए जाते हैं।
|
|
1073
|
+
- _उदाहरण_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
1074
|
+
|
|
1075
|
+
- **noMetadata**:
|
|
1076
|
+
- _प्रकार_: `boolean`
|
|
1077
|
+
- _डिफ़ॉल्ट_: `false`
|
|
1078
|
+
- _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा।
|
|
1079
|
+
- _नोट_: `loadJSON` प्लगइन के साथ उपयोग किए जाने पर उपयोगी।
|
|
1080
|
+
- _उदाहरण_: यदि `सही` है:
|
|
1081
|
+
```json
|
|
1082
|
+
{
|
|
1083
|
+
"key": "value"
|
|
1084
|
+
}
|
|
1085
|
+
```
|
|
1086
|
+
यदि `गलत` है:
|
|
1087
|
+
```json
|
|
1088
|
+
{
|
|
1089
|
+
"key": "value",
|
|
1090
|
+
"content": {
|
|
1091
|
+
"key": "value"
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
```
|
|
@@ -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: प्रारंभिक विमोचन
|
|
@@ -128,23 +131,28 @@ const config: IntlayerConfig = {
|
|
|
128
131
|
},
|
|
129
132
|
compiler: {
|
|
130
133
|
/**
|
|
131
|
-
* इंगित करता है कि कंपाइलर सक्षम होना
|
|
134
|
+
* इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
132
135
|
*/
|
|
133
136
|
enabled: true,
|
|
134
137
|
|
|
135
138
|
/**
|
|
136
|
-
*
|
|
139
|
+
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
137
140
|
*/
|
|
138
|
-
|
|
141
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
|
-
*
|
|
144
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
142
145
|
*/
|
|
143
|
-
|
|
146
|
+
noMetadata: false,
|
|
144
147
|
|
|
145
148
|
/**
|
|
146
|
-
*
|
|
147
|
-
|
|
149
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
150
|
+
*/
|
|
151
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
155
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
148
156
|
*/
|
|
149
157
|
saveComponents: false,
|
|
150
158
|
},
|
|
@@ -437,12 +437,33 @@ export const Route = createFileRoute("/{-$locale}/")({
|
|
|
437
437
|
component: RouteComponent,
|
|
438
438
|
head: ({ params }) => {
|
|
439
439
|
const { locale } = params;
|
|
440
|
+
const path = "/"; // The path for this route
|
|
441
|
+
|
|
440
442
|
const metaContent = getIntlayer("app", locale);
|
|
441
443
|
|
|
442
444
|
return {
|
|
445
|
+
links: [
|
|
446
|
+
// Canonical link: Points to the current localized page
|
|
447
|
+
{ rel: "canonical", href: getLocalizedUrl(path, locale) },
|
|
448
|
+
|
|
449
|
+
// Hreflang: Tell Google about all localized versions
|
|
450
|
+
...localeMap(({ locale: mapLocale }) => ({
|
|
451
|
+
rel: "alternate",
|
|
452
|
+
hrefLang: mapLocale,
|
|
453
|
+
href: getLocalizedUrl(path, mapLocale),
|
|
454
|
+
})),
|
|
455
|
+
|
|
456
|
+
// x-default: For users in unmatched languages
|
|
457
|
+
// Define the default fallback locale (usually your primary language)
|
|
458
|
+
{
|
|
459
|
+
rel: "alternate",
|
|
460
|
+
hrefLang: "x-default",
|
|
461
|
+
href: getLocalizedUrl(path, defaultLocale),
|
|
462
|
+
},
|
|
463
|
+
],
|
|
443
464
|
meta: [
|
|
444
465
|
{ title: metaContent.title },
|
|
445
|
-
{ content: metaContent.meta.description
|
|
466
|
+
{ name: "description", content: metaContent.meta.description },
|
|
446
467
|
],
|
|
447
468
|
};
|
|
448
469
|
},
|
|
@@ -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`,
|
|
136
139
|
|
|
137
140
|
/**
|
|
138
|
-
*
|
|
141
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
139
142
|
*/
|
|
140
|
-
|
|
143
|
+
noMetadata: false,
|
|
141
144
|
|
|
142
145
|
/**
|
|
143
|
-
*
|
|
144
|
-
|
|
146
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
147
|
+
*/
|
|
148
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
152
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
145
153
|
*/
|
|
146
154
|
saveComponents: false,
|
|
147
155
|
},
|
package/docs/id/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 | Ekstraksi Konten Otomatis untuk i18n
|
|
5
5
|
description: Otomatiskan proses internasionalisasi Anda dengan Intlayer Compiler. Ekstrak konten langsung dari komponen Anda untuk i18n yang lebih cepat dan efisien di Vite, Next.js, dan lainnya.
|
|
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-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: Perbarui opsi kompiler
|
|
@@ -157,13 +160,12 @@ import { type IntlayerConfig, Locales } from "intlayer";
|
|
|
157
160
|
const config: IntlayerConfig = {
|
|
158
161
|
compiler: {
|
|
159
162
|
/**
|
|
160
|
-
*
|
|
161
|
-
* Atur ke 'build-only' untuk melewatkan compiler selama pengembangan dan mempercepat waktu startup.
|
|
163
|
+
* Atur ke 'build-only' untuk melewatkan kompiler selama pengembangan dan mempercepat waktu mulai.
|
|
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
|
* Direktori output untuk kamus yang dioptimalkan.
|
|
180
182
|
*/
|
|
181
|
-
|
|
183
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Masukkan konten saja dalam file yang dihasilkan, tanpa kunci.
|
|
187
|
+
*/
|
|
188
|
+
noMetadata: false,
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* Awalan kunci kamus
|
|
185
192
|
*/
|
|
186
|
-
dictionaryKeyPrefix: "", //
|
|
193
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
187
194
|
|
|
188
195
|
/**
|
|
189
196
|
* Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|
|
190
|
-
* Dengan begitu,
|
|
197
|
+
* Dengan begitu, kompiler hanya perlu dijalankan sekali untuk mentransformasi aplikasi, lalu dapat dihapus.
|
|
191
198
|
*/
|
|
192
199
|
saveComponents: false,
|
|
193
200
|
},
|
|
@@ -209,3 +216,61 @@ npx intlayer fill # Isi terjemahan yang hilang
|
|
|
209
216
|
```
|
|
210
217
|
|
|
211
218
|
> Untuk rincian lebih lanjut, silakan merujuk ke [dokumentasi CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/ci.md)
|
|
219
|
+
|
|
220
|
+
### Referensi Konfigurasi Kompiler
|
|
221
|
+
|
|
222
|
+
Properti berikut dapat dikonfigurasi dalam blok `compiler` pada file `intlayer.config.ts` Anda:
|
|
223
|
+
|
|
224
|
+
- **enabled**:
|
|
225
|
+
- _Tipe_: `boolean | 'build-only'`
|
|
226
|
+
- _Default_: `true`
|
|
227
|
+
- _Deskripsi_: Menunjukkan apakah kompiler harus diaktifkan.
|
|
228
|
+
- **dictionaryKeyPrefix**:
|
|
229
|
+
- _Tipe_: `string`
|
|
230
|
+
- _Default_: `'comp-'`
|
|
231
|
+
- _Deskripsi_: Awalan untuk kunci kamus yang diekstrak.
|
|
232
|
+
- **transformPattern**:
|
|
233
|
+
- _Tipe_: `string | string[]`
|
|
234
|
+
- _Default_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
+
- _Deskripsi_: Pola untuk menelusuri kode yang ingin dioptimalkan.
|
|
236
|
+
- **excludePattern**:
|
|
237
|
+
- _Tipe_: `string | string[]`
|
|
238
|
+
- _Default_: `['**/node_modules/**']`
|
|
239
|
+
- _Deskripsi_: Pola yang harus dikecualikan dari optimasi.
|
|
240
|
+
- **outputDir** (Deprecated):
|
|
241
|
+
- _Tipe_: `string`
|
|
242
|
+
- _Default_: `'compiler'`
|
|
243
|
+
- _Deskripsi_: Direktori tempat kamus yang diekstrak akan disimpan.
|
|
244
|
+
|
|
245
|
+
- **output**:
|
|
246
|
+
- _Tipe_: `FilePathPattern`
|
|
247
|
+
- _Default_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
|
+
- _Deskripsi_: Mendefinisikan jalur file output. Menggantikan `outputDir`. Menangani variabel dinamis seperti `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, dan `{{componentFormat}}`. Dapat diatur sebagai string menggunakan format `'my/{{var}}/path'`, atau sebagai fungsi.
|
|
249
|
+
- _Catatan_: Jalur `./**/*` diselesaikan relatif terhadap komponen. Jalur `/**/*` diselesaikan relatif terhadap `baseDir` Intlayer.
|
|
250
|
+
- _Contoh_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
|
+
|
|
252
|
+
- **noMetadata**:
|
|
253
|
+
- _Tipe_: `boolean`
|
|
254
|
+
- _Default_: `false`
|
|
255
|
+
- _Deskripsi_: Menunjukkan apakah metadata harus disimpan dalam file. Jika benar, kompiler tidak akan menyimpan metadata kamus (kunci, pembungkus konten).
|
|
256
|
+
- _Catatan_: Berguna jika digunakan dengan plugin `loadJSON`.
|
|
257
|
+
- _Contoh_: Jika `true`:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
Jika `false`:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _Tipe_: `boolean`
|
|
275
|
+
- _Default_: `false`
|
|
276
|
+
- _Deskripsi_: Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|