@intlayer/docs 8.3.0-canary.0 → 8.3.0-canary.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.
Files changed (37) hide show
  1. package/docs/ar/configuration.md +22 -11
  2. package/docs/ar/intlayer_with_tanstack.md +22 -1
  3. package/docs/de/configuration.md +14 -11
  4. package/docs/de/intlayer_with_tanstack.md +22 -1
  5. package/docs/en/configuration.md +11 -8
  6. package/docs/en/intlayer_with_tanstack.md +23 -2
  7. package/docs/en-GB/configuration.md +11 -8
  8. package/docs/en-GB/intlayer_with_tanstack.md +22 -1
  9. package/docs/es/configuration.md +15 -12
  10. package/docs/es/intlayer_with_tanstack.md +22 -1
  11. package/docs/fr/configuration.md +14 -11
  12. package/docs/fr/intlayer_with_tanstack.md +22 -1
  13. package/docs/hi/configuration.md +22 -11
  14. package/docs/hi/intlayer_with_tanstack.md +22 -1
  15. package/docs/id/configuration.md +22 -11
  16. package/docs/id/intlayer_with_tanstack.md +22 -1
  17. package/docs/it/configuration.md +14 -11
  18. package/docs/it/intlayer_with_tanstack.md +22 -1
  19. package/docs/ja/configuration.md +22 -11
  20. package/docs/ja/intlayer_with_tanstack.md +22 -1
  21. package/docs/ko/configuration.md +22 -11
  22. package/docs/ko/intlayer_with_tanstack.md +22 -1
  23. package/docs/pl/configuration.md +25 -19
  24. package/docs/pl/intlayer_with_tanstack.md +22 -1
  25. package/docs/pt/configuration.md +14 -11
  26. package/docs/pt/intlayer_with_tanstack.md +22 -1
  27. package/docs/ru/configuration.md +14 -11
  28. package/docs/ru/intlayer_with_tanstack.md +22 -1
  29. package/docs/tr/configuration.md +25 -26
  30. package/docs/tr/intlayer_with_tanstack.md +22 -1
  31. package/docs/uk/configuration.md +25 -19
  32. package/docs/uk/intlayer_with_tanstack.md +22 -1
  33. package/docs/vi/configuration.md +51 -11
  34. package/docs/vi/intlayer_with_tanstack.md +22 -1
  35. package/docs/zh/configuration.md +25 -26
  36. package/docs/zh/intlayer_with_tanstack.md +22 -1
  37. package/package.json +8 -8
@@ -438,12 +438,33 @@ export const Route = createFileRoute("/{-$locale}/")({
438
438
  component: RouteComponent,
439
439
  head: ({ params }) => {
440
440
  const { locale } = params;
441
+ const path = "/"; // The path for this route
442
+
441
443
  const metaContent = getIntlayer("app", locale);
442
444
 
443
445
  return {
446
+ links: [
447
+ // Canonical link: Points to the current localized page
448
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
449
+
450
+ // Hreflang: Tell Google about all localized versions
451
+ ...localeMap(({ locale: mapLocale }) => ({
452
+ rel: "alternate",
453
+ hrefLang: mapLocale,
454
+ href: getLocalizedUrl(path, mapLocale),
455
+ })),
456
+
457
+ // x-default: For users in unmatched languages
458
+ // Define the default fallback locale (usually your primary language)
459
+ {
460
+ rel: "alternate",
461
+ hrefLang: "x-default",
462
+ href: getLocalizedUrl(path, defaultLocale),
463
+ },
464
+ ],
444
465
  meta: [
445
466
  { title: metaContent.title },
446
- { content: metaContent.meta.description, name: "description" },
467
+ { name: "description", content: metaContent.meta.description },
447
468
  ],
448
469
  };
449
470
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-13
3
- updatedAt: 2026-03-10
3
+ updatedAt: 2026-03-11
4
4
  title: Конфигурация
5
5
  description: Узнайте, как настроить Intlayer для вашего приложения. Поймите различные параметры и опции, доступные для настройки Intlayer под ваши нужды.
6
6
  keywords:
@@ -14,21 +14,24 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.3.0
18
+ data: 2026-03-11
19
+ changes: Переместить 'baseDir' из конфигурации 'content' в конфигурацию 'system'
17
20
  - version: 8.2.0
18
21
  date: 2026-03-10
19
- changes: Update compiler options, add 'output' and 'noMetadata' support
22
+ changes: Обновление опций компилятора, добавление поддержки 'output' и 'noMetadata'
20
23
  - version: 8.1.7
21
24
  date: 2026-02-25
22
25
  changes: Обновление опций компилятора
23
26
  - version: 8.0.6
24
27
  date: 2026-02-12
25
- changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
28
+ changes: Добавление поддержки провайдеров Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face и Together.ai
26
29
  - version: 8.0.5
27
30
  date: 2026-02-06
28
31
  changes: Добавление `dataSerialization` в конфигурацию ИИ
29
32
  - version: 8.0.0
30
33
  date: 2026-01-22
31
- changes: Move `importMode` build configuration to `dictionary` configuration.
34
+ changes: Переместить конфигурацию сборки importMode в конфигурацию словаря.
32
35
  - version: 8.0.0
33
36
  date: 2026-01-18
34
37
  changes: Разделение конфигурации системы и конфигурации контента. Перемещение внутренних путей в свойство `system`. Добавление `codeDir` для разделения файлов контента и преобразования кода.
@@ -743,13 +746,6 @@ export default config;
743
746
  - _Пример_: `['.data.ts', '.data.js', '.data.json']`
744
747
  - _Примечание_: Настройка расширений файлов может помочь избежать конфликтов.
745
748
 
746
- - **baseDir**:
747
- - _Тип_: `string`
748
- - _По умолчанию_: `process.cwd()`
749
- - _Описание_: Базовый каталог проекта.
750
- - _Пример_: `'/path/to/project'`
751
- - _Примечание_: Используется для разрешения всех директорий, связанных с Intlayer.
752
-
753
749
  - **contentDir**:
754
750
  - _Тип_: `string[]`
755
751
  - _По умолчанию_: `['.']`
@@ -788,6 +784,13 @@ export default config;
788
784
 
789
785
  #### Свойства
790
786
 
787
+ - **baseDir**:
788
+ - _Тип_: `string`
789
+ - _По умолчанию_: `process.cwd()`
790
+ - _Описание_: Базовый каталог проекта.
791
+ - _Пример_: `'/path/to/project'`
792
+ - _Примечание_: Используется для разрешения всех директорий, связанных с Intlayer.
793
+
791
794
  - **dictionariesDir**:
792
795
  - _Тип_: `string`
793
796
  - _По умолчанию_: `'.intlayer/dictionary'`
@@ -437,12 +437,33 @@ export const Route = createFileRoute("/{-$locale}/")({
437
437
  component: RouteComponent,
438
438
  head: ({ params }) => {
439
439
  const { locale } = params;
440
+ const path = "/"; // The path for this route
441
+
440
442
  const metaContent = getIntlayer("app", locale);
441
443
 
442
444
  return {
445
+ links: [
446
+ // Canonical link: Points to the current localized page
447
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
448
+
449
+ // Hreflang: Tell Google about all localized versions
450
+ ...localeMap(({ locale: mapLocale }) => ({
451
+ rel: "alternate",
452
+ hrefLang: mapLocale,
453
+ href: getLocalizedUrl(path, mapLocale),
454
+ })),
455
+
456
+ // x-default: For users in unmatched languages
457
+ // Define the default fallback locale (usually your primary language)
458
+ {
459
+ rel: "alternate",
460
+ hrefLang: "x-default",
461
+ href: getLocalizedUrl(path, defaultLocale),
462
+ },
463
+ ],
443
464
  meta: [
444
465
  { title: metaContent.title },
445
- { content: metaContent.meta.description, name: "description" },
466
+ { name: "description", content: metaContent.meta.description },
446
467
  ],
447
468
  };
448
469
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-13
3
- updatedAt: 2026-02-25
3
+ updatedAt: 2026-03-11
4
4
  title: Yapılandırma
5
5
  description: Uygulamanız için Intlayer'ı nasıl yapılandıracağınızı öğrenin. Intlayer'ı ihtiyaçlarınıza göre özelleştirmek için mevcut çeşitli ayarları ve seçenekleri anlayın.
6
6
  keywords:
@@ -14,21 +14,24 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.3.0
18
+ data: 2026-03-11
19
+ changes: 'baseDir''i ''content'' yapılandırmasından ''system'' yapılandırmasına taşıyın
17
20
  - version: 8.2.0
18
21
  date: 2026-03-09
19
- changes: Update compiler options, add 'output' and 'noMetadata' support
22
+ changes: Derleyici seçeneklerini güncelle, 'output' ve 'noMetadata' desteği ekle
20
23
  - version: 8.1.7
21
24
  date: 2026-02-25
22
25
  changes: Derleyici seçeneklerini güncelle
23
26
  - version: 8.0.6
24
27
  date: 2026-02-12
25
- changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
28
+ changes: Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face ve Together.ai sağlayıcıları için destek ekle
26
29
  - version: 8.0.5
27
30
  date: 2026-02-06
28
31
  changes: AI yapılandırmasına `dataSerialization` eklendi
29
32
  - version: 8.0.0
30
33
  date: 2026-01-22
31
- changes: Move `importMode` build configuration to `dictionary` configuration.
34
+ changes: importMode derleme yapılandırmasını sözlük yapılandırmasına taşıyın.
32
35
  - version: 8.0.0
33
36
  date: 2026-01-18
34
37
  changes: Sistem yapılandırmasını içerik yapılandırmasından ayırın. İç yolları `system` özelliğine taşıyın. İçerik dosyalarını kod dönüşümünden ayırmak için `codeDir` ekleyin.
@@ -738,13 +741,6 @@ Uygulama içindeki içerik yönetimi ile ilgili ayarlar; dizin isimleri, dosya u
738
741
  - _Örnek_: `['.data.ts', '.data.js', '.data.json']`
739
742
  - _Not_: Dosya uzantılarının özelleştirilmesi çakışmaları önlemeye yardımcı olabilir.
740
743
 
741
- - **baseDir**:
742
- - _Tür_: `string`
743
- - _Varsayılan_: `process.cwd()`
744
- - _Açıklama_: Projenin temel dizini.
745
- - _Örnek_: `'/path/to/project'`
746
- - _Not_: Tüm Intlayer ile ilgili dizinlerin çözülmesinde kullanılır.
747
-
748
744
  - **dictionaryOutput**:
749
745
  - _Tür_: `string[]`
750
746
  - _Varsayılan_: `['intlayer']`
@@ -764,10 +760,26 @@ Uygulama içindeki içerik yönetimi ile ilgili ayarlar; dizin isimleri, dosya u
764
760
  - _Açıklama_: Kodun depolandığı dizin yolu, temel dizine göre.
765
761
  - _Not_: Bu, kod dosyalarını dönüştürmek (budama, optimizasyon) için izlemek için kullanılır. Bunu `contentDir`'den ayrı tutmak, içerik dosyalarının gereksiz taramalarından kaçınarak derleme performansını artırabilir.
766
762
 
763
+ ---
764
+
765
+ ### Sistem Yapılandırması
766
+
767
+ Intlayer'ın iç yolları ve çıktı sonuçlarıyla ilgili ayarlar. Bu ayarlar genellikle dâhildir ve kullanıcı tarafından değiştirilmeleri gerekmez.
768
+
769
+ #### Özellikler
770
+
771
+ - **baseDir**:
772
+ - _Tür_: `string`
773
+ - _Varsayılan_: `process.cwd()`
774
+ - _Açıklama_: Projenin temel dizini.
775
+ - _Örnek_: `'/path/to/project'`
776
+ - _Not_: Tüm Intlayer ile ilgili dizinlerin çözülmesinde kullanılır.
777
+
767
778
  - **dictionariesDir**:
768
779
  - _Tür_: `string`
769
- - _Varsayılan_: `'.intlayer/dictionaries'`
770
- - _Açıklama_: Ara sonuçların veya çıktıların depolanacağı dizin yolu.
780
+ - _Varsayılan_: `'.intlayer/dictionary'`
781
+ - _Açıklama_: Yerelleştirme sözlüklerinin saklandığı dizin.
782
+ - _Örnek_: `'translations'`
771
783
 
772
784
  - **moduleAugmentationDir**:
773
785
  - _Tür_: `string`
@@ -782,19 +794,6 @@ Uygulama içindeki içerik yönetimi ile ilgili ayarlar; dizin isimleri, dosya u
782
794
  - _Açıklama_: Birleştirilmemiş sözlüklerin depolanacağı dizin.
783
795
  - _Örnek_: `'translations'`
784
796
 
785
- - **dictionariesDir**:
786
- - _Tür_: `string`
787
- - _Varsayılan_: `'.intlayer/dictionary'`
788
- - _Açıklama_: Yerelleştirme sözlüklerinin saklandığı dizin.
789
- - _Örnek_: `'translations'`
790
-
791
- - **i18nextResourcesDir**:
792
- - _Tür_: `string`
793
- - _Varsayılan_: `'i18next_dictionary'`
794
- - _Açıklama_: i18n sözlüklerinin saklandığı dizin.
795
- - _Örnek_: `'translations'`
796
- - _Not_: Bu dizinin i18next çıktı türü için yapılandırıldığından emin olun.
797
-
798
797
  - **typesDir**:
799
798
  - _Tür_: `string`
800
799
  - _Varsayılan_: `'types'`
@@ -437,12 +437,33 @@ export const Route = createFileRoute("/{-$locale}/")({
437
437
  component: RouteComponent,
438
438
  head: ({ params }) => {
439
439
  const { locale } = params;
440
+ const path = "/"; // The path for this route
441
+
440
442
  const metaContent = getIntlayer("app", locale);
441
443
 
442
444
  return {
445
+ links: [
446
+ // Canonical link: Points to the current localized page
447
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
448
+
449
+ // Hreflang: Tell Google about all localized versions
450
+ ...localeMap(({ locale: mapLocale }) => ({
451
+ rel: "alternate",
452
+ hrefLang: mapLocale,
453
+ href: getLocalizedUrl(path, mapLocale),
454
+ })),
455
+
456
+ // x-default: For users in unmatched languages
457
+ // Define the default fallback locale (usually your primary language)
458
+ {
459
+ rel: "alternate",
460
+ hrefLang: "x-default",
461
+ href: getLocalizedUrl(path, defaultLocale),
462
+ },
463
+ ],
443
464
  meta: [
444
465
  { title: metaContent.title },
445
- { content: metaContent.meta.description, name: "description" },
466
+ { name: "description", content: metaContent.meta.description },
446
467
  ],
447
468
  };
448
469
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-13
3
- updatedAt: 2026-02-25
3
+ updatedAt: 2026-03-11
4
4
  title: Конфігурація
5
5
  description: Дізнайтеся, як налаштувати Intlayer для вашого застосунку. Зрозумійте різні параметри та опції, доступні для налаштування Intlayer відповідно до ваших потреб.
6
6
  keywords:
@@ -14,21 +14,24 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.3.0
18
+ data: 2026-03-11
19
+ changes: Перемістити 'baseDir' з конфігурації 'content' до конфігурації 'system'
17
20
  - version: 8.2.0
18
21
  date: 2026-03-09
19
- changes: Update compiler options, add 'output' and 'noMetadata' support
22
+ changes: Оновлення опцій компілятора, додавання підтримки 'output' та 'noMetadata'
20
23
  - version: 8.1.7
21
24
  date: 2026-02-25
22
25
  changes: Оновлення опцій компілятора
23
26
  - version: 8.0.6
24
27
  date: 2026-02-12
25
- changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
28
+ changes: Додано підтримку провайдерів Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face та Together.ai
26
29
  - version: 8.0.5
27
30
  date: 2026-02-06
28
31
  changes: Додано `dataSerialization` до конфігурації AI
29
32
  - version: 8.0.0
30
33
  date: 2026-01-22
31
- changes: Move `importMode` build configuration to `dictionary` configuration.
34
+ changes: Перемістити конфігурацію збірки importMode до конфігурації словника.
32
35
  - version: 8.0.0
33
36
  date: 2026-01-18
34
37
  changes: Розділити конфігурацію системи від конфігурації контенту. Перемістити внутрішні шляхи до властивості `system`. Додати `codeDir` для розділення файлів контенту та перетворення коду.
@@ -850,13 +853,6 @@ export default config;
850
853
  - _Приклад_: `['.data.ts', '.data.js', '.data.json']`
851
854
  - _Примітка_: Налаштування розширень файлів може допомогти уникнути конфліктів.
852
855
 
853
- - **baseDir**:
854
- - _Тип_: `string`
855
- - _За замовчуванням_: `process.cwd()`
856
- - _Опис_: Базова директорія проекту.
857
- - _Приклад_: `'/path/to/project'`
858
- - _Примітка_: Використовується для визначення всіх директорій, пов'язаних з Intlayer.
859
-
860
856
  - **contentDir**:
861
857
  - _Тип_: `string[]`
862
858
  - _За замовчуванням_: `['.']`
@@ -871,10 +867,26 @@ export default config;
871
867
  - _Опис_: Шлях до каталогу, де зберігається код, відносно базового каталогу.
872
868
  - _Примітка_: Використовується для відстеження файлів коду для перетворення (обрізання, оптимізація). Тримання цього окремо від `contentDir` може покращити продуктивність збірки, уникаючи непотрібного сканування файлів контенту.
873
869
 
870
+ ---
871
+
872
+ ### Конфігурація системи
873
+
874
+ Налаштування, пов'язані з внутрішніми шляхами та вихідними результатами Intlayer. Ці налаштування зазвичай є внутрішніми і не повинні змінюватися користувачем.
875
+
876
+ #### Властивості
877
+
878
+ - **baseDir**:
879
+ - _Тип_: `string`
880
+ - _За замовчуванням_: `process.cwd()`
881
+ - _Опис_: Базова директорія проекту.
882
+ - _Приклад_: `'/path/to/project'`
883
+ - _Примітка_: Використовується для визначення всіх директорій, пов'язаних з Intlayer.
884
+
874
885
  - **dictionariesDir**:
875
886
  - _Тип_: `string`
876
- - _За замовчуванням_: `'.intlayer/dictionaries'`
877
- - _Опис_: Шлях до каталогу для збереження проміжних або вихідних результатів.
887
+ - _За замовчуванням_: `'.intlayer/dictionary'`
888
+ - _Опис_: Каталог для збереження словників локалізації.
889
+ - _Приклад_: `'translations'`
878
890
 
879
891
  - **moduleAugmentationDir**:
880
892
  - _Тип_: `string`
@@ -889,12 +901,6 @@ export default config;
889
901
  - _Опис_: Каталог для збереження незлитих словників.
890
902
  - _Приклад_: `'translations'`
891
903
 
892
- - **dictionariesDir**:
893
- - _Тип_: `string`
894
- - _За замовчуванням_: `'.intlayer/dictionary'`
895
- - _Опис_: Каталог для збереження словників локалізації.
896
- - _Приклад_: `'translations'`
897
-
898
904
  - **typesDir**:
899
905
  - _Тип_: `string`
900
906
  - _За замовчуванням_: `'types'`
@@ -437,12 +437,33 @@ export const Route = createFileRoute("/{-$locale}/")({
437
437
  component: RouteComponent,
438
438
  head: ({ params }) => {
439
439
  const { locale } = params;
440
+ const path = "/"; // The path for this route
441
+
440
442
  const metaContent = getIntlayer("app", locale);
441
443
 
442
444
  return {
445
+ links: [
446
+ // Canonical link: Points to the current localized page
447
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
448
+
449
+ // Hreflang: Tell Google about all localized versions
450
+ ...localeMap(({ locale: mapLocale }) => ({
451
+ rel: "alternate",
452
+ hrefLang: mapLocale,
453
+ href: getLocalizedUrl(path, mapLocale),
454
+ })),
455
+
456
+ // x-default: For users in unmatched languages
457
+ // Define the default fallback locale (usually your primary language)
458
+ {
459
+ rel: "alternate",
460
+ hrefLang: "x-default",
461
+ href: getLocalizedUrl(path, defaultLocale),
462
+ },
463
+ ],
443
464
  meta: [
444
465
  { title: metaContent.title },
445
- { content: metaContent.meta.description, name: "description" },
466
+ { name: "description", content: metaContent.meta.description },
446
467
  ],
447
468
  };
448
469
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-13
3
- updatedAt: 2026-02-25
3
+ updatedAt: 2026-03-11
4
4
  title: Cấu hình
5
5
  description: Tìm hiểu cách cấu hình Intlayer cho ứng dụng của bạn. Hiểu các thiết lập và tùy chọn khác nhau để tùy chỉnh Intlayer theo nhu cầu của bạn.
6
6
  keywords:
@@ -14,21 +14,24 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.3.0
18
+ data: 2026-03-11
19
+ changes: Di chuyển 'baseDir' từ cấu hình 'content' sang cấu hình 'system'
17
20
  - version: 8.2.0
18
21
  date: 2026-03-09
19
- changes: Update compiler options, add 'output' and 'noMetadata' support
22
+ changes: Cập nhật các tùy chọn trình biên dịch, thêm hỗ trợ 'output' 'noMetadata'
20
23
  - version: 8.1.7
21
24
  date: 2026-02-25
22
25
  changes: Cập nhật các tùy chọn trình biên dịch
23
26
  - version: 8.0.6
24
27
  date: 2026-02-12
25
- changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
28
+ changes: Thêm hỗ trợ cho các nhà cung cấp Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face Together.ai
26
29
  - version: 8.0.5
27
30
  date: 2026-02-06
28
31
  changes: Thêm `dataSerialization` vào cấu hình AI
29
32
  - version: 8.0.0
30
33
  date: 2026-01-22
31
- changes: Move `importMode` build configuration to `dictionary` configuration.
34
+ changes: Di chuyển cấu hình build importMode sang cấu hình từ điển.
32
35
  - version: 8.0.0
33
36
  date: 2026-01-18
34
37
  changes: Tách cấu hình hệ thống khỏi cấu hình nội dung. Di chuyển các đường dẫn nội bộ sang thuộc tính `system`. Thêm `codeDir` để tách các tệp nội dung khỏi việc chuyển đổi mã.
@@ -736,6 +739,50 @@ Khi sử dụng localStorage hoặc sessionStorage:
736
739
  - **type**: Loại lưu trữ (`'localStorage' | 'sessionStorage'`)
737
740
  - **name**: Tên khóa lưu trữ (mặc định: `'INTLAYER_LOCALE'`)
738
741
 
742
+ ### Cấu hình Hệ thống
743
+
744
+ Các cài đặt liên quan đến đường dẫn nội bộ và kết quả đầu ra của Intlayer. Các cài đặt này thường mang tính nội bộ và người dùng không cần phải sửa đổi.
745
+
746
+ #### Thuộc tính
747
+
748
+ - **baseDir**:
749
+ - _Kiểu_: `string`
750
+ - _Mặc định_: `process.cwd()`
751
+ - _Mô tả_: Thư mục gốc của dự án.
752
+ - _Ví dụ_: `'/path/to/project'`
753
+ - _Lưu ý_: Được sử dụng để giải quyết tất cả các thư mục liên quan đến Intlayer.
754
+
755
+ - **dictionariesDir**:
756
+ - _Kiểu_: `string`
757
+ - _Mặc định_: `'.intlayer/dictionary'`
758
+ - _Mô tả_: Đường dẫn thư mục để lưu trữ các từ điển bản địa hóa.
759
+ - _Ví dụ_: `'translations'`
760
+
761
+ - **moduleAugmentationDir**:
762
+ - _Kiểu_: `string`
763
+ - _Mặc định_: `'.intlayer/types'`
764
+ - _Mô tả_: Thư mục dành cho việc mở rộng module, giúp IDE gợi ý và kiểm tra kiểu tốt hơn.
765
+ - _Ví dụ_: `'intlayer-types'`
766
+ - _Lưu ý_: Hãy chắc chắn bao gồm thư mục này trong `tsconfig.json`.
767
+
768
+ - **unmergedDictionariesDir**:
769
+ - _Kiểu_: `string`
770
+ - _Mặc định_: `'.intlayer/unmerged_dictionary'`
771
+ - _Mô tả_: Thư mục để lưu trữ các từ điển chưa được hợp nhất.
772
+ - _Ví dụ_: `'translations'`
773
+
774
+ - **typesDir**:
775
+ - _Kiểu_: `string`
776
+ - _Mặc định_: `'types'`
777
+ - _Mô tả_: Thư mục để lưu trữ các kiểu của từ điển.
778
+ - _Ví dụ_: `'intlayer-types'`
779
+
780
+ - **mainDir**:
781
+ - _Kiểu_: `string`
782
+ - _Mặc định_: `'main'`
783
+ - _Mô tả_: Thư mục nơi lưu trữ các tệp chính của ứng dụng.
784
+ - _Ví dụ_: `'intlayer-main'`
785
+
739
786
  #### Ví dụ cấu hình
740
787
 
741
788
  Dưới đây là một số ví dụ cấu hình phổ biến cho cấu trúc routing mới v7:
@@ -850,13 +897,6 @@ Các thiết lập liên quan đến việc xử lý nội dung trong ứng dụ
850
897
  - _Ví dụ_: `['.data.ts', '.data.js', '.data.json']`
851
898
  - _Lưu ý_: Tùy chỉnh phần mở rộng tệp có thể giúp tránh xung đột.
852
899
 
853
- - **baseDir**:
854
- - _Kiểu_: `string`
855
- - _Mặc định_: `process.cwd()`
856
- - _Mô tả_: Thư mục gốc của dự án.
857
- - _Ví dụ_: `'/path/to/project'`
858
- - _Lưu ý_: Được sử dụng để giải quyết tất cả các thư mục liên quan đến Intlayer.
859
-
860
900
  - **contentDir**:
861
901
  - _Kiểu_: `string[]`
862
902
  - _Mặc định_: `['.']`
@@ -437,12 +437,33 @@ export const Route = createFileRoute("/{-$locale}/")({
437
437
  component: RouteComponent,
438
438
  head: ({ params }) => {
439
439
  const { locale } = params;
440
+ const path = "/"; // The path for this route
441
+
440
442
  const metaContent = getIntlayer("app", locale);
441
443
 
442
444
  return {
445
+ links: [
446
+ // Canonical link: Points to the current localized page
447
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
448
+
449
+ // Hreflang: Tell Google about all localized versions
450
+ ...localeMap(({ locale: mapLocale }) => ({
451
+ rel: "alternate",
452
+ hrefLang: mapLocale,
453
+ href: getLocalizedUrl(path, mapLocale),
454
+ })),
455
+
456
+ // x-default: For users in unmatched languages
457
+ // Define the default fallback locale (usually your primary language)
458
+ {
459
+ rel: "alternate",
460
+ hrefLang: "x-default",
461
+ href: getLocalizedUrl(path, defaultLocale),
462
+ },
463
+ ],
443
464
  meta: [
444
465
  { title: metaContent.title },
445
- { content: metaContent.meta.description, name: "description" },
466
+ { name: "description", content: metaContent.meta.description },
446
467
  ],
447
468
  };
448
469
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-13
3
- updatedAt: 2026-03-10
3
+ updatedAt: 2026-03-11
4
4
  title: 配置
5
5
  description: 了解如何为您的应用程序配置 Intlayer。了解各种设置和选项,以根据您的需求自定义 Intlayer。
6
6
  keywords:
@@ -14,21 +14,24 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 8.3.0
18
+ data: 2026-03-11
19
+ changes: 将 'baseDir' 从 'content' 配置移动到 'system' 配置
17
20
  - version: 8.2.0
18
21
  date: 2026-03-10
19
- changes: Update compiler options, add 'output' and 'noMetadata' support
22
+ changes: 更新编译器选项,增加 'output' 'noMetadata' 支持
20
23
  - version: 8.1.7
21
24
  date: 2026-02-25
22
25
  changes: 更新编译器选项
23
26
  - version: 8.0.6
24
27
  date: 2026-02-12
25
- changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
28
+ changes: 新增对 Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, 以及 Together.ai 提供商的支持
26
29
  - version: 8.0.5
27
30
  date: 2026-02-06
28
31
  changes: 在 AI 配置中添加 `dataSerialization`
29
32
  - version: 8.0.0
30
33
  date: 2026-01-22
31
- changes: Move `importMode` build configuration to `dictionary` configuration.
34
+ changes: importMode 构建配置移动到字典配置。
32
35
  - version: 8.0.0
33
36
  date: 2026-01-18
34
37
  changes: 将系统配置与内容配置分离。将内部路径移至 `system` 属性。添加 `codeDir` 以将内容文件与代码转换分离。
@@ -738,13 +741,6 @@ export default config;
738
741
  - _示例_: `['.data.ts', '.data.js', '.data.json']`
739
742
  - _备注_: 自定义文件扩展名可以帮助避免冲突。
740
743
 
741
- - **baseDir**:
742
- - _类型_: `string`
743
- - _默认值_: `process.cwd()`
744
- - _描述_: 项目的基础目录。
745
- - _示例_: `'/path/to/project'`
746
- - _备注_: 用于解析所有与 Intlayer 相关的目录。
747
-
748
744
  - **dictionaryOutput**:
749
745
  - _类型_: `string[]`
750
746
  - _默认值_: `['intlayer']`
@@ -764,10 +760,26 @@ export default config;
764
760
  - _描述_: 存储代码的目录路径,相对于基础目录。
765
761
  - _备注_: 用于监视代码文件以进行转换(修剪、优化)。将此与 `contentDir` 分开可以提高构建性能,避免不必要地扫描内容文件。
766
762
 
763
+ ---
764
+
765
+ ### 系统配置
766
+
767
+ 与 Intlayer 内部路径和输出结果相关的设置。这些设置通常是内部的,用户无需修改。
768
+
769
+ #### 属性
770
+
771
+ - **baseDir**:
772
+ - _类型_: `string`
773
+ - _默认值_: `process.cwd()`
774
+ - _描述_: 项目的基础目录。
775
+ - _示例_: `'/path/to/project'`
776
+ - _备注_: 用于解析所有与 Intlayer 相关的目录。
777
+
767
778
  - **dictionariesDir**:
768
779
  - _类型_: `string`
769
- - _默认_: `'.intlayer/dictionaries'`
770
- - _描述_: 用于存储中间结果或输出结果的目录路径。
780
+ - _默认值_: `'.intlayer/dictionary'`
781
+ - _描述_: 用于存储本地化词典的目录。
782
+ - _示例_: `'translations'`
771
783
 
772
784
  - **moduleAugmentationDir**:
773
785
  - _类型_: `string`
@@ -782,19 +794,6 @@ export default config;
782
794
  - _描述_: 用于存储未合并字典的目录。
783
795
  - _示例_: `'translations'`
784
796
 
785
- - **dictionariesDir**:
786
- - _类型_: `string`
787
- - _默认值_: `'.intlayer/dictionary'`
788
- - _描述_: 用于存储本地化词典的目录。
789
- - _示例_: `'translations'`
790
-
791
- - **i18nextResourcesDir**:
792
- - _类型_: `string`
793
- - _默认值_: `'i18next_dictionary'`
794
- - _描述_: 用于存储 i18n 词典的目录。
795
- - _示例_: `'translations'`
796
- - _注意_: 确保该目录已为 i18next 输出类型进行配置。
797
-
798
797
  - **typesDir**:
799
798
  - _类型_: `string`
800
799
  - _默认值_: `'types'`
@@ -441,12 +441,33 @@ export const Route = createFileRoute("/{-$locale}/")({
441
441
  component: RouteComponent,
442
442
  head: ({ params }) => {
443
443
  const { locale } = params;
444
+ const path = "/"; // The path for this route
445
+
444
446
  const metaContent = getIntlayer("app", locale);
445
447
 
446
448
  return {
449
+ links: [
450
+ // Canonical link: Points to the current localized page
451
+ { rel: "canonical", href: getLocalizedUrl(path, locale) },
452
+
453
+ // Hreflang: Tell Google about all localized versions
454
+ ...localeMap(({ locale: mapLocale }) => ({
455
+ rel: "alternate",
456
+ hrefLang: mapLocale,
457
+ href: getLocalizedUrl(path, mapLocale),
458
+ })),
459
+
460
+ // x-default: For users in unmatched languages
461
+ // Define the default fallback locale (usually your primary language)
462
+ {
463
+ rel: "alternate",
464
+ hrefLang: "x-default",
465
+ href: getLocalizedUrl(path, defaultLocale),
466
+ },
467
+ ],
447
468
  meta: [
448
469
  { title: metaContent.title },
449
- { content: metaContent.meta.description, name: "description" },
470
+ { name: "description", content: metaContent.meta.description },
450
471
  ],
451
472
  };
452
473
  },