diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-08-14 15:30:30 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-08-14 15:30:30 +0200 |
commit | df532e3f823375e059defff4e5e3fee2af6c8054 (patch) | |
tree | db84698099a547a2956caea33834317d3de2a6dc /settings/personal.php | |
parent | 970888b92d967f657b4f719a729a823cbf7e2437 (diff) | |
download | nextcloud-server-df532e3f823375e059defff4e5e3fee2af6c8054.tar.gz nextcloud-server-df532e3f823375e059defff4e5e3fee2af6c8054.zip |
Show language names in Personal
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/settings/personal.php b/settings/personal.php index d2c29019ca5..a31042bb53f 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -18,10 +18,15 @@ $total=$free+$used; $relative=round(($used/$total)*100); $lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', 'en' ); -$languages=OC_L10N::findAvailableLanguages(); +$languageCodes=OC_L10N::findAvailableLanguages(); //put the current language in the front -unset($languages[array_search($lang,$languages)]); -array_unshift($languages,$lang); +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]); +} // Return template $tmpl = new OC_Template( "settings", "personal", "user"); |