Show the language code in personal settings for unknown languages

Steps to reproduce:
* having an unknown language set in oc_preferences
* browse the personal settings
* only get listed the first letter of this language in the language chooser
This commit is contained in:
Morris Jobke 2015-11-06 09:48:05 +01:00
parent f2b19333b9
commit fa24d92eea
1 changed files with 8 additions and 0 deletions

View File

@ -93,6 +93,14 @@ foreach($languageCodes as $lang) {
}
}
// if user language is not available but set somehow: show the actual code as name
if (!is_array($userLang)) {
$userLang = [
'code' => $userLang,
'name' => $userLang,
];
}
ksort($commonlanguages);
// sort now by displayed language not the iso-code