[Prestashop tips] Add a flag icon nearby language name in Prestashop Store

[Prestashop tips] Add a flag icon nearby language name in Prestashop Store

In a Prestashop website, if you want display a flag icon nearby language name like this design

flag icon nearby language name

You can do like our tutorial below:

Step 1: Modify *.tpl file

In Prestashop 1.6.0.x – 1.6.1.x

Open file: themes\default-bootstrap\modules\blocklanguages\blocklanguages.tpl

Or modules\blocklanguages\blocklanguages.tpl

Insert code

<img src=”{$link->getBaseLink()}img/tmp/lang_mini_{$language.id_lang}_{$language.id_shop}.jpg” />

Before line:

<span>{$language.name|regex_replace:”/\s\(.*\)$/”:””}</span>

Like this picture

In Prestashop 1.7.x+

Open file: themes\classic\modules\ps_languageselector\ps_languageselector.tpl

Or modules\ps_languageselector\ps_languageselector.tpl

Insert code

<img src=”{$link->getBaseLink()}img/tmp/lang_mini_{$language.id_lang}_{$language.id_shop}.jpg” />

Before line:

{$language.name_simple}

Like this picture

Step 2: Clear Cache

 

Related Articles

Leave a reply

You must be logged in to post a comment.