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
Show language flag and text link
-
- New Member
- Posts: 5
- Joined: Thu Dec 03, 2009 7:01 pm
-
- New Member
- Posts: 5
- Joined: Thu Dec 03, 2009 7:01 pm
Re: Show language flag and text link
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
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
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
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>