Jump to content

Language order in1.5


Recommended Posts

Hi Gepardik,


IF, (and only if) your language names are indeed Czechish, English, German (and only these three) AND you want this order, you're lucky.


They are alphabetically ordered and you can do this:

Edit file classes/Language.php and find the function loadLanguages. Then add the ORDER BY l.name to the SQL statement. This orders the records my the name column, giving it an alphabetical order.



public static function loadLanguages()


self::$_LANGUAGES = array();


$sql = 'SELECT l.*, ls.`id_shop`

FROM `'._DB_PREFIX_.'lang` l

LEFT JOIN `'._DB_PREFIX_.'lang_shop` ls ON (l.id_lang = ls.id_lang) ORDER BY l.name';


Hope this helps,


Link to comment
Share on other sites

N.B. for those who don't have an alphabetically ordered list, you can 'make it like that' by editing the names of the languages and change them into:


"English (English)" --> "2 English (English)"


"Dutch" --> "1 Dutch"


"Polish" --> "3 Polish"


and then add the ORDER BY l.name, as described above...


Just an idea...


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...