diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-06-01 17:07:51 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-06-10 12:44:12 +0200 |
commit | b4f14f1f488b5dd22a8a72be3c6f3c7b1192e9d4 (patch) | |
tree | 497fca8f51dc7fd27b33f55bef89282925679b2d /settings/personal.php | |
parent | d9a2b8505936a4cbee37e2af46ff8d58efb44281 (diff) | |
download | nextcloud-server-b4f14f1f488b5dd22a8a72be3c6f3c7b1192e9d4.tar.gz nextcloud-server-b4f14f1f488b5dd22a8a72be3c6f3c7b1192e9d4.zip |
Do not use the language name, when it's not the one from the language we want
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/personal.php b/settings/personal.php index 62a718985f8..244cd7eb581 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -76,8 +76,9 @@ $commonLanguages = array(); foreach($languageCodes as $lang) { $l = \OC::$server->getL10N('settings', $lang); // TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version - if(substr($l->t('__language_name__'), 0, 1) !== '_') {//first check if the language name is in the translation file - $ln=array('code'=>$lang, 'name'=> (string)$l->t('__language_name__')); + $potentialName = (string) $l->t('__language_name__'); + if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file + $ln=array('code'=>$lang, 'name'=> $potentialName); }elseif(isset($languageNames[$lang])) { $ln=array('code'=>$lang, 'name'=>$languageNames[$lang]); }else{//fallback to language code |