summaryrefslogtreecommitdiffstats
path: root/settings/personal.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-11-06 09:48:05 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-11-06 09:48:05 +0100
commitfa24d92eea194869f80252d50e6de9181f99fd27 (patch)
tree7dbb40055d4c43f15fd93f90502f561353b38508 /settings/personal.php
parentf2b19333b902075b730d0fee7691a9709dd59e9d (diff)
downloadnextcloud-server-fa24d92eea194869f80252d50e6de9181f99fd27.tar.gz
nextcloud-server-fa24d92eea194869f80252d50e6de9181f99fd27.zip
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
Diffstat (limited to 'settings/personal.php')
-rw-r--r--settings/personal.php8
1 files changed, 8 insertions, 0 deletions
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