Merge pull request #66 from nextcloud/stable9-downstream-160612

[Stable9] downstream 16-06-12
This commit is contained in:
Lukas Reschke 2016-06-12 20:23:47 +02:00 committed by GitHub
commit df2902a701
1 changed files with 3 additions and 2 deletions

View File

@ -76,8 +76,9 @@ $commonLanguages = array();
foreach($languageCodes as $lang) { foreach($languageCodes as $lang) {
$l = \OC::$server->getL10N('settings', $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 // 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 $potentialName = (string) $l->t('__language_name__');
$ln=array('code'=>$lang, 'name'=> (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])) { }elseif(isset($languageNames[$lang])) {
$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]); $ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
}else{//fallback to language code }else{//fallback to language code