Prestashop 1.6.x display language flags

By default in the new Prestashop 1.6.x, languages switcher module does not display flags icons.
By reading this article you will be able to get the same result as this example taken from our theme Linea for Prestashop


Block languages module modification

There's a simple solution if you want to display a flag next to each language you are using form your eshop made with Prestashop.

Please, follow these steps:

  1. Use your favourite Text Editor like Notepad++ and open blocklanguages.tpl located inside

    Note: if the folder called blocklanguages does not exist in your theme directory, create this folder inside
    and paste the file called blocklanguages.tpl you copied from
  2. Use your favourite Text editor and open blocklanguages.tpl
  3. Change twice (about rows 31 and 46)
  4. with
    <img alt="{$language.iso_code}" height="11" alt="" src="{$img_lang_dir}{$language.id_lang}.jpg" width="16" /> {$|regex_replace:"/s(.*)$/":""}
  5. Save and overwrite
  6. It could be necessary to delete the cache of Prestashop (Advanced Parameters > Performances) and of your browser. (Please, be sure that Recompile templates if the files have been updated is enabled)

Note: do not forget to install your languages and upload flag icons using your Administration Panel > Localization > Languages.

If everything has gone well, you will find your images inside your-online-installation/img/l/

Otherwise you can get flag icons here:

Theme used in this article

Prestashop Tutorials

Search Engine Optimization

Web Marketing