gepardik Posted April 23, 2013 Share Posted April 23, 2013 Hi, is there anyone who know, how to change the default order of languages in blocklanguages? I would like to order it myself, because i need first cz language, second english and third german.. Thanks for ideas. Link to comment Share on other sites More sharing options...
PascalVG Posted April 23, 2013 Share Posted April 23, 2013 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, pascal Link to comment Share on other sites More sharing options...
PascalVG Posted April 23, 2013 Share Posted April 23, 2013 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... pascal Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now