From fa24d92eea194869f80252d50e6de9181f99fd27 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 6 Nov 2015 09:48:05 +0100 Subject: 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 --- settings/personal.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/settings/personal.php b/settings/personal.php index d6d016c6545..bf1e1ad8793 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -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 -- cgit v1.2.3