pre-select current language, sort available languages

This commit is contained in:
Thomas Schmidt 2012-02-01 12:00:38 +01:00
parent 1f718d31e1
commit 4145e3b265

View file

@ -23,8 +23,10 @@ $relative=round(($used/$total)*10000)/100;
$email=OC_Preferences::getValue(OC_User::getUser(), 'settings','email','');
$lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', 'en' );
$lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() );
$languageCodes=OC_L10N::findAvailableLanguages();
sort ($languageCodes);
//put the current language in the front
unset($languageCodes[array_search($lang,$languageCodes)]);
array_unshift($languageCodes,$lang);