Jump to content

Modifiy flags positions in block language selector


Recommended Posts

hello,

due to market specificities, I've newly created one Australian language, adding to already existing English-US, Spanish, French, German, Italian and Portugese

the problem is that this Australian flag appears at the very end of the language block selector which is not quite 'logical', i would like it to be just under the English-US flag 

Idealy it should appear that way on the language selector, from top to bottom :

{English-US, English-UK, English-Au}{French, Spanish, Italian, Portugese}{German}

i already made lots of translations, so deleting/re-creating each language just to have the flags in order of their creation would be crazily heavy....

any workaround ?...

Thanks

 

Flagsproblem.jpg

Edited by superskyman100 (see edit history)
Link to comment
Share on other sites

Hello:

By default languages are ordered by id_lang from ps_lang table in database. You have 3 possible solutions:

  1. Change id_lang to reorder as you want (be carefull with this option, you can lose data).
  2. Modify blocklanguages::_prepareHook function to reorder languages list as you want after get it on $languages = Language::getLanguages(true, $this->context->shop->id); line.
  3. Change Language::loadLanguages to modify languages order list.

Regards

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...