@intlayer/docs 8.3.1 → 8.3.2
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/blog/ar/i18n_using_next-i18next.md +1 -0
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +0 -29
- package/blog/uk/internationalization_and_SEO.md +1 -1
- package/docs/ar/configuration.md +2 -21
- package/docs/ar/intlayer_with_analog.md +2 -2
- package/docs/ar/intlayer_with_angular.md +2 -2
- package/docs/ar/intlayer_with_astro.md +2 -2
- package/docs/ar/intlayer_with_lynx+react.md +2 -2
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +4 -7
- package/docs/ar/intlayer_with_react_native+expo.md +2 -2
- package/docs/ar/intlayer_with_vite+preact.md +2 -2
- package/docs/ar/intlayer_with_vite+solid.md +2 -2
- package/docs/ar/intlayer_with_vite+svelte.md +2 -2
- package/docs/ar/intlayer_with_vite+vue.md +4 -4
- package/docs/ar/vs_code_extension.md +1 -1
- package/docs/de/configuration.md +2 -21
- package/docs/de/intlayer_with_analog.md +2 -2
- package/docs/de/intlayer_with_angular.md +2 -2
- package/docs/de/intlayer_with_astro.md +2 -2
- package/docs/de/intlayer_with_lynx+react.md +2 -2
- package/docs/de/intlayer_with_react_native+expo.md +2 -2
- package/docs/de/intlayer_with_vite+preact.md +2 -2
- package/docs/de/intlayer_with_vite+solid.md +2 -2
- package/docs/de/intlayer_with_vite+svelte.md +2 -2
- package/docs/de/intlayer_with_vite+vue.md +2 -2
- package/docs/de/vs_code_extension.md +1 -1
- package/docs/en/configuration.md +2 -20
- package/docs/en/intlayer_with_analog.md +1 -1
- package/docs/en/intlayer_with_angular.md +1 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_react_native+expo.md +1 -1
- package/docs/en/intlayer_with_vite+preact.md +1 -1
- package/docs/en/intlayer_with_vite+solid.md +1 -1
- package/docs/en/intlayer_with_vite+svelte.md +1 -1
- package/docs/en/intlayer_with_vite+vue.md +1 -1
- package/docs/en/vs_code_extension.md +1 -1
- package/docs/en-GB/configuration.md +2 -21
- package/docs/en-GB/intlayer_with_analog.md +1 -1
- package/docs/en-GB/intlayer_with_angular.md +1 -1
- package/docs/en-GB/intlayer_with_astro.md +1 -1
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -1
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
- package/docs/en-GB/intlayer_with_vite+preact.md +1 -1
- package/docs/en-GB/intlayer_with_vite+react.md +1 -1
- package/docs/en-GB/intlayer_with_vite+solid.md +1 -1
- package/docs/en-GB/intlayer_with_vite+svelte.md +1 -1
- package/docs/en-GB/intlayer_with_vite+vue.md +2 -2
- package/docs/en-GB/vs_code_extension.md +1 -1
- package/docs/es/configuration.md +2 -21
- package/docs/es/intlayer_with_analog.md +2 -2
- package/docs/es/intlayer_with_angular.md +2 -2
- package/docs/es/intlayer_with_astro.md +2 -2
- package/docs/es/intlayer_with_lynx+react.md +2 -2
- package/docs/es/intlayer_with_react_native+expo.md +2 -2
- package/docs/es/intlayer_with_vite+preact.md +2 -2
- package/docs/es/intlayer_with_vite+solid.md +2 -2
- package/docs/es/intlayer_with_vite+svelte.md +2 -2
- package/docs/es/intlayer_with_vite+vue.md +4 -4
- package/docs/es/vs_code_extension.md +1 -1
- package/docs/fr/configuration.md +2 -21
- package/docs/fr/intlayer_with_analog.md +2 -2
- package/docs/fr/intlayer_with_angular.md +2 -2
- package/docs/fr/intlayer_with_astro.md +2 -2
- package/docs/fr/intlayer_with_lynx+react.md +2 -2
- package/docs/fr/intlayer_with_react_native+expo.md +2 -2
- package/docs/fr/intlayer_with_vite+preact.md +2 -2
- package/docs/fr/intlayer_with_vite+react.md +2 -2
- package/docs/fr/intlayer_with_vite+solid.md +2 -2
- package/docs/fr/intlayer_with_vite+svelte.md +2 -2
- package/docs/fr/intlayer_with_vite+vue.md +4 -4
- package/docs/fr/vs_code_extension.md +1 -1
- package/docs/hi/configuration.md +2 -21
- package/docs/hi/intlayer_with_analog.md +1 -1
- package/docs/hi/intlayer_with_angular.md +2 -2
- package/docs/hi/intlayer_with_astro.md +2 -2
- package/docs/hi/intlayer_with_lynx+react.md +2 -2
- package/docs/hi/intlayer_with_react_native+expo.md +2 -2
- package/docs/hi/intlayer_with_vite+preact.md +2 -2
- package/docs/hi/intlayer_with_vite+solid.md +2 -2
- package/docs/hi/intlayer_with_vite+svelte.md +2 -2
- package/docs/hi/intlayer_with_vite+vue.md +2 -2
- package/docs/hi/vs_code_extension.md +1 -1
- package/docs/id/configuration.md +2 -20
- package/docs/id/intlayer_with_analog.md +2 -2
- package/docs/id/intlayer_with_angular.md +2 -2
- package/docs/id/intlayer_with_astro.md +2 -2
- package/docs/id/intlayer_with_lynx+react.md +2 -2
- package/docs/id/intlayer_with_react_native+expo.md +2 -2
- package/docs/id/intlayer_with_vite+preact.md +2 -2
- package/docs/id/intlayer_with_vite+react.md +2 -2
- package/docs/id/intlayer_with_vite+solid.md +2 -2
- package/docs/id/intlayer_with_vite+svelte.md +2 -2
- package/docs/id/intlayer_with_vite+vue.md +2 -2
- package/docs/id/vs_code_extension.md +1 -1
- package/docs/it/configuration.md +2 -22
- package/docs/it/intlayer_with_analog.md +2 -2
- package/docs/it/intlayer_with_angular.md +2 -2
- package/docs/it/intlayer_with_astro.md +2 -2
- package/docs/it/intlayer_with_lynx+react.md +2 -2
- package/docs/it/intlayer_with_react_native+expo.md +2 -2
- package/docs/it/intlayer_with_vite+preact.md +2 -2
- package/docs/it/intlayer_with_vite+react.md +2 -2
- package/docs/it/intlayer_with_vite+solid.md +2 -2
- package/docs/it/intlayer_with_vite+svelte.md +2 -2
- package/docs/it/intlayer_with_vite+vue.md +4 -4
- package/docs/it/vs_code_extension.md +1 -1
- package/docs/ja/configuration.md +2 -21
- package/docs/ja/intlayer_with_analog.md +2 -2
- package/docs/ja/intlayer_with_angular.md +2 -2
- package/docs/ja/intlayer_with_astro.md +2 -2
- package/docs/ja/intlayer_with_lynx+react.md +2 -2
- package/docs/ja/intlayer_with_react_native+expo.md +2 -2
- package/docs/ja/intlayer_with_vite+solid.md +2 -2
- package/docs/ja/intlayer_with_vite+svelte.md +2 -2
- package/docs/ja/intlayer_with_vite+vue.md +2 -2
- package/docs/ja/vs_code_extension.md +1 -1
- package/docs/ko/configuration.md +2 -21
- package/docs/ko/intlayer_with_analog.md +2 -2
- package/docs/ko/intlayer_with_angular.md +2 -2
- package/docs/ko/intlayer_with_astro.md +2 -2
- package/docs/ko/intlayer_with_lynx+react.md +2 -2
- package/docs/ko/intlayer_with_react_native+expo.md +2 -2
- package/docs/ko/intlayer_with_vite+preact.md +2 -2
- package/docs/ko/intlayer_with_vite+solid.md +2 -2
- package/docs/ko/intlayer_with_vite+svelte.md +2 -2
- package/docs/ko/intlayer_with_vite+vue.md +2 -2
- package/docs/ko/vs_code_extension.md +1 -1
- package/docs/pl/configuration.md +2 -20
- package/docs/pl/intlayer_with_analog.md +2 -2
- package/docs/pl/intlayer_with_angular.md +2 -2
- package/docs/pl/intlayer_with_astro.md +2 -2
- package/docs/pl/intlayer_with_lynx+react.md +2 -2
- package/docs/pl/intlayer_with_react_native+expo.md +2 -2
- package/docs/pl/intlayer_with_vite+preact.md +1 -1
- package/docs/pl/intlayer_with_vite+react.md +2 -2
- package/docs/pl/intlayer_with_vite+solid.md +2 -2
- package/docs/pl/intlayer_with_vite+svelte.md +2 -2
- package/docs/pl/intlayer_with_vite+vue.md +4 -4
- package/docs/pl/vs_code_extension.md +1 -1
- package/docs/pt/configuration.md +2 -12
- package/docs/pt/intlayer_with_analog.md +2 -2
- package/docs/pt/intlayer_with_angular.md +2 -2
- package/docs/pt/intlayer_with_astro.md +2 -2
- package/docs/pt/intlayer_with_lynx+react.md +2 -2
- package/docs/pt/intlayer_with_react_native+expo.md +2 -2
- package/docs/pt/intlayer_with_vite+preact.md +1 -1
- package/docs/pt/intlayer_with_vite+solid.md +2 -2
- package/docs/pt/intlayer_with_vite+svelte.md +2 -2
- package/docs/pt/intlayer_with_vite+vue.md +2 -2
- package/docs/pt/vs_code_extension.md +1 -1
- package/docs/ru/configuration.md +2 -21
- package/docs/ru/intlayer_with_analog.md +2 -2
- package/docs/ru/intlayer_with_angular.md +2 -2
- package/docs/ru/intlayer_with_astro.md +2 -2
- package/docs/ru/intlayer_with_lynx+react.md +2 -2
- package/docs/ru/intlayer_with_react_native+expo.md +2 -2
- package/docs/ru/intlayer_with_vite+preact.md +2 -2
- package/docs/ru/intlayer_with_vite+solid.md +2 -2
- package/docs/ru/intlayer_with_vite+svelte.md +2 -2
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/vs_code_extension.md +1 -1
- package/docs/tr/configuration.md +2 -21
- package/docs/tr/intlayer_with_analog.md +2 -2
- package/docs/tr/intlayer_with_angular.md +2 -2
- package/docs/tr/intlayer_with_astro.md +2 -2
- package/docs/tr/intlayer_with_lynx+react.md +2 -2
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +6 -14
- package/docs/tr/intlayer_with_react_native+expo.md +2 -2
- package/docs/tr/intlayer_with_vite+preact.md +2 -2
- package/docs/tr/intlayer_with_vite+react.md +2 -2
- package/docs/tr/intlayer_with_vite+solid.md +2 -2
- package/docs/tr/intlayer_with_vite+svelte.md +2 -2
- package/docs/tr/intlayer_with_vite+vue.md +2 -2
- package/docs/tr/vs_code_extension.md +1 -1
- package/docs/uk/configuration.md +2 -20
- package/docs/uk/intlayer_with_analog.md +2 -2
- package/docs/uk/intlayer_with_angular.md +2 -2
- package/docs/uk/intlayer_with_astro.md +2 -2
- package/docs/uk/intlayer_with_lynx+react.md +2 -2
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +4 -22
- package/docs/uk/intlayer_with_react_native+expo.md +2 -2
- package/docs/uk/intlayer_with_vite+preact.md +2 -2
- package/docs/uk/intlayer_with_vite+solid.md +2 -2
- package/docs/uk/intlayer_with_vite+svelte.md +2 -2
- package/docs/uk/intlayer_with_vite+vue.md +2 -2
- package/docs/uk/vs_code_extension.md +1 -1
- package/docs/vi/configuration.md +2 -20
- package/docs/vi/intlayer_with_analog.md +2 -2
- package/docs/vi/intlayer_with_angular.md +2 -2
- package/docs/vi/intlayer_with_astro.md +2 -2
- package/docs/vi/intlayer_with_lynx+react.md +2 -2
- package/docs/vi/intlayer_with_react_native+expo.md +2 -2
- package/docs/vi/intlayer_with_vite+preact.md +2 -2
- package/docs/vi/intlayer_with_vite+react.md +2 -2
- package/docs/vi/intlayer_with_vite+solid.md +2 -2
- package/docs/vi/intlayer_with_vite+svelte.md +2 -2
- package/docs/vi/intlayer_with_vite+vue.md +2 -2
- package/docs/vi/vs_code_extension.md +1 -1
- package/docs/zh/configuration.md +2 -21
- package/docs/zh/intlayer_with_analog.md +2 -2
- package/docs/zh/intlayer_with_angular.md +2 -2
- package/docs/zh/intlayer_with_astro.md +2 -2
- package/docs/zh/intlayer_with_lynx+react.md +2 -2
- package/docs/zh/intlayer_with_react_native+expo.md +2 -2
- package/docs/zh/intlayer_with_vite+preact.md +2 -2
- package/docs/zh/intlayer_with_vite+solid.md +2 -2
- package/docs/zh/intlayer_with_vite+svelte.md +2 -2
- package/docs/zh/intlayer_with_vite+vue.md +4 -4
- package/docs/zh/vs_code_extension.md +2 -2
- package/package.json +8 -8
- package/docs/update_docs.py +0 -65
|
@@ -80,6 +80,7 @@ history:
|
|
|
80
80
|
title="عرض توضيحي CodeSandbox - كيفية تدويل تطبيقك باستخدام Intlayer"
|
|
81
81
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
82
82
|
loading="lazy"
|
|
83
|
+
/>
|
|
83
84
|
|
|
84
85
|
> راجع [قالب التطبيق](https://github.com/aymericzip/next-i18next-template) على GitHub.
|
|
85
86
|
|
|
@@ -225,35 +225,6 @@ Here is an example of the impact of bundle size optimisation using `intlayer` in
|
|
|
225
225
|
|
|
226
226
|
## Routing, middleware & URL strategy
|
|
227
227
|
|
|
228
|
-
- **Generates strict types** from your content. **IDE autocompletion** and **compile-time errors** catch typos and missing keys before deployment.
|
|
229
|
-
|
|
230
|
-
</Column>
|
|
231
|
-
</Columns>
|
|
232
|
-
|
|
233
|
-
**Why it matters:** Strong typing shifts failures **left** (CI/build) instead of **right** (runtime).
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
## Missing translation handling
|
|
238
|
-
|
|
239
|
-
**next-intl**
|
|
240
|
-
|
|
241
|
-
- Relies on **runtime fallbacks** (e.g., show the key or default locale). Build does not fail.
|
|
242
|
-
|
|
243
|
-
**next-i18next**
|
|
244
|
-
|
|
245
|
-
- Relies on **runtime fallbacks** (e.g., show the key or default locale). Build does not fail.
|
|
246
|
-
|
|
247
|
-
**intlayer**
|
|
248
|
-
|
|
249
|
-
- **Build-time detection** with **warnings/errors** for missing locales or keys.
|
|
250
|
-
|
|
251
|
-
**Why it matters:** Catching gaps during build prevents “mystery strings” in production and aligns with strict release gates.
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
## Routing, middleware & URL strategy
|
|
256
|
-
|
|
257
228
|
<Columns>
|
|
258
229
|
<Column>
|
|
259
230
|
|
package/docs/ar/configuration.md
CHANGED
|
@@ -256,13 +256,13 @@ const config: IntlayerConfig = {
|
|
|
256
256
|
editor: {
|
|
257
257
|
/**
|
|
258
258
|
* Whether the visual editor is enabled.
|
|
259
|
-
* Default:
|
|
259
|
+
* Default: false
|
|
260
260
|
*/
|
|
261
261
|
enabled: true,
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
264
|
* URL of your application for origin validation.
|
|
265
|
-
* Default: "
|
|
265
|
+
* Default: ""
|
|
266
266
|
*/
|
|
267
267
|
applicationURL: "http://localhost:3000",
|
|
268
268
|
|
|
@@ -1029,25 +1029,6 @@ export default config;
|
|
|
1029
1029
|
- _ملاحظة_: يعتمد هذا الخيار على الإضافات `@intlayer/babel` و `@intlayer/swc`.
|
|
1030
1030
|
- _ملاحظة_: تأكد من إعلان جميع المفاتيح بشكل ثابت في استدعاءات `useIntlayer`، على سبيل المثال `useIntlayer('navbar')`.
|
|
1031
1031
|
|
|
1032
|
-
- **importMode**:
|
|
1033
|
-
- _ملاحظة_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1034
|
-
- _النوع_: `'static' | 'dynamic' | 'fetch'`
|
|
1035
|
-
- _الافتراضي_: `'static'`
|
|
1036
|
-
- _الوصف_: يتحكم في كيفية استيراد القواميس.
|
|
1037
|
-
- _مثال_: `'dynamic'`
|
|
1038
|
-
- _ملاحظة_: الأنماط المتاحة:
|
|
1039
|
-
- "static": يتم استيراد القواميس بشكل ثابت. يستبدل `useIntlayer` بـ `useDictionary`.
|
|
1040
|
-
- "dynamic": يتم استيراد القواميس بشكل ديناميكي باستخدام Suspense. يستبدل `useIntlayer` بـ `useDictionaryDynamic`.
|
|
1041
|
-
- "fetch": يتم جلب القواميس ديناميكيًا باستخدام واجهة برمجة التطبيقات للمزامنة الحية. يستبدل `useIntlayer` بـ `useDictionaryFetch`.
|
|
1042
|
-
- _ملاحظة_: تعتمد الاستيرادات الديناميكية على Suspense وقد تؤثر قليلاً على أداء العرض.
|
|
1043
|
-
- _ملاحظة_: إذا تم تعطيلها، سيتم تحميل جميع اللغات مرة واحدة، حتى لو لم تُستخدم.
|
|
1044
|
-
- _ملاحظة_: تعتمد هذه الخيار على الإضافات `@intlayer/babel` و `@intlayer/swc`.
|
|
1045
|
-
- _ملاحظة_: تأكد من إعلان جميع المفاتيح بشكل ثابت في استدعاءات `useIntlayer`، مثل `useIntlayer('navbar')`.
|
|
1046
|
-
- _ملاحظة_: سيتم تجاهل هذا الخيار إذا تم تعطيل `optimize`.
|
|
1047
|
-
- _ملاحظة_: إذا تم تعيينه إلى "live"، فسيتم تحويل القواميس التي تحتوي على محتوى عن بُعد والمحددة كعلامات "live" فقط إلى وضع البث المباشر. وسيتم استيراد القواميس الأخرى ديناميكيًا كـ "dynamic" لتحسين عدد استعلامات الجلب وأداء التحميل.
|
|
1048
|
-
- _ملاحظة_: سيستخدم وضع البث المباشر واجهة برمجة التطبيقات للمزامنة الحية لجلب القواميس. إذا فشل استدعاء واجهة برمجة التطبيقات، فسيتم استيراد القواميس ديناميكيًا كـ "dynamic".
|
|
1049
|
-
- _ملاحظة_: لن تؤثر هذه الخيار على الدوال `getIntlayer`، `getDictionary`، `useDictionary`، `useDictionaryAsync` و `useDictionaryDynamic`.
|
|
1050
|
-
|
|
1051
1032
|
- **outputFormat**:
|
|
1052
1033
|
- _النوع_: `'esm' | 'cjs'`
|
|
1053
1034
|
- _الافتراضي_: `'esm'`
|
|
@@ -344,8 +344,8 @@ export default class HomeComponent {
|
|
|
344
344
|
|
|
345
345
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
346
346
|
|
|
347
|
-
```
|
|
348
|
-
#
|
|
347
|
+
```bash
|
|
348
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
349
349
|
.intlayer
|
|
350
350
|
```
|
|
351
351
|
|
|
@@ -398,8 +398,8 @@ export class AppComponent {
|
|
|
398
398
|
|
|
399
399
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
400
400
|
|
|
401
|
-
```
|
|
402
|
-
#
|
|
401
|
+
```bash
|
|
402
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
403
403
|
.intlayer
|
|
404
404
|
```
|
|
405
405
|
|
|
@@ -218,8 +218,8 @@ const { title } = getIntlayer('app');
|
|
|
218
218
|
|
|
219
219
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
220
220
|
|
|
221
|
-
```
|
|
222
|
-
#
|
|
221
|
+
```bash
|
|
222
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
223
223
|
.intlayer
|
|
224
224
|
```
|
|
225
225
|
|
|
@@ -501,8 +501,8 @@ export const LocaleSwitcher: FC = () => {
|
|
|
501
501
|
|
|
502
502
|
لتجنب الالتزام بالملفات التي يتم إنشاؤها تلقائيًا بواسطة Intlayer، أضف التالي إلى ملف `.gitignore` الخاص بك:
|
|
503
503
|
|
|
504
|
-
```
|
|
505
|
-
#
|
|
504
|
+
```bash
|
|
505
|
+
# تجاهل الملفات التي يتم إنشاؤها بواسطة Intlayer
|
|
506
506
|
.intlayer
|
|
507
507
|
```
|
|
508
508
|
|
|
@@ -680,18 +680,15 @@ const Page = async () => {
|
|
|
680
680
|
return (
|
|
681
681
|
<IntlayerServerProvider locale={locale}>
|
|
682
682
|
<PageContent />
|
|
683
|
-
```
|
|
684
|
-
|
|
685
683
|
<ServerComponentExample />
|
|
686
684
|
<ClientComponentExample />
|
|
687
685
|
</IntlayerServerProvider>
|
|
688
|
-
|
|
689
|
-
);
|
|
686
|
+
);
|
|
690
687
|
};
|
|
691
688
|
|
|
692
689
|
export default Page;
|
|
693
690
|
|
|
694
|
-
|
|
691
|
+
```
|
|
695
692
|
|
|
696
693
|
```jsx fileName="src/app/page.csx" codeFormat="commonjs"
|
|
697
694
|
import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
|
|
@@ -722,13 +719,13 @@ const Page: NextPage = async () => {
|
|
|
722
719
|
</IntlayerServerProvider>
|
|
723
720
|
);
|
|
724
721
|
};
|
|
722
|
+
```
|
|
725
723
|
|
|
726
724
|
- **`IntlayerClientProvider`** يُستخدم لتوفير الـ locale للمكونات على جانب العميل. يمكن وضعه في أي مكوّن أصل (parent component)، بما في ذلك الـ layout. ومع ذلك، يُنصح بوضعه في الـ layout لأن Next.js يشارك كود الـ layout عبر الصفحات، مما يجعله أكثر كفاءة. باستخدام `IntlayerClientProvider` داخل الـ layout، تتجنّب إعادة تهيئته لكل صفحة، مما يحسّن الأداء ويحافظ على سياق التعريب المتسق في تطبيقك.
|
|
727
725
|
- **`IntlayerServerProvider`** تُستخدم لتزويد العناصر الفرعية التي تعمل على الخادم بالـ locale. لا يمكن تعيينها في الـ layout.
|
|
728
726
|
|
|
729
727
|
> لا يمكن أن يتشارك الـ layout والصفحة نفس سياق الخادم لأن نظام سياق الخادم يعتمد على مخزن بيانات لكل طلب (عبر آلية [React's cache](https://react.dev/reference/react/cache))، مما يجعل كل "context" يُعاد إنشاؤه لأجزاء مختلفة من التطبيق. وضع الـ provider في layout مشترك سيكسر هذا العزل، وسيمنع الانتشار الصحيح لقيم سياق الخادم إلى مكوناتك على الخادم.
|
|
730
728
|
|
|
731
|
-
|
|
732
729
|
```tsx {4,7} fileName="src/components/clientComponentExample/ClientComponentExample.tsx" codeFormat="typescript"
|
|
733
730
|
"use client";
|
|
734
731
|
|
|
@@ -745,7 +742,7 @@ export const ClientComponentExample: FC = () => {
|
|
|
745
742
|
</div>
|
|
746
743
|
);
|
|
747
744
|
};
|
|
748
|
-
|
|
745
|
+
```
|
|
749
746
|
|
|
750
747
|
```jsx {3,6} fileName="src/components/clientComponentExample/ClientComponentExample.mjx" codeFormat="esm"
|
|
751
748
|
"use client";
|
|
@@ -628,8 +628,8 @@ const styles = StyleSheet.create({
|
|
|
628
628
|
|
|
629
629
|
لتجنب الالتزام بالملفات التي تم إنشاؤها تلقائيًا بواسطة Intlayer، أضف ما يلي إلى ملف `.gitignore` الخاص بك:
|
|
630
630
|
|
|
631
|
-
```
|
|
632
|
-
#
|
|
631
|
+
```bash
|
|
632
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
633
633
|
.intlayer
|
|
634
634
|
```
|
|
635
635
|
|
|
@@ -1339,8 +1339,8 @@ return (
|
|
|
1339
1339
|
|
|
1340
1340
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
1341
1341
|
|
|
1342
|
-
```
|
|
1343
|
-
#
|
|
1342
|
+
```bash
|
|
1343
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
1344
1344
|
.intlayer
|
|
1345
1345
|
```
|
|
1346
1346
|
|
|
@@ -556,8 +556,8 @@ const MyComponent = () => {
|
|
|
556
556
|
|
|
557
557
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
558
558
|
|
|
559
|
-
```
|
|
560
|
-
#
|
|
559
|
+
```bash
|
|
560
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
561
561
|
.intlayer
|
|
562
562
|
```
|
|
563
563
|
|
|
@@ -479,8 +479,8 @@ const changeLocale = (event: Event) => {
|
|
|
479
479
|
|
|
480
480
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
481
481
|
|
|
482
|
-
```
|
|
483
|
-
#
|
|
482
|
+
```bash
|
|
483
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
484
484
|
.intlayer
|
|
485
485
|
```
|
|
486
486
|
|
|
@@ -1043,8 +1043,8 @@ const { myMarkdownContent } = useIntlayer("my-component");
|
|
|
1043
1043
|
|
|
1044
1044
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
1045
1045
|
|
|
1046
|
-
```
|
|
1047
|
-
#
|
|
1046
|
+
```bash
|
|
1047
|
+
# تجاهل الملفات التي تم إنشاؤها بواسطة Intlayer
|
|
1048
1048
|
.intlayer
|
|
1049
1049
|
```
|
|
1050
1050
|
|
|
@@ -1065,8 +1065,8 @@ const { myMarkdownContent } = useIntlayer("my-component");
|
|
|
1065
1065
|
|
|
1066
1066
|
للقيام بذلك، يمكنك إضافة التعليمات التالية إلى ملف `.gitignore` الخاص بك:
|
|
1067
1067
|
|
|
1068
|
-
```
|
|
1069
|
-
#
|
|
1068
|
+
```bash
|
|
1069
|
+
# تجاهل الملفات التي يتم إنشاؤها بواسطة Intlayer
|
|
1070
1070
|
.intlayer
|
|
1071
1071
|
```
|
|
1072
1072
|
|
|
@@ -120,7 +120,7 @@ Cmd + Shift + P (macOS) / Ctrl + Shift + P (Windows/Linux)
|
|
|
120
120
|
|
|
121
121
|
#### اختيار البيئة النشطة
|
|
122
122
|
|
|
123
|
-
- **لوحة الأوامر**: افتح اللوحة وقم بتشغيل الأمر `Intlayer: Select Environment`، ثم اختر البيئة (مثلًا، `development`، `staging`، `production`). ستحاول الإضافة تحميل أول ملف متاح في قائمة الأولويات أعلاه وستعرض إشعارًا مثل "تم تحميل البيئة من
|
|
123
|
+
- **لوحة الأوامر**: افتح اللوحة وقم بتشغيل الأمر `Intlayer: Select Environment`، ثم اختر البيئة (مثلًا، `development`، `staging`، `production`). ستحاول الإضافة تحميل أول ملف متاح في قائمة الأولويات أعلاه وستعرض إشعارًا مثل "تم تحميل البيئة من `.env.<env>.local`".
|
|
124
124
|
- **الإعدادات**: اذهب إلى `Settings → Extensions → Intlayer`، وقم بتعيين:
|
|
125
125
|
- **البيئة**: اسم البيئة المستخدمة لحل ملفات `.env.<env>*`.
|
|
126
126
|
- (اختياري) **ملف البيئة**: مسار صريح لملف `.env`. عند توفيره، يكون له الأولوية على القائمة المستنتجة.
|
package/docs/de/configuration.md
CHANGED
|
@@ -282,13 +282,13 @@ const config: IntlayerConfig = {
|
|
|
282
282
|
editor: {
|
|
283
283
|
/**
|
|
284
284
|
* Whether the visual editor is enabled.
|
|
285
|
-
* Default:
|
|
285
|
+
* Default: false
|
|
286
286
|
*/
|
|
287
287
|
enabled: true,
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
290
|
* URL of your application for origin validation.
|
|
291
|
-
* Default: "
|
|
291
|
+
* Default: ""
|
|
292
292
|
*/
|
|
293
293
|
applicationURL: "http://localhost:3000",
|
|
294
294
|
|
|
@@ -1200,25 +1200,6 @@ Die Build-Optionen gelten für die Plugins `@intlayer/babel` und `@intlayer/swc`
|
|
|
1200
1200
|
- _Hinweis_ : Diese Option ist abhängig von den Plugins `@intlayer/babel` und `@intlayer/swc`.
|
|
1201
1201
|
- _Hinweis_ : Stellen Sie sicher, dass alle Schlüssel in `useIntlayer`-Aufrufen statisch deklariert sind. Zum Beispiel `useIntlayer('navbar')`.
|
|
1202
1202
|
|
|
1203
|
-
- **importMode** :
|
|
1204
|
-
- _Typ_ : `'static' | 'dynamic' | 'fetch'`
|
|
1205
|
-
- _Standard_ : `'static'`
|
|
1206
|
-
- _Beschreibung_ : Steuert, wie die Wörterbücher importiert werden.
|
|
1207
|
-
- _Beispiel_ : `'dynamic'`
|
|
1208
|
-
- _Hinweis_ : Verfügbare Modi:
|
|
1209
|
-
- "static": Die Wörterbücher werden statisch importiert. Ersetzt `useIntlayer` durch `useDictionary`.
|
|
1210
|
-
- "dynamic": Die Wörterbücher werden dynamisch mit Suspense importiert. Ersetzt `useIntlayer` durch `useDictionaryDynamic`.
|
|
1211
|
-
- "fetch": Die Wörterbücher werden dynamisch über die Live-Sync-API abgerufen. Ersetzt `useIntlayer` durch `useDictionaryDynamic`.
|
|
1212
|
-
- _Hinweis_ : Dynamische Importe sind von Suspense abhängig und können die Rendering-Performance leicht beeinflussen.
|
|
1213
|
-
- _Hinweis_ : Wenn deaktiviert, werden alle Locales auf einmal geladen, auch wenn sie nicht verwendet werden.
|
|
1214
|
-
- _Hinweis_ : Diese Option ist abhängig von den Plugins `@intlayer/babel` und `@intlayer/swc`.
|
|
1215
|
-
- _Hinweis_ : Stellen Sie sicher, dass alle Schlüssel in `useIntlayer`-Aufrufen statisch deklariert sind. Zum Beispiel `useIntlayer('navbar')`.
|
|
1216
|
-
- _Hinweis_ : Diese Option wird ignoriert, wenn `optimize` deaktiviert ist.
|
|
1217
|
-
- _Hinweis_ : Wenn auf "fetch" gesetzt, werden nur jene Wörterbücher, die Remote-Inhalte enthalten und als "fetch" markiert sind, in den Fetch-Modus transformiert. Die anderen werden weiterhin im Modus "dynamic" dynamisch importiert, um die Anzahl der Fetch-Anfragen und die Lade-Performance zu optimieren.
|
|
1218
|
-
- _Hinweis_ : Der Fetch-Modus verwendet die Live-Sync-API, um die Wörterbücher abzurufen. Wenn der API-Aufruf fehlschlägt, werden die Wörterbücher im Modus "dynamic" dynamisch importiert.
|
|
1219
|
-
- _Hinweis_ : Diese Option hat keinen Einfluss auf die Funktionen `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` und `useDictionaryDynamic`.
|
|
1220
|
-
- _Hinweis_: **Veraltet**: Verwenden Sie stattdessen `dictionary.importMode`.
|
|
1221
|
-
|
|
1222
1203
|
- **checkTypes** :
|
|
1223
1204
|
- _Typ_ : `boolean`
|
|
1224
1205
|
- _Standard_ : `false`
|
|
@@ -342,8 +342,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dies erm
|
|
|
342
342
|
|
|
343
343
|
Dazu können Sie die folgenden Anweisungen zu Ihrer `.gitignore`-Datei hinzufügen:
|
|
344
344
|
|
|
345
|
-
```
|
|
346
|
-
#
|
|
345
|
+
```bash
|
|
346
|
+
# Von Intlayer generierte Dateien ignorieren
|
|
347
347
|
.intlayer
|
|
348
348
|
```
|
|
349
349
|
|
|
@@ -392,8 +392,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dies erm
|
|
|
392
392
|
|
|
393
393
|
Fügen Sie dazu die folgenden Anweisungen zu Ihrer `.gitignore`-Datei hinzu:
|
|
394
394
|
|
|
395
|
-
```
|
|
396
|
-
#
|
|
395
|
+
```bash
|
|
396
|
+
# Die von Intlayer generierten Dateien ignorieren
|
|
397
397
|
.intlayer
|
|
398
398
|
```
|
|
399
399
|
|
|
@@ -218,8 +218,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dadurch v
|
|
|
218
218
|
|
|
219
219
|
Um dies zu tun, können Sie die folgenden Anweisungen zu Ihrer `.gitignore`-Datei hinzufügen:
|
|
220
220
|
|
|
221
|
-
```
|
|
222
|
-
#
|
|
221
|
+
```bash
|
|
222
|
+
# Ignoriere die von Intlayer generierten Dateien
|
|
223
223
|
.intlayer
|
|
224
224
|
```
|
|
225
225
|
|
|
@@ -482,8 +482,8 @@ Dies ermöglicht Funktionen wie:
|
|
|
482
482
|
|
|
483
483
|
Um zu vermeiden, dass automatisch generierte Dateien von Intlayer in das Repository aufgenommen werden, fügen Sie Folgendes zu Ihrer `.gitignore` hinzu:
|
|
484
484
|
|
|
485
|
-
```
|
|
486
|
-
#
|
|
485
|
+
```bash
|
|
486
|
+
# Ignorieren Sie die von Intlayer generierten Dateien
|
|
487
487
|
.intlayer
|
|
488
488
|
```
|
|
489
489
|
|
|
@@ -624,8 +624,8 @@ Dies ermöglicht Funktionen wie:
|
|
|
624
624
|
|
|
625
625
|
Um zu vermeiden, dass automatisch generierte Dateien von Intlayer committet werden, fügen Sie Folgendes zu Ihrer `.gitignore` hinzu:
|
|
626
626
|
|
|
627
|
-
```
|
|
628
|
-
#
|
|
627
|
+
```bash
|
|
628
|
+
# Ignoriere die von Intlayer generierten Dateien
|
|
629
629
|
.intlayer
|
|
630
630
|
```
|
|
631
631
|
|
|
@@ -1335,8 +1335,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dies erm
|
|
|
1335
1335
|
|
|
1336
1336
|
Dazu können Sie die folgenden Anweisungen in Ihre `.gitignore`-Datei einfügen:
|
|
1337
1337
|
|
|
1338
|
-
```
|
|
1339
|
-
#
|
|
1338
|
+
```bash
|
|
1339
|
+
# Ignorieren Sie die von Intlayer generierten Dateien
|
|
1340
1340
|
.intlayer
|
|
1341
1341
|
```
|
|
1342
1342
|
|
|
@@ -557,8 +557,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. So vermei
|
|
|
557
557
|
|
|
558
558
|
Dazu können Sie die folgenden Anweisungen in Ihre `.gitignore`-Datei aufnehmen:
|
|
559
559
|
|
|
560
|
-
```
|
|
561
|
-
#
|
|
560
|
+
```bash
|
|
561
|
+
# Ignoriere die von Intlayer generierten Dateien
|
|
562
562
|
.intlayer
|
|
563
563
|
```
|
|
564
564
|
|
|
@@ -498,8 +498,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dadurch v
|
|
|
498
498
|
|
|
499
499
|
Fügen Sie dazu die folgenden Anweisungen in Ihre `.gitignore`-Datei ein:
|
|
500
500
|
|
|
501
|
-
```
|
|
502
|
-
#
|
|
501
|
+
```bash
|
|
502
|
+
# Ignoriere die von Intlayer generierten Dateien
|
|
503
503
|
.intlayer
|
|
504
504
|
```
|
|
505
505
|
|
|
@@ -1088,8 +1088,8 @@ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. Dadurch v
|
|
|
1088
1088
|
|
|
1089
1089
|
Dazu können Sie die folgenden Anweisungen in Ihre `.gitignore`-Datei aufnehmen:
|
|
1090
1090
|
|
|
1091
|
-
```
|
|
1092
|
-
#
|
|
1091
|
+
```bash
|
|
1092
|
+
# Ignoriere die von Intlayer generierten Dateien
|
|
1093
1093
|
.intlayer
|
|
1094
1094
|
```
|
|
1095
1095
|
|
|
@@ -120,7 +120,7 @@ Die Erweiterung kann Umgebungsvariablen aus Ihrem Arbeitsbereich laden, um Intla
|
|
|
120
120
|
|
|
121
121
|
#### Auswahl der aktiven Umgebung
|
|
122
122
|
|
|
123
|
-
- **Befehls-Palette**: Öffnen Sie die Palette und führen Sie `Intlayer: Select Environment` aus, wählen Sie dann die Umgebung aus (z. B. `development`, `staging`, `production`). Die Erweiterung versucht, die erste verfügbare Datei in der oben genannten Prioritätsliste zu laden und zeigt eine Benachrichtigung wie „Env geladen von
|
|
123
|
+
- **Befehls-Palette**: Öffnen Sie die Palette und führen Sie `Intlayer: Select Environment` aus, wählen Sie dann die Umgebung aus (z. B. `development`, `staging`, `production`). Die Erweiterung versucht, die erste verfügbare Datei in der oben genannten Prioritätsliste zu laden und zeigt eine Benachrichtigung wie „Env geladen von `.env.<env>.local`“ an.
|
|
124
124
|
- **Einstellungen**: Gehen Sie zu `Einstellungen → Erweiterungen → Intlayer` und setzen Sie:
|
|
125
125
|
- **Umgebung**: der Umgebungsname, der zur Auflösung von `.env.<env>*` Dateien verwendet wird.
|
|
126
126
|
- (Optional) **Env-Datei**: ein expliziter Pfad zu einer `.env`-Datei. Wenn angegeben, hat dieser Vorrang vor der ermittelten Liste.
|
package/docs/en/configuration.md
CHANGED
|
@@ -283,13 +283,13 @@ const config: IntlayerConfig = {
|
|
|
283
283
|
editor: {
|
|
284
284
|
/**
|
|
285
285
|
* Whether the visual editor is enabled.
|
|
286
|
-
* Default:
|
|
286
|
+
* Default: false
|
|
287
287
|
*/
|
|
288
288
|
enabled: true,
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* URL of your application for origin validation.
|
|
292
|
-
* Default: "
|
|
292
|
+
* Default: ""
|
|
293
293
|
*/
|
|
294
294
|
applicationURL: "http://localhost:3000",
|
|
295
295
|
|
|
@@ -1209,24 +1209,6 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1209
1209
|
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1210
1210
|
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
1211
1211
|
|
|
1212
|
-
- **importMode**:
|
|
1213
|
-
- _Type_: `'static' | 'dynamic' | 'fetch'`
|
|
1214
|
-
- _Default_: `'static'`
|
|
1215
|
-
- _Description_: Controls how dictionaries are imported.
|
|
1216
|
-
- _Example_: `'dynamic'`
|
|
1217
|
-
- _Note_: Available modes:
|
|
1218
|
-
- "static": Dictionaries are imported statically. Replaces `useIntlayer` with `useDictionary`.
|
|
1219
|
-
- "dynamic": Dictionaries are imported dynamically using Suspense. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
1220
|
-
- "fetch": Dictionaries are fetched dynamically using the live sync API. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
1221
|
-
- _Note_: Dynamic imports rely on Suspense and may slightly impact rendering performance.
|
|
1222
|
-
- _Note_: If disabled all locales will be loaded at once, even if they are not used.
|
|
1223
|
-
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1224
|
-
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
1225
|
-
- _Note_: This option will be ignored if `optimize` is disabled.
|
|
1226
|
-
- _Note_: If set to "fetch", only the dictionaries that are including remote content, and set as "fetch" flags will be transformed as fetch mode. Others will be imported dynamically as "dynamic" mode to optimize the number of fetch queries, and load performance.
|
|
1227
|
-
- _Note_: Fetch mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
|
|
1228
|
-
- _Note_: This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
|
|
1229
|
-
- _Note_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1230
1212
|
- **checkTypes**:
|
|
1231
1213
|
- _Type_: `boolean`
|
|
1232
1214
|
- _Default_: `false`
|
|
@@ -342,7 +342,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
342
342
|
|
|
343
343
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
344
344
|
|
|
345
|
-
```
|
|
345
|
+
```bash
|
|
346
346
|
# Ignore the files generated by Intlayer
|
|
347
347
|
.intlayer
|
|
348
348
|
```
|
|
@@ -398,7 +398,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
398
398
|
|
|
399
399
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
400
400
|
|
|
401
|
-
```
|
|
401
|
+
```bash
|
|
402
402
|
# Ignore the files generated by Intlayer
|
|
403
403
|
.intlayer
|
|
404
404
|
```
|
|
@@ -226,7 +226,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
226
226
|
|
|
227
227
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
228
228
|
|
|
229
|
-
```
|
|
229
|
+
```bash
|
|
230
230
|
# Ignore the files generated by Intlayer
|
|
231
231
|
.intlayer
|
|
232
232
|
```
|
|
@@ -1509,7 +1509,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
1509
1509
|
|
|
1510
1510
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
1511
1511
|
|
|
1512
|
-
```
|
|
1512
|
+
```bash
|
|
1513
1513
|
# Ignore the files generated by Intlayer
|
|
1514
1514
|
.intlayer
|
|
1515
1515
|
```
|
|
@@ -800,7 +800,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
800
800
|
|
|
801
801
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
802
802
|
|
|
803
|
-
```
|
|
803
|
+
```bash
|
|
804
804
|
# Ignore the files generated by Intlayer
|
|
805
805
|
.intlayer
|
|
806
806
|
```
|
|
@@ -669,7 +669,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
669
669
|
|
|
670
670
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
671
671
|
|
|
672
|
-
```
|
|
672
|
+
```bash
|
|
673
673
|
# Ignore the files generated by Intlayer
|
|
674
674
|
.intlayer
|
|
675
675
|
```
|
|
@@ -1142,7 +1142,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
1142
1142
|
|
|
1143
1143
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
1144
1144
|
|
|
1145
|
-
```
|
|
1145
|
+
```bash
|
|
1146
1146
|
# Ignore the files generated by Intlayer
|
|
1147
1147
|
.intlayer
|
|
1148
1148
|
```
|
|
@@ -123,7 +123,7 @@ The extension can load environment variables from your workspace to run Intlayer
|
|
|
123
123
|
|
|
124
124
|
#### Selecting the active environment
|
|
125
125
|
|
|
126
|
-
- **Command Palette**: open the palette and run `Intlayer: Select Environment`, then choose the environment (e.g., `development`, `staging`, `production`). The extension will attempt to load the first available file in the priority list above and show a notification like “Loaded env from
|
|
126
|
+
- **Command Palette**: open the palette and run `Intlayer: Select Environment`, then choose the environment (e.g., `development`, `staging`, `production`). The extension will attempt to load the first available file in the priority list above and show a notification like “Loaded env from `.env.<env>.local`”.
|
|
127
127
|
- **Settings**: go to `Settings → Extensions → Intlayer`, and set:
|
|
128
128
|
- **Environment**: the environment name used to resolve `.env.<env>*` files.
|
|
129
129
|
- (Optional) **Env File**: an explicit path to a `.env` file. When provided, it takes precedence over the inferred list.
|
|
@@ -256,13 +256,13 @@ const config: IntlayerConfig = {
|
|
|
256
256
|
editor: {
|
|
257
257
|
/**
|
|
258
258
|
* Whether the visual editor is enabled.
|
|
259
|
-
* Default:
|
|
259
|
+
* Default: false
|
|
260
260
|
*/
|
|
261
261
|
enabled: true,
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
264
|
* URL of your application for origin validation.
|
|
265
|
-
* Default: "
|
|
265
|
+
* Default: ""
|
|
266
266
|
*/
|
|
267
267
|
applicationURL: "http://localhost:3000",
|
|
268
268
|
|
|
@@ -1033,25 +1033,6 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1033
1033
|
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1034
1034
|
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
1035
1035
|
|
|
1036
|
-
- **importMode**:
|
|
1037
|
-
- _Note_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1038
|
-
- _Type_: `'static' | 'dynamic' | 'fetch'`
|
|
1039
|
-
- _Default_: `'static'`
|
|
1040
|
-
- _Description_: Controls how dictionaries are imported.
|
|
1041
|
-
- _Example_: `'dynamic'`
|
|
1042
|
-
- _Note_: Available modes:
|
|
1043
|
-
- "static": Dictionaries are imported statically. Replaces `useIntlayer` with `useDictionary`.
|
|
1044
|
-
- "dynamic": Dictionaries are imported dynamically using Suspense. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
1045
|
-
- "fetch": Dictionaries are fetched dynamically using the live sync API. Replaces `useIntlayer` with `useDictionaryFetch`.
|
|
1046
|
-
- _Note_: Dynamic imports rely on Suspense and may slightly affect rendering performance.
|
|
1047
|
-
- _Note_: If disabled, all locales will be loaded at once, even if they are not used.
|
|
1048
|
-
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
1049
|
-
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls, e.g. `useIntlayer('navbar')`.
|
|
1050
|
-
- _Note_: This option will be ignored if `optimize` is disabled.
|
|
1051
|
-
- _Note_: If set to "fetch", only the dictionaries that include remote content and are flagged as "live" will be transformed into fetch mode. Others will be imported dynamically as "dynamic" mode to optimise the number of fetch queries and load performance.
|
|
1052
|
-
- _Note_: Fetch mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
|
|
1053
|
-
- _Note_: This option will not affect the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
|
|
1054
|
-
|
|
1055
1036
|
- **outputFormat**:
|
|
1056
1037
|
- _Type_: `'esm' | 'cjs'`
|
|
1057
1038
|
- _Default_: `'esm'`
|
|
@@ -342,7 +342,7 @@ It is recommended to ignore the files generated by Intlayer. This allows you to
|
|
|
342
342
|
|
|
343
343
|
To do this, you can add the following instructions to your `.gitignore` file:
|
|
344
344
|
|
|
345
|
-
```
|
|
345
|
+
```bash
|
|
346
346
|
# Ignore the files generated by Intlayer
|
|
347
347
|
.intlayer
|
|
348
348
|
```
|