Jump to content
thirty bees forum

block language and block currency with flags


colorful-ant

Recommended Posts

for language block with flag - default theme

modules / blocklanguages / blocklanguages.tpl

changes

<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> {$current_iso|escape:'html':'UTF-8'} <span class="caret"></span> </a>

to <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <span><img alt="{$language.iso_code}" height="11" span="" src="{$img_lang_dir}{$language.id_lang}.jpg" width="16" />{$current_iso|escape:'html':'UTF-8'}</span> <span class="caret"></span> </a>

and this

<a href="{$lang_rewrite_urls.$indice_lang|escape:'html':'UTF-8'}" title="{$language.name|escape:'html':'UTF-8'}" rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}"> <span>{$language.name|regex_replace:"/\s\(.*\)$/":""}</span> </a> to

<a href="{$link->getLanguageLink($language.id_lang)|escape:'html':'UTF-8'}" title="{$language.name|escape:'html':'UTF-8'}" rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}"> <span><img alt="{$language.iso_code}" height="11" span="" src="{$img_lang_dir}{$language.id_lang}.jpg" width="16" /> {$language.name|regex_replace:"/\s\(.*\)$/":""}</span> </a>

result

0_1538514500490_e1a2d678-723e-43f2-9284-d4948b9deefa-image.png

i played a little bit with the code for blockcurrency community-theme-default / modules / blockcurrencies / blockcurrencies.tpl

i changed this

{l s='Currency: %s' sprintf=[$current_iso] mod='blockcurrencies'} <span class="caret"></span> to {l s='Currency: %s' sprintf=[$current_iso] mod='blockcurrencies'} <img src="../../img/l/{$f_currency.id_currency}.jpg" alt="" class="currency_flag" /><span class="caret"></span>

and this <a href="javascript:setCurrency({$f_currency.id_currency});" rel="nofollow" title="{$currency_name}"> {$currency_name} </a> to

<a href="javascript:setCurrency({$f_currency.id_currency});" rel="nofollow" title="{$currency_name}"> <img src="../../img/l/{$f_currency.id_currency}.jpg" alt="" class="currency_flag" /> <span class="currency_text">{$f_currency.sign}</span> </a>

result

0_1538515636317_6b5517ba-af8d-46c5-a8f1-3403d41a835a-image.png

if you do not want the text (iso code) etc, delete the snippets or comment out. i have not tried these changes with countries and same currency etc. use at your own risk.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...