Customer portal : Ordered languages in user preferences

SVN:trunk[4114]
This commit is contained in:
Guillaume Lajarige
2016-05-23 12:16:10 +00:00
parent 127d2a3295
commit 6ce0940f67

View File

@@ -54,10 +54,13 @@ class PreferencesFormManager extends FormManager
->SetCurrentValue(Dict::GetUserLanguage())
->SetStartsWithNullChoice(false);
// - Preparing choices
$aChoices = array();
foreach (Dict::GetLanguages() as $sCode => $aLanguage)
{
$oField->AddChoice($sCode, $aLanguage['description'] . ' (' . $aLanguage['localized_description'] . ')');
$aChoices[$sCode] = $aLanguage['description'] . ' (' . $aLanguage['localized_description'] . ')';
}
asort($aChoices);
$oField->SetChoices($aChoices);
// - Adding to form
$oForm->AddField($oField);