fix build bug

This commit is contained in:
AC
2025-06-11 15:43:43 +08:00
parent cd0366392a
commit f72aadc35d
7 changed files with 32 additions and 11 deletions

View File

@@ -97,6 +97,9 @@ function setItem(key: string, value: string) {
function getLanguage() {
try {
if (typeof navigator === "undefined") {
return DEFAULT_LANG;
}
const locale = new Intl.Locale(navigator.language).maximize();
const region = locale?.region?.toLowerCase();
// 1. check region code in ALL_LANGS