Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.

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>
Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.
If you like this article, support our work!

Automatic Bank of Spain (Banco de España - BdE) currency rates integrator. The module guarant...
19.99 €

Automatic National Bank of Ukraine (NBU) currency rates integrator. The module guarantees precise pr...
19.99 €

The Currency Exchange Module offers unparalleled flexibility in managing international sales. Regard...
19.99 €

Integrate your store with the Central Bank of the Republic of Turkey (TCMB) using this module. It au...
19.99 €