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!

Streamline your order fulfillment process with the Order PDF Export module for PrestaShop. This esse...
39.99 €

The "Loyalty – Manual points & history" module is an extension for the main loyalty system (my...
14.99 €

An extension for the PrestaShop myprestaloyalty module. Automatically reward customers with loyalty ...
19.99 €

Gain full control over your loyalty program. View complete customer point history, manage balances, ...
19.99 €