From 4145e3b2651312b5949de3aae4f34c1be5332eb8 Mon Sep 17 00:00:00 2001 From: Thomas Schmidt Date: Wed, 1 Feb 2012 12:00:38 +0100 Subject: pre-select current language, sort available languages --- settings/personal.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'settings/personal.php') diff --git a/settings/personal.php b/settings/personal.php index 787957f246f..3b90827ed99 100755 --- a/settings/personal.php +++ b/settings/personal.php @@ -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); -- cgit v1.2.3