read language name from the right resource

This commit is contained in:
Robin Appelman 2012-01-15 15:30:08 +01:00
parent 37c0b97b3c
commit 63d9c1a817

View file

@ -32,7 +32,7 @@ array_unshift($languageCodes,$lang);
$languageNames=include 'languageCodes.php';
$languages=array();
foreach($languageCodes as $lang){
$l=new OC_L10N('core',$lang);
$l=new OC_L10N('settings',$lang);
if($l->t('__language_name__')!='__language_name__'){//first check if the language name is in the translation file
$languages[]=array('code'=>$lang,'name'=>$l->t('__language_name__'));
}elseif(isset($languageNames[$lang])){