@intlayer/docs 7.2.0 → 7.2.3

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.
Files changed (36) hide show
  1. package/docs/ar/intlayer_cli.md +37 -1
  2. package/docs/ar/intlayer_with_svelte_kit.md +11 -2
  3. package/docs/de/intlayer_cli.md +37 -1
  4. package/docs/de/intlayer_with_svelte_kit.md +11 -2
  5. package/docs/en/intlayer_cli.md +41 -1
  6. package/docs/en/intlayer_with_nextjs_16.md +10 -2
  7. package/docs/en/intlayer_with_svelte_kit.md +13 -2
  8. package/docs/en-GB/intlayer_cli.md +37 -1
  9. package/docs/en-GB/intlayer_with_svelte_kit.md +11 -2
  10. package/docs/es/intlayer_cli.md +37 -1
  11. package/docs/es/intlayer_with_svelte_kit.md +11 -2
  12. package/docs/fr/intlayer_cli.md +37 -1
  13. package/docs/fr/intlayer_with_svelte_kit.md +11 -2
  14. package/docs/hi/intlayer_cli.md +37 -1
  15. package/docs/hi/intlayer_with_svelte_kit.md +11 -2
  16. package/docs/id/intlayer_cli.md +37 -1
  17. package/docs/id/intlayer_with_svelte_kit.md +11 -2
  18. package/docs/it/intlayer_cli.md +37 -1
  19. package/docs/it/intlayer_with_svelte_kit.md +11 -2
  20. package/docs/ja/intlayer_cli.md +37 -1
  21. package/docs/ja/intlayer_with_svelte_kit.md +11 -2
  22. package/docs/ko/intlayer_cli.md +37 -1
  23. package/docs/ko/intlayer_with_svelte_kit.md +11 -2
  24. package/docs/pl/intlayer_cli.md +37 -1
  25. package/docs/pl/intlayer_with_svelte_kit.md +11 -2
  26. package/docs/pt/intlayer_cli.md +37 -1
  27. package/docs/pt/intlayer_with_svelte_kit.md +11 -2
  28. package/docs/ru/intlayer_cli.md +37 -1
  29. package/docs/ru/intlayer_with_svelte_kit.md +11 -2
  30. package/docs/tr/intlayer_cli.md +37 -1
  31. package/docs/tr/intlayer_with_svelte_kit.md +11 -2
  32. package/docs/vi/intlayer_cli.md +37 -1
  33. package/docs/vi/intlayer_with_svelte_kit.md +11 -2
  34. package/docs/zh/intlayer_cli.md +37 -1
  35. package/docs/zh/intlayer_with_svelte_kit.md +11 -2
  36. package/package.json +9 -9
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: اكتشف كيفية استخدام واجهة الأوامر الخاصة بـ Intlayer لإدارة موقعك متعدد اللغات. اتبع الخطوات في هذه الوثائق عبر الإنترنت لإعداد مشروعك في دقائق قليلة.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: إضافة أمر transform
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: تحديث توثيق معلمات أوامر CLI
@@ -311,6 +314,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
311
314
 
312
315
  سيقوم هذا الأمر بترجمة المحتوى من الإنجليزية إلى الفرنسية والإسبانية لجميع ملفات إعلان المحتوى في دليل `src/home/` باستخدام نموذج GPT-3.5 Turbo.
313
316
 
317
+ ### تحويل المكونات
318
+
319
+ ```bash
320
+ npx intlayer transform
321
+ ```
322
+
323
+ يقوم هذا الأمر بتحليل ملفات الكود الخاصة بك للمساعدة في ترحيل المكونات الموجودة لاستخدام Intlayer. يدعم اختيار الملفات التفاعلي أو استهداف ملفات محددة.
324
+
325
+ ##### الأسماء المستعارة:
326
+
327
+ - `npx intlayer trans`
328
+
329
+ ##### الوسائط:
330
+
331
+ **خيارات اختيار الملفات:**
332
+
333
+ - **`-f, --file [files...]`**: قائمة بالملفات المحددة للتحويل. إذا لم يتم توفيرها، سيقوم CLI بفحص الملفات المطابقة (`**/*.{tsx,jsx,vue,svelte,ts,js}`) وسيطالبك باختيار الملفات المراد تحويلها.
334
+
335
+ > مثال: `npx intlayer transform -f src/components/MyComponent.tsx`
336
+
337
+ **خيارات الإخراج:**
338
+
339
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: الدليل لحفظ ملفات إعلان المحتوى المُنشأة.
340
+
341
+ > مثال: `npx intlayer transform -o src/content`
342
+
343
+ **خيارات التكوين:**
344
+
345
+ - **`--base-dir`**: تحديد الدليل الأساسي للمشروع.
346
+ - **`--env`**: تحديد البيئة.
347
+ - **`--env-file`**: توفير ملف بيئة مخصص.
348
+ - **`--verbose`**: تفعيل التسجيل المفصل.
349
+
314
350
  ### إدارة التكوين
315
351
 
316
352
  #### الحصول على التكوين
@@ -42,6 +42,14 @@ history:
42
42
 
43
43
  ## دليل خطوة بخطوة لإعداد Intlayer في تطبيق SvelteKit
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  للبدء، أنشئ مشروع SvelteKit جديد. إليك الهيكل النهائي الذي سننشئه:
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // تهيئة Intlayer باستخدام اللغة من المسار
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // استخدام قاموس محتوى التخطيط
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Entdecken Sie, wie Sie die Intlayer CLI verwenden, um Ihre mehrsprachige Website zu verwalten. Folgen Sie den Schritten in dieser Online-Dokumentation, um Ihr Projekt in wenigen Minuten einzurichten.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: Transform-Befehl hinzufügen
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Aktualisierung der Dokumentation zu CLI-Befehlsparametern
@@ -312,6 +315,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
312
315
 
313
316
  Dieser Befehl übersetzt Inhalte von Englisch ins Französische und Spanische für alle Inhaltsdeklarationsdateien im Verzeichnis `src/home/` unter Verwendung des GPT-3.5 Turbo Modells.
314
317
 
318
+ ### Komponenten transformieren
319
+
320
+ ```bash
321
+ npx intlayer transform
322
+ ```
323
+
324
+ Dieser Befehl analysiert Ihre Codedateien, um bei der Migration bestehender Komponenten zur Verwendung von Intlayer zu helfen. Er unterstützt interaktive Dateiauswahl oder das Anvisieren spezifischer Dateien.
325
+
326
+ ##### Aliase:
327
+
328
+ - `npx intlayer trans`
329
+
330
+ ##### Argumente:
331
+
332
+ **Dateiauswahl-Optionen:**
333
+
334
+ - **`-f, --file [files...]`**: Liste spezifischer Dateien, die transformiert werden sollen. Wenn nicht angegeben, scannt die CLI nach passenden Dateien (`**/*.{tsx,jsx,vue,svelte,ts,js}`) und fordert Sie auf, auszuwählen, welche transformiert werden sollen.
335
+
336
+ > Beispiel: `npx intlayer transform -f src/components/MyComponent.tsx`
337
+
338
+ **Ausgabeoptionen:**
339
+
340
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Verzeichnis zum Speichern der generierten Content-Deklarationsdateien.
341
+
342
+ > Beispiel: `npx intlayer transform -o src/content`
343
+
344
+ **Konfigurationsoptionen:**
345
+
346
+ - **`--base-dir`**: Geben Sie das Basisverzeichnis für das Projekt an.
347
+ - **`--env`**: Geben Sie die Umgebung an.
348
+ - **`--env-file`**: Geben Sie eine benutzerdefinierte Umgebungsdatei an.
349
+ - **`--verbose`**: Aktivieren Sie ausführliche Protokollierung.
350
+
315
351
  ### Konfiguration verwalten
316
352
 
317
353
  #### Konfiguration abrufen
@@ -42,6 +42,14 @@ Mit Intlayer können Sie:
42
42
 
43
43
  ## Schritt-für-Schritt-Anleitung zur Einrichtung von Intlayer in einer SvelteKit-Anwendung
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  Um zu beginnen, erstellen Sie ein neues SvelteKit-Projekt. Hier ist die finale Struktur, die wir erstellen werden:
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // Initialisiere Intlayer mit der Locale aus der Route
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Verwende das Layout-Inhaltsverzeichnis
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-01-27
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: Add transform command
20
23
  - version: 7.1.0
21
24
  date: 2025-11-05
22
25
  changes: Add skipIfExists option to translate command
@@ -429,6 +432,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
429
432
 
430
433
  This command will translate content from English to French and Spanish for all content declaration files in the `src/home/` directory using the GPT-3.5 Turbo model.
431
434
 
435
+ ### Transform components
436
+
437
+ ```bash
438
+ npx intlayer transform
439
+ ```
440
+
441
+ This command analyzes your code files to help migrate existing components to use Intlayer. It supports interactive file selection or specific file targeting.
442
+
443
+ ##### Aliases:
444
+
445
+ - `npx intlayer trans`
446
+
447
+ ##### Arguments:
448
+
449
+ **File selection options:**
450
+
451
+ - **`-f, --file [files...]`**: List of specific files to transform. If not provided, the CLI will scan for matching files (`**/*.{tsx,jsx,vue,svelte,ts,js}`) and prompt you to select which ones to transform.
452
+
453
+ > Example: `npx intlayer transform -f src/components/MyComponent.tsx`
454
+
455
+ **Output options:**
456
+
457
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Directory to save the generated content declaration files.
458
+
459
+ > Example: `npx intlayer transform -o src/content`
460
+
461
+ **Configuration options:**
462
+
463
+ - **`--base-dir`**: Specify the base directory for the project.
464
+ - **`--env`**: Specify the environment.
465
+ - **`--env-file`**: Provide a custom environment file.
466
+ - **`--verbose`**: Enable verbose logging.
467
+
432
468
  ### Test missing translations
433
469
 
434
470
  ```bash
@@ -730,6 +766,7 @@ If you activated one of the git options, the command will only review the part o
730
766
  "intlayer:fill": "npx intlayer fill",
731
767
  "intlayer:list": "npx intlayer content list",
732
768
  "intlayer:test": "npx intlayer content test",
769
+ "intlayer:transform": "npx intlayer transform",
733
770
  "intlayer:doc:translate": "npx intlayer doc translate",
734
771
  "intlayer:doc:review": "npx intlayer doc review"
735
772
  }
@@ -806,6 +843,7 @@ import {
806
843
  testMissingTranslations,
807
844
  docTranslate,
808
845
  docReview,
846
+ transform,
809
847
  } from "@intlayer/cli";
810
848
 
811
849
  push();
@@ -824,6 +862,8 @@ docTranslate();
824
862
  // ...
825
863
  docReview();
826
864
  // ...
865
+ transform();
866
+ // ...
827
867
  ```
828
868
 
829
869
  ## Debug intlayer command
@@ -197,7 +197,7 @@ module.exports = withIntlayer(nextConfig);
197
197
 
198
198
  > The `withIntlayer()` function is a promise function. It allows to prepare the intlayer dictionaries before the build starts. If you want to use it with other plugins, you can await it. Example:
199
199
  >
200
- > ```tsx
200
+ > ```ts
201
201
  > const nextConfig = await withIntlayer(nextConfig);
202
202
  > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
203
203
  >
@@ -206,13 +206,21 @@ module.exports = withIntlayer(nextConfig);
206
206
  >
207
207
  > If you want to use it synchronously, you can use the `withIntlayerSync()` function. Example:
208
208
  >
209
- > ```tsx
209
+ > ```ts
210
210
  > const nextConfig = withIntlayerSync(nextConfig);
211
211
  > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
212
212
  >
213
213
  > export default nextConfigWithOtherPlugins;
214
214
  > ```
215
215
 
216
+ > Intlayer automatically detects whether your project is using **webpack** or **Turbopack** based on the command-line flags `--webpack`, `--turbo`, or `--turbopack`, as well as your current **Next.js version**.
217
+ >
218
+ > Since `next>=16`, if you are using **Rspack**, you must explicitly force Intlayer to use the webpack configuration by disabling Turbopack:
219
+ >
220
+ > ```ts
221
+ > withRspack(withIntlayer(nextConfig, { enableTurbopack: false }));
222
+ > ```
223
+
216
224
  ### Step 4: Define Dynamic Locale Routes
217
225
 
218
226
  Remove everything from `RootLayout` and replace it with the following code:
@@ -42,6 +42,16 @@ With Intlayer, you can:
42
42
 
43
43
  ## Step-by-Step Guide to Set Up Intlayer in a SvelteKit Application
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
53
+ See [Application Template](https://github.com/aymericzip/intlayer-sveltekit-template) on GitHub.
54
+
45
55
  To get started, create a new SvelteKit project. Here is the final structure that we will make:
46
56
 
47
57
  ```bash
@@ -377,8 +387,9 @@ export const load: Load = ({ params }) => {
377
387
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
378
388
 
379
389
  // Initialize Intlayer with the locale from the route
380
- setupIntlayer(data.locale);
381
-
390
+ $effect(() => {
391
+ setupIntlayer(data.locale);
392
+ });
382
393
  // Use the layout content dictionary
383
394
  const layoutContent = useIntlayer('layout');
384
395
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: Add transform command
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Update CLI command parameters documentation
@@ -312,6 +315,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
312
315
 
313
316
  This command will translate content from English to French and Spanish for all content declaration files in the `src/home/` directory using the GPT-3.5 Turbo model.
314
317
 
318
+ ### Transform components
319
+
320
+ ```bash
321
+ npx intlayer transform
322
+ ```
323
+
324
+ This command analyses your code files to help migrate existing components to use Intlayer. It supports interactive file selection or specific file targeting.
325
+
326
+ ##### Aliases:
327
+
328
+ - `npx intlayer trans`
329
+
330
+ ##### Arguments:
331
+
332
+ **File selection options:**
333
+
334
+ - **`-f, --file [files...]`**: List of specific files to transform. If not provided, the CLI will scan for matching files (`**/*.{tsx,jsx,vue,svelte,ts,js}`) and prompt you to select which ones to transform.
335
+
336
+ > Example: `npx intlayer transform -f src/components/MyComponent.tsx`
337
+
338
+ **Output options:**
339
+
340
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Directory to save the generated content declaration files.
341
+
342
+ > Example: `npx intlayer transform -o src/content`
343
+
344
+ **Configuration options:**
345
+
346
+ - **`--base-dir`**: Specify the base directory for the project.
347
+ - **`--env`**: Specify the environment.
348
+ - **`--env-file`**: Provide a custom environment file.
349
+ - **`--verbose`**: Enable verbose logging.
350
+
315
351
  ### Manage Configuration
316
352
 
317
353
  #### Get Configuration
@@ -42,6 +42,14 @@ With Intlayer, you can:
42
42
 
43
43
  ## Step-by-Step Guide to Set Up Intlayer in a SvelteKit Application
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  To get started, create a new SvelteKit project. Here is the final structure that we will make:
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // Initialise Intlayer with the locale from the route
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Use the layout content dictionary
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Descubre cómo usar el CLI de Intlayer para gestionar tu sitio web multilingüe. Sigue los pasos en esta documentación en línea para configurar tu proyecto en pocos minutos.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: Agregar comando transform
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Actualización de la documentación de parámetros de comandos CLI
@@ -311,6 +314,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
311
314
 
312
315
  Este comando traducirá el contenido del inglés al francés y español para todos los archivos de declaración de contenido en el directorio `src/home/` usando el modelo GPT-3.5 Turbo.
313
316
 
317
+ ### Transformar componentes
318
+
319
+ ```bash
320
+ npx intlayer transform
321
+ ```
322
+
323
+ Este comando analiza tus archivos de código para ayudar a migrar componentes existentes para usar Intlayer. Admite selección interactiva de archivos o apuntar a archivos específicos.
324
+
325
+ ##### Alias:
326
+
327
+ - `npx intlayer trans`
328
+
329
+ ##### Argumentos:
330
+
331
+ **Opciones de selección de archivos:**
332
+
333
+ - **`-f, --file [files...]`**: Lista de archivos específicos a transformar. Si no se proporciona, el CLI escaneará archivos coincidentes (`**/*.{tsx,jsx,vue,svelte,ts,js}`) y te pedirá que selecciones cuáles transformar.
334
+
335
+ > Ejemplo: `npx intlayer transform -f src/components/MyComponent.tsx`
336
+
337
+ **Opciones de salida:**
338
+
339
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Directorio para guardar los archivos de declaración de contenido generados.
340
+
341
+ > Ejemplo: `npx intlayer transform -o src/content`
342
+
343
+ **Opciones de configuración:**
344
+
345
+ - **`--base-dir`**: Especificar el directorio base para el proyecto.
346
+ - **`--env`**: Especificar el entorno.
347
+ - **`--env-file`**: Proporcionar un archivo de entorno personalizado.
348
+ - **`--verbose`**: Habilitar el registro detallado.
349
+
314
350
  ### Gestionar Configuración
315
351
 
316
352
  #### Obtener Configuración
@@ -42,6 +42,14 @@ Con Intlayer, puedes:
42
42
 
43
43
  ## Guía paso a paso para configurar Intlayer en una aplicación SvelteKit
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  Para comenzar, crea un nuevo proyecto SvelteKit. Aquí está la estructura final que crearemos:
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // Inicializar Intlayer con la locale de la ruta
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Usar el diccionario de contenido del layout
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Découvrez comment utiliser le CLI Intlayer pour gérer votre site web multilingue. Suivez les étapes de cette documentation en ligne pour configurer votre projet en quelques minutes.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: Ajouter la commande transform
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Mise à jour de la documentation des paramètres des commandes CLI
@@ -311,6 +314,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
311
314
 
312
315
  Cette commande traduira le contenu de l'anglais vers le français et l'espagnol pour tous les fichiers de déclaration de contenu dans le répertoire `src/home/` en utilisant le modèle GPT-3.5 Turbo.
313
316
 
317
+ ### Transformer les composants
318
+
319
+ ```bash
320
+ npx intlayer transform
321
+ ```
322
+
323
+ Cette commande analyse vos fichiers de code pour aider à migrer les composants existants vers l'utilisation d'Intlayer. Elle prend en charge la sélection interactive de fichiers ou le ciblage de fichiers spécifiques.
324
+
325
+ ##### Alias :
326
+
327
+ - `npx intlayer trans`
328
+
329
+ ##### Arguments :
330
+
331
+ **Options de sélection de fichiers :**
332
+
333
+ - **`-f, --file [files...]`** : Liste de fichiers spécifiques à transformer. Si non fourni, le CLI scannera les fichiers correspondants (`**/*.{tsx,jsx,vue,svelte,ts,js}`) et vous invitera à sélectionner ceux à transformer.
334
+
335
+ > Exemple : `npx intlayer transform -f src/components/MyComponent.tsx`
336
+
337
+ **Options de sortie :**
338
+
339
+ - **`-o, --output-content-declarations [outputContentDeclarations]`** : Répertoire pour enregistrer les fichiers de déclaration de contenu générés.
340
+
341
+ > Exemple : `npx intlayer transform -o src/content`
342
+
343
+ **Options de configuration :**
344
+
345
+ - **`--base-dir`** : Spécifier le répertoire de base pour le projet.
346
+ - **`--env`** : Spécifier l'environnement.
347
+ - **`--env-file`** : Fournir un fichier d'environnement personnalisé.
348
+ - **`--verbose`** : Activer la journalisation détaillée.
349
+
314
350
  ### Gérer la configuration
315
351
 
316
352
  #### Obtenir la configuration
@@ -42,6 +42,14 @@ Avec Intlayer, vous pouvez :
42
42
 
43
43
  ## Guide étape par étape pour configurer Intlayer dans une application SvelteKit
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  Pour commencer, créez un nouveau projet SvelteKit. Voici la structure finale que nous allons réaliser :
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // Initialiser Intlayer avec la locale provenant de la route
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Utiliser le dictionnaire de contenu du layout
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-07-11
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Intlayer CLI का उपयोग करके अपनी बहुभाषी वेबसाइट का प्रबंधन कैसे करें यह जानें। इस ऑनलाइन दस्तावेज़ में दिए गए चरणों का पालन करके कुछ ही मिनटों में अपना प्रोजेक्ट सेटअप करें।
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.2.3
21
+ date: 2025-11-22
22
+ changes: transform कमांड जोड़ें
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: CLI कमांड पैरामीटर दस्तावेज़ीकरण अपडेट करें
@@ -313,6 +316,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
313
316
 
314
317
  यह कमांड `src/home/` निर्देशिका में सभी कंटेंट घोषणा फ़ाइलों के लिए अंग्रेज़ी से फ्रेंच और स्पेनिश में सामग्री का अनुवाद GPT-3.5 टर्बो मॉडल का उपयोग करके करेगा।
315
318
 
319
+ ### घटकों को रूपांतरित करें
320
+
321
+ ```bash
322
+ npx intlayer transform
323
+ ```
324
+
325
+ यह कमांड मौजूदा घटकों को Intlayer का उपयोग करने के लिए माइग्रेट करने में मदद करने के लिए आपकी कोड फ़ाइलों का विश्लेषण करता है। यह इंटरैक्टिव फ़ाइल चयन या विशिष्ट फ़ाइल लक्ष्यीकरण का समर्थन करता है।
326
+
327
+ ##### उपनाम:
328
+
329
+ - `npx intlayer trans`
330
+
331
+ ##### तर्क:
332
+
333
+ **फ़ाइल चयन विकल्प:**
334
+
335
+ - **`-f, --file [files...]`**: रूपांतरित करने के लिए विशिष्ट फ़ाइलों की सूची। यदि प्रदान नहीं की गई है, तो CLI मिलान करने वाली फ़ाइलों (`**/*.{tsx,jsx,vue,svelte,ts,js}`) को स्कैन करेगा और आपसे चुनने के लिए कहेगा कि कौन सी रूपांतरित करनी है।
336
+
337
+ > उदाहरण: `npx intlayer transform -f src/components/MyComponent.tsx`
338
+
339
+ **आउटपुट विकल्प:**
340
+
341
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: उत्पन्न कंटेंट घोषणा फ़ाइलों को सहेजने के लिए निर्देशिका।
342
+
343
+ > उदाहरण: `npx intlayer transform -o src/content`
344
+
345
+ **कॉन्फ़िगरेशन विकल्प:**
346
+
347
+ - **`--base-dir`**: प्रोजेक्ट के लिए आधार निर्देशिका निर्दिष्ट करें।
348
+ - **`--env`**: पर्यावरण निर्दिष्ट करें।
349
+ - **`--env-file`**: एक कस्टम पर्यावरण फ़ाइल प्रदान करें।
350
+ - **`--verbose`**: विस्तृत लॉगिंग सक्षम करें।
351
+
316
352
  ### कॉन्फ़िगरेशन प्रबंधित करें
317
353
 
318
354
  #### कॉन्फ़िगरेशन प्राप्त करें
@@ -42,6 +42,14 @@ Intlayer के साथ, आप कर सकते हैं:
42
42
 
43
43
  ## SvelteKit एप्लिकेशन में Intlayer सेटअप करने के लिए चरण-दर-चरण मार्गदर्शिका
44
44
 
45
+ <iframe
46
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
47
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
48
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
49
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
50
+ loading="lazy"
51
+ />
52
+
45
53
  शुरू करने के लिए, एक नया SvelteKit प्रोजेक्ट बनाएं। यहाँ अंतिम संरचना है जिसे हम बनाएंगे:
46
54
 
47
55
  ```bash
@@ -547,8 +555,9 @@ export const load: Load = ({ params }) => {
547
555
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
548
556
 
549
557
  // रूट से locale के साथ Intlayer को इनिशियलाइज़ करें
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // लेआउट सामग्री शब्दकोश का उपयोग करें
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>