summaryrefslogtreecommitdiffstats
path: root/lib/private/Settings/Personal/PersonalInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Settings/Personal/PersonalInfo.php')
-rw-r--r--lib/private/Settings/Personal/PersonalInfo.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php
index f6fb9d48d99..267be2878d0 100644
--- a/lib/private/Settings/Personal/PersonalInfo.php
+++ b/lib/private/Settings/Personal/PersonalInfo.php
@@ -232,14 +232,13 @@ class PersonalInfo implements ISettings {
$userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage());
- $localeData = file_get_contents(__DIR__ . '/locales.json');
- $localeCodes = json_decode($localeData, true);
+ $localeCodes = $this->l10nFactory->findAvailableLocales();
$userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) {
return $userLocaleString === $value['code'];
});
- if (count($userLocale) > 0)
+ if (!empty($userLocale))
{
$userLocale = reset($userLocale);
}
@@ -248,14 +247,6 @@ class PersonalInfo implements ISettings {
return 0 === strpos($localeCode['code'], $userLang);
});
- /*$localesForLanguage = [];
-
- foreach (array_keys($localeCodes) as $localeCode) {
- if (0 === strpos($localeCode, $userLang)) {
- $localesForLanguage[] = $localeCode;
- }
- }*/
-
return [
'activelocaleLang' => $userLocaleString,
'activelocale' => $userLocale,