Fix PHANPY_DEFAULT_LANG not working

It needs to be used before navigator.language
This commit is contained in:
Lim Chee Aun 2024-08-19 10:19:52 +08:00
parent 96e4a3dc7a
commit b286511f44

View file

@ -46,8 +46,8 @@ export function initActivateLang() {
const lang = detect( const lang = detect(
fromUrl('lang'), fromUrl('lang'),
fromStorage('lang'), fromStorage('lang'),
fromNavigator(),
PHANPY_DEFAULT_LANG, PHANPY_DEFAULT_LANG,
fromNavigator(),
DEFAULT_LANG, DEFAULT_LANG,
); );
const matchedLang = localeMatch(lang, LOCALES); const matchedLang = localeMatch(lang, LOCALES);