Jump to content

edit language selector fro drop down to inline and add flags in prestashop 1.7


se.ehsan

Recommended Posts

hello dears.
i got a solution to add flag to languages selector block in prestashop 1.7 , just you should follow the below steps:
 
1- go to :

 

 

/themes/classic/modules/ps_languageselector/ps_languageselector.tpl

 

 

 

 

2- download and open :

ps_languageselector.tpl 

 file with any editor , i will use htmlpad .

 

3- search for : 

{$current_language.name_simple}

( you can find it on line 30)

 

replace it with :

<img src="{$urls.img_lang_url}{$current_language.id_lang}.jpg" />{$current_language.name_simple}
4- search for :
{$language.name_simple}

( you can find it on line 36) 

 

replace it with :

<img src="{$urls.img_lang_url}{$language.id_lang}.jpg" /> {$language.name_simple}
5- search for : 
{$language.name_simple}

( you can find it on line 42) 

 

replace it with :

<img src="{$urls.img_lang_url}{$language.id_lang}.jpg" /> {$language.name_simple}
 

notice:

- step 3 to show current language flag.

- step 4 & 5 to show flag with languages that in dropdown list.

- copy and replace code as in code block .

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

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