summaryrefslogtreecommitdiffstats
path: root/settings/personal.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-16 03:06:11 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-16 03:06:11 +0100
commit96e2f15d8a6eee83e30bdf77ef3582f0c26b52e0 (patch)
tree9df43704cb7e580d328d6780561a0ec146003e7b /settings/personal.php
parentccc43f0ea02a048583fff715f00cda0280124586 (diff)
parentb0dbca0cc7f2d07dbf01c54861b932d8dc9fe2df (diff)
downloadnextcloud-server-96e2f15d8a6eee83e30bdf77ef3582f0c26b52e0.tar.gz
nextcloud-server-96e2f15d8a6eee83e30bdf77ef3582f0c26b52e0.zip
merge master into filesystem
Diffstat (limited to 'settings/personal.php')
-rwxr-xr-x[-rw-r--r--]settings/personal.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/settings/personal.php b/settings/personal.php
index c7964a2ef5a..47cb2366f67 100644..100755
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -29,10 +29,18 @@ $languageCodes=OC_L10N::findAvailableLanguages();
//put the current language in the front
unset($languageCodes[array_search($lang,$languageCodes)]);
array_unshift($languageCodes,$lang);
+
$languageNames=include 'languageCodes.php';
$languages=array();
foreach($languageCodes as $lang){
- $languages[]=array('code'=>$lang,'name'=>$languageNames[$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])){
+ $languages[]=array('code'=>$lang,'name'=>$languageNames[$lang]);
+ }else{//fallback to language code
+ $languages[]=array('code'=>$lang,'name'=>$lang);
+ }
}
// Return template