From 5f504024a3e1c75fc904f962315af76c41e057ce Mon Sep 17 00:00:00 2001 From: thislight Date: Tue, 19 Nov 2024 18:07:11 +0800 Subject: [PATCH] i18n: fix auto match wrong region --- src/platform/i18n.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/i18n.tsx b/src/platform/i18n.tsx index ccc71e6..72e791e 100644 --- a/src/platform/i18n.tsx +++ b/src/platform/i18n.tsx @@ -58,7 +58,7 @@ export function autoMatchRegion() { } } } else if (s.length === 2) { - const [lang, region] = s[1]; + const [lang, region] = s; for (const available of SUPPORTED_REGIONS) { if (available.toLowerCase() === `${lang}_${region}`.toLowerCase()) { return available;