Forums / Setup & design / How to show Language Flags?
Neo Pixel
Friday 17 April 2009 4:25:57 am
Can anyone tell me how to show language flag images instead of the text "eng" "fra" etc
Thanks in advance :-)
Asking stupid questions so you don't have to!
Floris van den Hoeven
Thursday 13 May 2010 1:19:59 pm
Hi,
I could not find a good solution as well.. and therefore I tried something out myself.
I know this is not the cleanest code,.. but maybe it can be useful you and someone else.
Please go to EXTENSION/EZWEBIN/DESIGN/EZWEBIN/TEMPLATES/Then edit the file PAGE_HEADER_LANGUAGES.TPL
Then replace the complete code with the code below:
<div id="languages"> {def $lang='eng-US'} <a href={concat('index.php/',$lang|extract_left(3)|downcase())|ezroot}> <img src={$lang |flag_icon} alt="{$lang}" title="{$lang}"/> </a> {def $lang='ger-DE'} <a href={concat('index.php/',$lang|extract_left(3)|downcase())|ezroot}> <img src={$lang |flag_icon} alt="{$lang}" title="{$lang}"/> </a> {def $lang='fre-FR'} <a href={concat('index.php/',$lang|extract_left(3)|downcase())|ezroot}> <img src={$lang |flag_icon} alt="{$lang}" title="{$lang}"/> </a> {def $lang='esl-ES'} <a href={concat('index.php/',$lang|extract_left(3)|downcase())|ezroot}> <img src={$lang |flag_icon} alt="{$lang}" title="{$lang}"/> </a> {def $lang='dut-NL'} <a href={concat('index.php/',$lang|extract_left(3)|downcase())|ezroot}> <img src={$lang |flag_icon} alt="{$lang}" title="{$lang}"/> </a></div>
I hope this helps.. and I hope that someone could make this a bit more easier to do or generate it automatically.Having a nice option in Exponential (Graphical or Text-based links) would be a nice idea as well I think.
Greetings,Floris.