Merge pull request #49988 from nextcloud/jtr-locale-personal-info

fix(settings): show the correct initial locale in Personal info
This commit is contained in:
Joas Schilling 2025-01-07 15:42:43 +01:00 committed by GitHub
commit 17e8948360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,8 +265,8 @@ class PersonalInfo implements ISettings {
}
$uid = $user->getUID();
$userLocaleString = $this->config->getUserValue($uid, 'core', 'locale', $this->l10nFactory->findLocale());
$userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage());
$userLocaleString = $this->config->getUserValue($uid, 'core', 'locale', $this->l10nFactory->findLocale($userLang));
$localeCodes = $this->l10nFactory->findAvailableLocales();
$userLocale = array_filter($localeCodes, fn ($value) => $userLocaleString === $value['code']);