1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-25 14:59:26 +01:00

fix: fixes language bug where locales were upper case (#3435)

This commit is contained in:
Amir Raminfar
2024-12-04 08:46:25 -08:00
committed by GitHub
parent 1448371c23
commit 0ab5ad2c5d

View File

@@ -42,7 +42,9 @@ await loadLanguage("en", false); // load default language
const userLocale = computed(
() =>
locale.value ||
[navigator.language, navigator.language.slice(0, 2)].find((l) => availableLocales.includes(l)) ||
[navigator.language.toLowerCase(), navigator.language.toLowerCase().slice(0, 2)].find((l) =>
availableLocales.includes(l),
) ||
"en",
);