Jump to content

Language order in1.5


gepardik
 Share

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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...

pascal

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More