Page 1 of 1
Show language flag and text link
Posted: Mon Feb 15, 2010 10:21 am
by netzmelone
Hi,
this might be a rather stupid question, but it puzzles me if there is an easy way to show the flag AND the text link for switching languages or if I have to do it myself via CSS.
As far as I see it you can either show the flag (default) or the text link (text="true"). Is there a way to show both?
Thanks
Re: Show language flag and text link
Posted: Thu Feb 25, 2010 1:25 pm
by Peciura
How exactly do you want them to appear and work ?
Re: Show language flag and text link
Posted: Fri Mar 05, 2010 12:36 pm
by netzmelone
Just the flag beside the text link for example.
The questions is more, if there is a general option like a tag for the {lang} option that enables the display of both, text and flag.
Thanks
Re: Show language flag and text link
Posted: Fri Mar 05, 2010 8:49 pm
by Peciura
There is no option to show both flags and text. But i am pretty sure it can be done with couple of "regex_replace".
If you have 2 flags like
Code: Select all
<div id='language'>{lang}</div>
{*
<div id="language">
<a lang="en" xml:lang="en" href="http://www.lvjc.lt/index.php?page=lvjc-naujienos&hl=en_US">
<img title="English" alt="English" style="border: 0pt none ; opacity: 0.5;" src="http://www.lvjc.lt/uploads/lang/en_US.png">
</a>
<span lang="lt" xml:lang="lt">
<img title="Lietuviškai" alt="Lietuviškai" style="border: 0pt none ; opacity: 1;" src="http://www.lvjc.lt/uploads/lang/lt_LT.png">
</span>
</div>
*}
Code: Select all
<div id='language'>
{capture assign='temp'}{lang}{/capture}
{$temp|regex_replace:'/US.png".*?\/>/':'US.png"/> EN'|regex_replace:'/LT.png".*?\/>/':'LT.png"/> LT'}
</div>