@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-01-27
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Temukan cara menggunakan Intlayer CLI untuk mengelola situs web multibahasa Anda. Ikuti langkah-langkah dalam dokumentasi daring ini untuk mengatur proyek Anda dalam beberapa menit.
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: Tambahkan perintah transform
20
23
  - version: 6.1.4
21
24
  date: 2025-01-27
22
25
  changes: Menambahkan alias untuk argumen dan perintah CLI
@@ -426,6 +429,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
426
429
 
427
430
  Perintah ini akan menerjemahkan konten dari bahasa Inggris ke bahasa Perancis dan Spanyol untuk semua file deklarasi konten di direktori `src/home/` menggunakan model GPT-3.5 Turbo.
428
431
 
432
+ ### Transformasi komponen
433
+
434
+ ```bash
435
+ npx intlayer transform
436
+ ```
437
+
438
+ Perintah ini menganalisis file kode Anda untuk membantu memigrasikan komponen yang ada untuk menggunakan Intlayer. Ini mendukung pemilihan file interaktif atau menargetkan file tertentu.
439
+
440
+ ##### Alias:
441
+
442
+ - `npx intlayer trans`
443
+
444
+ ##### Argumen:
445
+
446
+ **Opsi pemilihan file:**
447
+
448
+ - **`-f, --file [files...]`**: Daftar file tertentu untuk ditransformasi. Jika tidak disediakan, CLI akan memindai file yang cocok (`**/*.{tsx,jsx,vue,svelte,ts,js}`) dan meminta Anda untuk memilih mana yang akan ditransformasi.
449
+
450
+ > Contoh: `npx intlayer transform -f src/components/MyComponent.tsx`
451
+
452
+ **Opsi output:**
453
+
454
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Direktori untuk menyimpan file deklarasi konten yang dihasilkan.
455
+
456
+ > Contoh: `npx intlayer transform -o src/content`
457
+
458
+ **Opsi konfigurasi:**
459
+
460
+ - **`--base-dir`**: Tentukan direktori dasar untuk proyek.
461
+ - **`--env`**: Tentukan lingkungan.
462
+ - **`--env-file`**: Berikan file lingkungan khusus.
463
+ - **`--verbose`**: Aktifkan logging verbose.
464
+
429
465
  ### Uji terjemahan yang hilang
430
466
 
431
467
  ```bash
@@ -42,6 +42,14 @@ Dengan Intlayer, Anda dapat:
42
42
 
43
43
  ## Panduan Langkah demi Langkah untuk Mengatur Intlayer dalam Aplikasi 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
  Untuk memulai, buat proyek SvelteKit baru. Berikut adalah struktur akhir yang akan kita buat:
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
  // Inisialisasi Intlayer dengan locale dari route
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Gunakan kamus konten 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: Scopri come utilizzare la CLI di Intlayer per gestire il tuo sito web multilingue. Segui i passaggi in questa documentazione online per configurare il tuo progetto in pochi minuti.
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: Aggiungere comando transform
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Aggiornamento della documentazione dei parametri dei comandi CLI
@@ -307,6 +310,39 @@ Questo comando analizza i tuoi file di dichiarazione dei contenuti per individua
307
310
 
308
311
  Questo comando tradurrà il contenuto dall'inglese al francese e allo spagnolo per tutti i file di dichiarazione del contenuto nella directory `src/home/` utilizzando il modello GPT-3.5 Turbo.
309
312
 
313
+ ### Trasformare i componenti
314
+
315
+ ```bash
316
+ npx intlayer transform
317
+ ```
318
+
319
+ Questo comando analizza i tuoi file di codice per aiutare a migrare i componenti esistenti per utilizzare Intlayer. Supporta la selezione interattiva dei file o il targeting di file specifici.
320
+
321
+ ##### Alias:
322
+
323
+ - `npx intlayer trans`
324
+
325
+ ##### Argomenti:
326
+
327
+ **Opzioni di selezione file:**
328
+
329
+ - **`-f, --file [files...]`**: Elenco di file specifici da trasformare. Se non fornito, la CLI scannerà i file corrispondenti (`**/*.{tsx,jsx,vue,svelte,ts,js}`) e ti chiederà di selezionare quali trasformare.
330
+
331
+ > Esempio: `npx intlayer transform -f src/components/MyComponent.tsx`
332
+
333
+ **Opzioni di output:**
334
+
335
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Directory per salvare i file di dichiarazione del contenuto generati.
336
+
337
+ > Esempio: `npx intlayer transform -o src/content`
338
+
339
+ **Opzioni di configurazione:**
340
+
341
+ - **`--base-dir`**: Specificare la directory base per il progetto.
342
+ - **`--env`**: Specificare l'ambiente.
343
+ - **`--env-file`**: Fornire un file di ambiente personalizzato.
344
+ - **`--verbose`**: Abilitare la registrazione dettagliata.
345
+
310
346
  ### Gestire la Configurazione
311
347
 
312
348
  #### Ottenere la Configurazione
@@ -42,6 +42,14 @@ Con Intlayer, puoi:
42
42
 
43
43
  ## Guida passo-passo per configurare Intlayer in un'applicazione 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
  Per iniziare, crea un nuovo progetto SvelteKit. Ecco la struttura finale che realizzeremo:
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
  // Inizializza Intlayer con la locale dalla route
550
- setupIntlayer(data.locale);
551
-
558
+ $effect(() => {
559
+ setupIntlayer(data.locale);
560
+ });
552
561
  // Usa il dizionario dei contenuti 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: 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 Turboモデルを使用して英語からフランス語およびスペイン語への翻訳を行います。
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
  #### 設定の取得
@@ -44,6 +44,14 @@ Intlayerを使うことで、以下が可能になります:
44
44
 
45
45
  まずは新しいSvelteKitプロジェクトを作成しましょう。以下は最終的に作成する構成です:
46
46
 
47
+ <iframe
48
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
49
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
50
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
51
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
52
+ loading="lazy"
53
+ />
54
+
47
55
  ```bash
48
56
  .
49
57
  ├── intlayer.config.ts
@@ -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: 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 명령어 매개변수 문서 업데이트
@@ -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 @@ 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
  // 경로에서 로케일로 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-01-27
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Odkryj, jak używać Intlayer CLI do zarządzania swoją wielojęzyczną stroną internetową. Postępuj zgodnie z krokami w tej dokumentacji online, aby skonfigurować swój projekt w kilka minut.
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: Dodaj polecenie transform
20
23
  - version: 7.1.0
21
24
  date: 2025-11-05
22
25
  changes: Dodano opcję skipIfExists do polecenia translate
@@ -429,6 +432,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
429
432
 
430
433
  To polecenie przetłumaczy zawartość z angielskiego na francuski i hiszpański dla wszystkich plików deklaracji zawartości w katalogu `src/home/` używając modelu GPT-3.5 Turbo.
431
434
 
435
+ ### Przekształć komponenty
436
+
437
+ ```bash
438
+ npx intlayer transform
439
+ ```
440
+
441
+ To polecenie analizuje pliki kodu, aby pomóc w migracji istniejących komponentów do używania Intlayer. Obsługuje interaktywny wybór plików lub wskazywanie konkretnych plików.
442
+
443
+ ##### Aliasy:
444
+
445
+ - `npx intlayer trans`
446
+
447
+ ##### Argumenty:
448
+
449
+ **Opcje wyboru plików:**
450
+
451
+ - **`-f, --file [files...]`**: Lista konkretnych plików do przekształcenia. Jeśli nie podano, CLI przeskanuje pasujące pliki (`**/*.{tsx,jsx,vue,svelte,ts,js}`) i poprosi o wybór, które przekształcić.
452
+
453
+ > Przykład: `npx intlayer transform -f src/components/MyComponent.tsx`
454
+
455
+ **Opcje wyjścia:**
456
+
457
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Katalog do zapisania wygenerowanych plików deklaracji zawartości.
458
+
459
+ > Przykład: `npx intlayer transform -o src/content`
460
+
461
+ **Opcje konfiguracji:**
462
+
463
+ - **`--base-dir`**: Określ katalog bazowy projektu.
464
+ - **`--env`**: Określ środowisko.
465
+ - **`--env-file`**: Podaj niestandardowy plik środowiskowy.
466
+ - **`--verbose`**: Włącz szczegółowe logowanie.
467
+
432
468
  ### Testuj brakujące tłumaczenia
433
469
 
434
470
  ```bash
@@ -42,6 +42,14 @@ Dzięki Intlayer możesz:
42
42
 
43
43
  ## Przewodnik krok po kroku: konfiguracja Intlayer w aplikacji 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
  Aby rozpocząć, utwórz nowy projekt SvelteKit. Oto końcowa struktura, którą stworzymy:
46
54
 
47
55
  ```bash
@@ -549,8 +557,9 @@ export const load: Load = ({ params }) => {
549
557
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
550
558
 
551
559
  // Inicjalizuj Intlayer z lokalizacją z trasy
552
- setupIntlayer(data.locale);
553
-
560
+ $effect(() => {
561
+ setupIntlayer(data.locale);
562
+ });
554
563
  // Użyj słownika zawartości layoutu
555
564
  const layoutContent = useIntlayer('layout');
556
565
  </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: Descubra como usar o Intlayer CLI para gerenciar seu site multilíngue. Siga os passos nesta documentação online para configurar seu projeto em poucos 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: Adicionar comando transform
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: Atualização da documentação dos parâmetros dos comandos CLI
@@ -312,6 +315,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
312
315
 
313
316
  Este comando irá traduzir o conteúdo do inglês para francês e espanhol para todos os arquivos de declaração de conteúdo no diretório `src/home/` usando o modelo GPT-3.5 Turbo.
314
317
 
318
+ ### Transformar componentes
319
+
320
+ ```bash
321
+ npx intlayer transform
322
+ ```
323
+
324
+ Este comando analisa seus arquivos de código para ajudar a migrar componentes existentes para usar Intlayer. Ele suporta seleção interativa de arquivos ou direcionamento de arquivos específicos.
325
+
326
+ ##### Alias:
327
+
328
+ - `npx intlayer trans`
329
+
330
+ ##### Argumentos:
331
+
332
+ **Opções de seleção de arquivos:**
333
+
334
+ - **`-f, --file [files...]`**: Lista de arquivos específicos para transformar. Se não fornecido, o CLI irá escanear arquivos correspondentes (`**/*.{tsx,jsx,vue,svelte,ts,js}`) e solicitar que você selecione quais transformar.
335
+
336
+ > Exemplo: `npx intlayer transform -f src/components/MyComponent.tsx`
337
+
338
+ **Opções de saída:**
339
+
340
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Diretório para salvar os arquivos de declaração de conteúdo gerados.
341
+
342
+ > Exemplo: `npx intlayer transform -o src/content`
343
+
344
+ **Opções de configuração:**
345
+
346
+ - **`--base-dir`**: Especificar o diretório base para o projeto.
347
+ - **`--env`**: Especificar o ambiente.
348
+ - **`--env-file`**: Fornecer um arquivo de ambiente personalizado.
349
+ - **`--verbose`**: Habilitar registro detalhado.
350
+
315
351
  ### Gerenciar Configuração
316
352
 
317
353
  #### Obter Configuração
@@ -44,6 +44,14 @@ Com o Intlayer, você pode:
44
44
 
45
45
  Para começar, crie um novo projeto SvelteKit. Aqui está a estrutura final que iremos criar:
46
46
 
47
+ <iframe
48
+ src="https://stackblitz.com/github/aymericzip/intlayer-sveltekit-template?embed=1&ctl=1&file=intlayer.config.ts"
49
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
50
+ title="Demo CodeSandbox - Cách quốc tế hóa ứng dụng của bạn bằng Intlayer"
51
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
52
+ loading="lazy"
53
+ />
54
+
47
55
  ```bash
48
56
  .
49
57
  ├── intlayer.config.ts
@@ -549,8 +557,9 @@ export const load: Load = ({ params }) => {
549
557
  let { children, data }: { children: Snippet, data: LayoutData } = $props();
550
558
 
551
559
  // Inicializar o Intlayer com a locale da rota
552
- setupIntlayer(data.locale);
553
-
560
+ $effect(() => {
561
+ setupIntlayer(data.locale);
562
+ });
554
563
  // Usar o dicionário de conteúdo do layout
555
564
  const layoutContent = useIntlayer('layout');
556
565
  </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: Узнайте, как использовать 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: 7.1.0
21
24
  date: 2025-11-05
22
25
  changes: Добавлена опция skipIfExists для команды translate
@@ -429,6 +432,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
429
432
 
430
433
  Эта команда переведёт содержимое с английского на французский и испанский для всех файлов декларации контента в директории `src/home/`, используя модель GPT-3.5 Turbo.
431
434
 
435
+ ### Преобразование компонентов
436
+
437
+ ```bash
438
+ npx intlayer transform
439
+ ```
440
+
441
+ Эта команда анализирует ваши файлы кода, чтобы помочь мигрировать существующие компоненты для использования Intlayer. Она поддерживает интерактивный выбор файлов или указание конкретных файлов.
442
+
443
+ ##### Псевдонимы:
444
+
445
+ - `npx intlayer trans`
446
+
447
+ ##### Аргументы:
448
+
449
+ **Опции выбора файлов:**
450
+
451
+ - **`-f, --file [files...]`**: Список конкретных файлов для преобразования. Если не указано, CLI просканирует соответствующие файлы (`**/*.{tsx,jsx,vue,svelte,ts,js}`) и предложит выбрать, какие из них преобразовать.
452
+
453
+ > Пример: `npx intlayer transform -f src/components/MyComponent.tsx`
454
+
455
+ **Опции вывода:**
456
+
457
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Директория для сохранения сгенерированных файлов декларации контента.
458
+
459
+ > Пример: `npx intlayer transform -o src/content`
460
+
461
+ **Опции конфигурации:**
462
+
463
+ - **`--base-dir`**: Указать базовую директорию для проекта.
464
+ - **`--env`**: Указать окружение.
465
+ - **`--env-file`**: Предоставить пользовательский файл окружения.
466
+ - **`--verbose`**: Включить подробное логирование.
467
+
432
468
  ### Тест отсутствующих переводов
433
469
 
434
470
  ```bash
@@ -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
  // Использование словаря контента для layout
553
562
  const layoutContent = useIntlayer('layout');
554
563
  </script>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-09-07
3
- updatedAt: 2025-09-07
3
+ updatedAt: 2025-11-22
4
4
  title: CLI
5
5
  description: Çok dilli web sitenizi yönetmek için Intlayer CLI'yi nasıl kullanacağınızı keşfedin. Bu çevrimiçi dokümantasyondaki adımları takip ederek projenizi birkaç dakikada kurun.
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 komutu ekle
20
23
  - version: 5.5.11
21
24
  date: 2025-07-11
22
25
  changes: CLI komut parametreleri dokümantasyonunu güncelle
@@ -311,6 +314,39 @@ npx intlayer fill --file src/home/*.content.ts --source-locale en --output-local
311
314
 
312
315
  Bu komut `src/home/` dizinindeki tüm içerik bildirim dosyaları için içeriği İngilizce'den Fransızca ve İspanyolca'ya GPT-3.5 Turbo modeli kullanarak çevirecektir.
313
316
 
317
+ ### Bileşenleri dönüştür
318
+
319
+ ```bash
320
+ npx intlayer transform
321
+ ```
322
+
323
+ Bu komut, mevcut bileşenleri Intlayer kullanmaya geçirmeye yardımcı olmak için kod dosyalarınızı analiz eder. İnteraktif dosya seçimi veya belirli dosya hedefleme desteği sağlar.
324
+
325
+ ##### Takma adlar:
326
+
327
+ - `npx intlayer trans`
328
+
329
+ ##### Argümanlar:
330
+
331
+ **Dosya seçim seçenekleri:**
332
+
333
+ - **`-f, --file [files...]`**: Dönüştürülecek belirli dosyaların listesi. Sağlanmazsa, CLI eşleşen dosyaları (`**/*.{tsx,jsx,vue,svelte,ts,js}`) tarayacak ve hangilerini dönüştüreceğinizi seçmenizi isteyecektir.
334
+
335
+ > Örnek: `npx intlayer transform -f src/components/MyComponent.tsx`
336
+
337
+ **Çıktı seçenekleri:**
338
+
339
+ - **`-o, --output-content-declarations [outputContentDeclarations]`**: Oluşturulan içerik bildirim dosyalarını kaydetmek için dizin.
340
+
341
+ > Örnek: `npx intlayer transform -o src/content`
342
+
343
+ **Yapılandırma seçenekleri:**
344
+
345
+ - **`--base-dir`**: Proje için temel dizini belirtin.
346
+ - **`--env`**: Ortamı belirtin.
347
+ - **`--env-file`**: Özel bir ortam dosyası sağlayın.
348
+ - **`--verbose`**: Ayrıntılı günlüğe kaydetmeyi etkinleştirin.
349
+
314
350
  ### Konfigürasyonu Yönetin
315
351
 
316
352
  #### Konfigürasyonu Alın