Show language flag and text link

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
netzmelone
New Member
New Member
Posts: 5
Joined: Thu Dec 03, 2009 7:01 pm

Show language flag and text link

Post 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
Peciura

Re: Show language flag and text link

Post by Peciura »

How exactly do you want them to appear and work ?
netzmelone
New Member
New Member
Posts: 5
Joined: Thu Dec 03, 2009 7:01 pm

Re: Show language flag and text link

Post 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
Peciura

Re: Show language flag and text link

Post 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>
Locked

Return to “[locked] CMSMS MLE fork”