@intlayer/docs 8.6.10 → 8.7.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/blog/ar/i18n_using_next-i18next.md +1 -1
  2. package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  3. package/blog/de/i18n_using_next-i18next.md +1 -1
  4. package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  5. package/blog/en/i18n_using_next-i18next.md +1 -1
  6. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  7. package/blog/en-GB/i18n_using_next-i18next.md +1 -1
  8. package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  9. package/blog/es/i18n_using_next-i18next.md +1 -1
  10. package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  11. package/blog/fr/i18n_using_next-i18next.md +1 -1
  12. package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  13. package/blog/hi/i18n_using_next-i18next.md +1 -1
  14. package/blog/id/i18n_using_next-i18next.md +1 -1
  15. package/blog/id/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  16. package/blog/it/i18n_using_next-i18next.md +1 -1
  17. package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  18. package/blog/ja/i18n_using_next-i18next.md +1 -1
  19. package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  20. package/blog/ko/i18n_using_next-i18next.md +1 -1
  21. package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  22. package/blog/pl/i18n_using_next-i18next.md +1 -1
  23. package/blog/pl/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  24. package/blog/pt/i18n_using_next-i18next.md +1 -1
  25. package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  26. package/blog/ru/i18n_using_next-i18next.md +1 -1
  27. package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  28. package/blog/tr/i18n_using_next-i18next.md +1 -1
  29. package/blog/uk/i18n_using_next-i18next.md +1 -1
  30. package/blog/uk/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  31. package/blog/vi/i18n_using_next-i18next.md +1 -1
  32. package/blog/vi/next-i18next_vs_next-intl_vs_intlayer.md +2 -2
  33. package/blog/zh/i18n_using_next-i18next.md +1 -1
  34. package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +1 -1
  35. package/docs/ar/bundle_optimization.md +454 -0
  36. package/docs/ar/intlayer_with_next-i18next.md +1 -1
  37. package/docs/ar/intlayer_with_next-intl.md +1 -1
  38. package/docs/ar/intlayer_with_tanstack+solid.md +24 -5
  39. package/docs/ar/intlayer_with_tanstack.md +45 -68
  40. package/docs/bn/bundle_optimization.md +454 -0
  41. package/docs/cs/bundle_optimization.md +454 -0
  42. package/docs/de/bundle_optimization.md +454 -0
  43. package/docs/de/intlayer_with_next-i18next.md +1 -1
  44. package/docs/de/intlayer_with_next-intl.md +1 -1
  45. package/docs/de/intlayer_with_tanstack+solid.md +24 -5
  46. package/docs/de/intlayer_with_tanstack.md +45 -68
  47. package/docs/en/bundle_optimization.md +36 -8
  48. package/docs/en/intlayer_with_next-i18next.md +1 -1
  49. package/docs/en/intlayer_with_next-intl.md +1 -1
  50. package/docs/en/intlayer_with_tanstack+solid.md +24 -5
  51. package/docs/en/intlayer_with_tanstack.md +45 -68
  52. package/docs/en-GB/bundle_optimization.md +454 -0
  53. package/docs/en-GB/intlayer_with_next-i18next.md +1 -1
  54. package/docs/en-GB/intlayer_with_next-intl.md +1 -1
  55. package/docs/en-GB/intlayer_with_tanstack+solid.md +24 -5
  56. package/docs/en-GB/intlayer_with_tanstack.md +47 -70
  57. package/docs/es/bundle_optimization.md +454 -0
  58. package/docs/es/intlayer_with_next-i18next.md +1 -1
  59. package/docs/es/intlayer_with_next-intl.md +1 -1
  60. package/docs/es/intlayer_with_tanstack+solid.md +24 -5
  61. package/docs/es/intlayer_with_tanstack.md +45 -68
  62. package/docs/fr/bundle_optimization.md +454 -0
  63. package/docs/fr/intlayer_with_next-i18next.md +1 -1
  64. package/docs/fr/intlayer_with_next-intl.md +1 -1
  65. package/docs/fr/intlayer_with_tanstack+solid.md +24 -5
  66. package/docs/fr/intlayer_with_tanstack.md +45 -68
  67. package/docs/hi/bundle_optimization.md +454 -0
  68. package/docs/hi/intlayer_with_next-i18next.md +1 -1
  69. package/docs/hi/intlayer_with_next-intl.md +1 -1
  70. package/docs/hi/intlayer_with_tanstack+solid.md +24 -5
  71. package/docs/hi/intlayer_with_tanstack.md +45 -68
  72. package/docs/id/bundle_optimization.md +454 -0
  73. package/docs/id/intlayer_with_next-i18next.md +1 -1
  74. package/docs/id/intlayer_with_next-intl.md +1 -1
  75. package/docs/id/intlayer_with_tanstack+solid.md +24 -5
  76. package/docs/id/intlayer_with_tanstack.md +45 -68
  77. package/docs/it/bundle_optimization.md +454 -0
  78. package/docs/it/intlayer_with_next-i18next.md +1 -1
  79. package/docs/it/intlayer_with_next-intl.md +1 -1
  80. package/docs/it/intlayer_with_tanstack+solid.md +24 -5
  81. package/docs/it/intlayer_with_tanstack.md +45 -68
  82. package/docs/ja/bundle_optimization.md +454 -0
  83. package/docs/ja/intlayer_with_next-i18next.md +1 -1
  84. package/docs/ja/intlayer_with_next-intl.md +1 -1
  85. package/docs/ja/intlayer_with_tanstack+solid.md +24 -5
  86. package/docs/ja/intlayer_with_tanstack.md +45 -36
  87. package/docs/ko/bundle_optimization.md +454 -0
  88. package/docs/ko/intlayer_with_next-i18next.md +1 -1
  89. package/docs/ko/intlayer_with_next-intl.md +1 -1
  90. package/docs/ko/intlayer_with_tanstack+solid.md +24 -5
  91. package/docs/ko/intlayer_with_tanstack.md +45 -68
  92. package/docs/nl/bundle_optimization.md +454 -0
  93. package/docs/pl/bundle_optimization.md +454 -0
  94. package/docs/pl/intlayer_with_next-i18next.md +1 -1
  95. package/docs/pl/intlayer_with_next-intl.md +1 -1
  96. package/docs/pl/intlayer_with_tanstack+solid.md +24 -5
  97. package/docs/pl/intlayer_with_tanstack.md +45 -68
  98. package/docs/pt/bundle_optimization.md +454 -0
  99. package/docs/pt/intlayer_with_next-i18next.md +1 -1
  100. package/docs/pt/intlayer_with_next-intl.md +1 -1
  101. package/docs/pt/intlayer_with_tanstack+solid.md +24 -5
  102. package/docs/pt/intlayer_with_tanstack.md +45 -68
  103. package/docs/ru/bundle_optimization.md +454 -0
  104. package/docs/ru/intlayer_with_next-i18next.md +1 -1
  105. package/docs/ru/intlayer_with_next-intl.md +1 -1
  106. package/docs/ru/intlayer_with_tanstack+solid.md +24 -5
  107. package/docs/ru/intlayer_with_tanstack.md +45 -68
  108. package/docs/tr/bundle_optimization.md +454 -0
  109. package/docs/tr/intlayer_with_next-i18next.md +1 -1
  110. package/docs/tr/intlayer_with_next-intl.md +1 -1
  111. package/docs/tr/intlayer_with_tanstack+solid.md +24 -5
  112. package/docs/tr/intlayer_with_tanstack.md +45 -68
  113. package/docs/uk/bundle_optimization.md +454 -0
  114. package/docs/uk/intlayer_with_next-i18next.md +1 -1
  115. package/docs/uk/intlayer_with_next-intl.md +1 -1
  116. package/docs/uk/intlayer_with_tanstack+solid.md +24 -5
  117. package/docs/uk/intlayer_with_tanstack.md +45 -68
  118. package/docs/ur/bundle_optimization.md +454 -0
  119. package/docs/vi/bundle_optimization.md +454 -0
  120. package/docs/vi/intlayer_with_next-i18next.md +1 -1
  121. package/docs/vi/intlayer_with_next-intl.md +1 -1
  122. package/docs/vi/intlayer_with_tanstack+solid.md +24 -5
  123. package/docs/vi/intlayer_with_tanstack.md +45 -68
  124. package/docs/zh/bundle_optimization.md +454 -0
  125. package/docs/zh/intlayer_with_next-i18next.md +1 -1
  126. package/docs/zh/intlayer_with_next-intl.md +1 -1
  127. package/docs/zh/intlayer_with_tanstack+solid.md +24 -5
  128. package/docs/zh/intlayer_with_tanstack.md +45 -68
  129. package/package.json +7 -7
@@ -415,7 +415,7 @@ export default function LocaleLayout({
415
415
  // التحقق من صحة اللغة من معلمات URL
416
416
  // إذا تم توفير لغة غير صالحة، يتم الرجوع إلى اللغة الافتراضية
417
417
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
418
- ? (params.locale as any)
418
+ ? params.locale
419
419
  : defaultLocale;
420
420
 
421
421
  // تحديد اتجاه النص بناءً على اللغة
@@ -547,7 +547,7 @@ export default function LocaleLayout({
547
547
  params: { locale: string };
548
548
  }) {
549
549
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
550
- ? (params.locale as any)
550
+ ? params.locale
551
551
  : defaultLocale;
552
552
 
553
553
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -614,7 +614,7 @@ async function loadMessages(locale: string) {
614
614
  }
615
615
 
616
616
  export default getRequestConfig(async ({ locale }) => {
617
- if (!locales.includes(locale as any)) notFound();
617
+ if (!locales.includes(locale)) notFound();
618
618
 
619
619
  return {
620
620
  messages: await loadMessages(locale),
@@ -414,7 +414,7 @@ export default function LocaleLayout({
414
414
  // Überprüfen Sie die Locale aus den URL-Parametern
415
415
  // Wenn eine ungültige Locale angegeben wird, wird auf die Standard-Locale zurückgegriffen
416
416
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
417
- ? (params.locale as any)
417
+ ? params.locale
418
418
  : defaultLocale;
419
419
 
420
420
  // Bestimmen Sie die Schreibrichtung basierend auf der Locale
@@ -557,7 +557,7 @@ export default function LocaleLayout({
557
557
  params: { locale: string };
558
558
  }) {
559
559
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
560
- ? (params.locale as any)
560
+ ? params.locale
561
561
  : defaultLocale;
562
562
 
563
563
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -624,7 +624,7 @@ async function loadMessages(locale: string) {
624
624
  }
625
625
 
626
626
  export default getRequestConfig(async ({ locale }) => {
627
- if (!locales.includes(locale as any)) notFound();
627
+ if (!locales.includes(locale)) notFound();
628
628
 
629
629
  return {
630
630
  messages: await loadMessages(locale),
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Validate locale from URL params
413
413
  // If invalid locale is provided, fall back to default locale
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Determine text direction based on locale
@@ -532,7 +532,7 @@ export default function LocaleLayout({
532
532
  params: { locale: string };
533
533
  }) {
534
534
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
535
- ? (params.locale as any)
535
+ ? params.locale
536
536
  : defaultLocale;
537
537
 
538
538
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -599,7 +599,7 @@ async function loadMessages(locale: string) {
599
599
  }
600
600
 
601
601
  export default getRequestConfig(async ({ locale }) => {
602
- if (!locales.includes(locale as any)) notFound();
602
+ if (!locales.includes(locale)) notFound();
603
603
 
604
604
  return {
605
605
  messages: await loadMessages(locale),
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Validate locale from URL params
413
413
  // If an invalid locale is provided, fall back to the default locale
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Determine text direction based on locale
@@ -501,7 +501,7 @@ const locales = ["en", "fr", "es"];
501
501
 
502
502
  export default getRequestConfig(async ({ locale }) => {
503
503
  // Validate that the incoming `locale` parameter is valid
504
- if (!locales.includes(locale as any)) notFound();
504
+ if (!locales.includes(locale)) notFound();
505
505
 
506
506
  return {
507
507
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Validar la locale a partir de los parámetros de la URL
413
413
  // Si se proporciona una locale inválida, usar la locale por defecto
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Determinar la dirección del texto según la locale
@@ -547,7 +547,7 @@ export default function LocaleLayout({
547
547
  params: { locale: string };
548
548
  }) {
549
549
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
550
- ? (params.locale as any)
550
+ ? params.locale
551
551
  : defaultLocale;
552
552
 
553
553
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -605,7 +605,7 @@ const locales = ["en", "fr", "es"];
605
605
 
606
606
  export default getRequestConfig(async ({ locale }) => {
607
607
  // Validar que el parámetro `locale` entrante sea válido
608
- if (!locales.includes(locale as any)) notFound();
608
+ if (!locales.includes(locale)) notFound();
609
609
 
610
610
  return {
611
611
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Valider la locale à partir des paramètres de l'URL
413
413
  // Si une locale invalide est fournie, revenir à la locale par défaut
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Déterminer la direction du texte en fonction de la locale
@@ -503,7 +503,7 @@ const locales = ["en", "fr", "es"];
503
503
 
504
504
  export default getRequestConfig(async ({ locale }) => {
505
505
  // Valider que le paramètre `locale` reçu est valide
506
- if (!locales.includes(locale as any)) notFound();
506
+ if (!locales.includes(locale)) notFound();
507
507
 
508
508
  return {
509
509
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  /// URL पैरामीटर से locale को मान्य करें
413
413
  // यदि अमान्य locale प्रदान किया गया है, तो डिफ़ॉल्ट locale पर वापस जाएं
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // locale के आधार पर टेक्स्ट दिशा निर्धारित करें
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Validasi locale dari parameter URL
413
413
  // Jika locale yang diberikan tidak valid, gunakan locale default
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Tentukan arah teks berdasarkan locale
@@ -534,7 +534,7 @@ export default function LocaleLayout({
534
534
  params: { locale: string };
535
535
  }) {
536
536
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
537
- ? (params.locale as any)
537
+ ? params.locale
538
538
  : defaultLocale;
539
539
 
540
540
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -601,7 +601,7 @@ async function loadMessages(locale: string) {
601
601
  }
602
602
 
603
603
  export default getRequestConfig(async ({ locale }) => {
604
- if (!locales.includes(locale as any)) notFound();
604
+ if (!locales.includes(locale)) notFound();
605
605
 
606
606
  return {
607
607
  messages: await loadMessages(locale),
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Valida la locale dai parametri URL
413
413
  // Se viene fornita una locale non valida, si utilizza la locale predefinita
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Determina la direzione del testo in base alla locale
@@ -507,7 +507,7 @@ const locales = ["en", "fr", "es"];
507
507
 
508
508
  export default getRequestConfig(async ({ locale }) => {
509
509
  // Verifica che il parametro `locale` in ingresso sia valido
510
- if (!locales.includes(locale as any)) notFound();
510
+ if (!locales.includes(locale)) notFound();
511
511
 
512
512
  return {
513
513
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // URLパラメータからロケールを検証
413
413
  // 無効なロケールが提供された場合はデフォルトロケールにフォールバック
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // ロケールに基づいてテキストの方向を決定
@@ -509,7 +509,7 @@ const locales = ["en", "fr", "es"];
509
509
 
510
510
  export default getRequestConfig(async ({ locale }) => {
511
511
  // 受け取った `locale` パラメータが有効か検証します
512
- if (!locales.includes(locale as any)) notFound();
512
+ if (!locales.includes(locale)) notFound();
513
513
 
514
514
  return {
515
515
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  /// URL 매개변수에서 로케일 유효성 검사
413
413
  /// 잘못된 로케일이 제공되면 기본 로케일로 대체
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  /// 로케일에 따라 텍스트 방향 결정
@@ -501,7 +501,7 @@ const locales = ["en", "fr", "es"];
501
501
 
502
502
  export default getRequestConfig(async ({ locale }) => {
503
503
  // 들어오는 `locale` 매개변수가 유효한지 검증합니다
504
- if (!locales.includes(locale as any)) notFound();
504
+ if (!locales.includes(locale)) notFound();
505
505
 
506
506
  return {
507
507
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Waliduj locale z parametrów URL
413
413
  // Jeśli podane jest nieprawidłowe locale, użyj domyślnego locale
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Określ kierunek tekstu na podstawie locale
@@ -536,7 +536,7 @@ export default function LocaleLayout({
536
536
  params: { locale: string };
537
537
  }) {
538
538
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
539
- ? (params.locale as any)
539
+ ? params.locale
540
540
  : defaultLocale;
541
541
 
542
542
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -603,7 +603,7 @@ async function loadMessages(locale: string) {
603
603
  }
604
604
 
605
605
  export default getRequestConfig(async ({ locale }) => {
606
- if (!locales.includes(locale as any)) notFound();
606
+ if (!locales.includes(locale)) notFound();
607
607
 
608
608
  return {
609
609
  messages: await loadMessages(locale),
@@ -413,7 +413,7 @@ export default function LocaleLayout({
413
413
  /// Validar o locale a partir dos parâmetros da URL
414
414
  /// Se um locale inválido for fornecido, usar o locale padrão
415
415
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
416
- ? (params.locale as any)
416
+ ? params.locale
417
417
  : defaultLocale;
418
418
 
419
419
  /// Determinar a direção do texto com base no locale
@@ -503,7 +503,7 @@ const locales = ["en", "fr", "es"];
503
503
 
504
504
  export default getRequestConfig(async ({ locale }) => {
505
505
  // Valida se o parâmetro `locale` recebido é válido
506
- if (!locales.includes(locale as any)) notFound();
506
+ if (!locales.includes(locale)) notFound();
507
507
 
508
508
  return {
509
509
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Проверка локали из параметров URL
413
413
  // Если указана недопустимая локаль, используется локаль по умолчанию
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Определение направления текста на основе локали
@@ -509,7 +509,7 @@ const locales = ["en", "fr", "es"];
509
509
 
510
510
  export default getRequestConfig(async ({ locale }) => {
511
511
  // Проверяем, что входящий параметр `locale` является допустимым
512
- if (!locales.includes(locale as any)) notFound();
512
+ if (!locales.includes(locale)) notFound();
513
513
 
514
514
  return {
515
515
  messages: (await import(`../messages/${locale}.json`)).default,
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  /// URL parametrelerinden locale doğrulaması yapın
413
413
  /// Geçersiz bir locale sağlanırsa, varsayılan locale geri dönülür
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  /// Locale'a göre metin yönünü belirleyin
@@ -413,7 +413,7 @@ export default function LocaleLayout({
413
413
  // Перевіряємо locale з параметрів URL
414
414
  // Якщо вказано недійсну locale, використовуємо defaultLocale
415
415
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
416
- ? (params.locale as any)
416
+ ? params.locale
417
417
  : defaultLocale;
418
418
 
419
419
  // Визначаємо напрямок тексту залежно від locale
@@ -532,7 +532,7 @@ export default function LocaleLayout({
532
532
  params: { locale: string };
533
533
  }) {
534
534
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
535
- ? (params.locale as any)
535
+ ? params.locale
536
536
  : defaultLocale;
537
537
 
538
538
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -599,7 +599,7 @@ async function loadMessages(locale: string) {
599
599
  }
600
600
 
601
601
  export default getRequestConfig(async ({ locale }) => {
602
- if (!locales.includes(locale as any)) notFound();
602
+ if (!locales.includes(locale)) notFound();
603
603
 
604
604
  return {
605
605
  messages: await loadMessages(locale),
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // Xác thực locale từ tham số URL
413
413
  // Nếu locale không hợp lệ được cung cấp, sử dụng locale mặc định
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // Xác định hướng văn bản dựa trên locale
@@ -534,7 +534,7 @@ export default function LocaleLayout({
534
534
  params: { locale: string };
535
535
  }) {
536
536
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
537
- ? (params.locale as any)
537
+ ? params.locale
538
538
  : defaultLocale;
539
539
 
540
540
  const dir = isRtl(locale) ? "rtl" : "ltr";
@@ -601,7 +601,7 @@ async function loadMessages(locale: string) {
601
601
  }
602
602
 
603
603
  export default getRequestConfig(async ({ locale }) => {
604
- if (!locales.includes(locale as any)) notFound();
604
+ if (!locales.includes(locale)) notFound();
605
605
 
606
606
  return {
607
607
  messages: await loadMessages(locale),
@@ -412,7 +412,7 @@ export default function LocaleLayout({
412
412
  // 验证来自 URL 参数的 locale
413
413
  // 如果提供了无效的 locale,则回退到默认 locale
414
414
  const locale: Locale = (locales as readonly string[]).includes(params.locale)
415
- ? (params.locale as any)
415
+ ? params.locale
416
416
  : defaultLocale;
417
417
 
418
418
  // 根据 locale 确定文本方向
@@ -509,7 +509,7 @@ const locales = ["en", "fr", "es"];
509
509
 
510
510
  export default getRequestConfig(async ({ locale }) => {
511
511
  // 验证传入的 `locale` 参数是否有效
512
- if (!locales.includes(locale as any)) notFound();
512
+ if (!locales.includes(locale)) notFound();
513
513
 
514
514
  return {
515
515
  messages: (await import(`../messages/${locale}.json`)).default,