Read how to modify block languages module to display flags inline (without dropdown effect). Check this easy in use modification for free!

By default in prestashop languages switcher module display flags with dropdown effect. In this short tutoral i want to show you how to display flags inline like on picture above. It will be possible with blocklanguages module template file modification. This simple modification will work also in non-default themes.
Block languages module modification
What to do? For the first we must open correct module .tpl file. Open this directory: /modules/blocklanguages/ and module template file is: blocklanguages.tpl. If the same file exists in your theme directory - you have to edit file located there. So before you will start modification make sure that module template file doesn't exist in this path: /themes/YOUR_THEME/modules/blocklanguages/blocklanguages.tpl.
Open module template file and remove whole file contents. Then paste there this simple smarty code:
<div id="languages_block_top">
<div id="countries">
<ul style="list-style:none;">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if} style="display:inline-block;margin:2px;">
{if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">
{/if}
{/if}
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
{/foreach}
</ul>
</div>
</div>
Article written byMilosz Myszczuk, PrestaShop expert. CEO and founder of the VEKIA interactive agency. Learn more.
If you like this article, support our work!

Turn one-time buyers into loyal, repeat customers with a prepaid wallet that keeps their money in yo...
59.99 €

Show or hide payment methods at checkout with powerful rule-based policies. Build AND/OR conditions ...
79.99 €
129.99 €

Quote Enterprise is an enterprise-class quote-to-order module for PrestaShop: customers request offe...
89.99 €
149.99 €

Charge or reward customers by payment method in PrestaShop. Apply automatic discounts or surcharges ...
49.99 €