diff --git a/install-dev/classes/languages.php b/install-dev/classes/languages.php index f076b39f2..760954e59 100644 --- a/install-dev/classes/languages.php +++ b/install-dev/classes/languages.php @@ -65,6 +65,7 @@ class InstallLanguages foreach (scandir(_PS_INSTALL_LANGS_PATH_) as $lang) if ($lang[0] != '.' && is_dir(_PS_INSTALL_LANGS_PATH_.$lang) && $lang != self::DEFAULT_ISO && file_exists(_PS_INSTALL_LANGS_PATH_.$lang.'/install.php')) $this->languages[$lang] = new InstallLanguage($lang); + uasort($this->languages, 'ps_usort_languages'); } /** @@ -76,7 +77,6 @@ class InstallLanguages { if (!in_array($iso, $this->getIsoList())) throw new PrestashopInstallerException('Language '.$iso.' not found'); - $this->language = $iso; } @@ -202,3 +202,12 @@ class InstallLanguages return false; } } + +function ps_usort_languages($a, $b) +{ + $aname = $a->getMetaInformation('name'); + $bname = $b->getMetaInformation('name'); + if ($aname == $bname) + return 0; + return ($aname < $bname) ? -1 : 1; +} \ No newline at end of file diff --git a/install-dev/theme/js/welcome.js b/install-dev/theme/js/welcome.js index b9a987c49..48cc69dfa 100644 --- a/install-dev/theme/js/welcome.js +++ b/install-dev/theme/js/welcome.js @@ -1,7 +1,7 @@ $(document).ready(function() { // Submit change of language - $('#langList li input').click(function() + $('#langList').change(function() { var form = $('#mainForm'); form.attr('action', form.attr('action')+'#licenses-agreement'); diff --git a/install-dev/theme/view.css b/install-dev/theme/view.css index e9c96d71f..ce22310f6 100644 --- a/install-dev/theme/view.css +++ b/install-dev/theme/view.css @@ -443,7 +443,7 @@ ul#footer a:link, ul#footer a:active, ul#footer a:visited { #formSetMethod {padding-bottom:20px;} #formSetMethod p {padding-bottom:0;} -ul#langList {list-style-type:none;} +#langList {margin-bottom:20px} /* ETAPE 2 - required ******************************************************* */ #sheet_system #req_bt_refresh {float:right;} diff --git a/install-dev/theme/views/welcome.phtml b/install-dev/theme/views/welcome.phtml index ec22c7177..9839d8fe3 100644 --- a/install-dev/theme/views/welcome.phtml +++ b/install-dev/theme/views/welcome.phtml @@ -19,22 +19,14 @@ language->getIsoList()) > 1): ?> -
l('The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!', 55); ?>