@KK
What if I want to display different names for <li> elements in #lang_selector?
I have that code in lang_switcher.html
but it shows me en/de/pl like I typed in config.
But I want full name like English/Polish.
In other places im using <cms:if but in this foreach I don't have idea how to achive that.
What if I want to display different names for <li> elements in #lang_selector?
I have that code in lang_switcher.html
- Code: Select all
<cms:php>
global $accepted_langs, $selected_lang;
foreach( $accepted_langs as $lang ){
$selected_class = ( $lang==$selected_lang ) ? ' selected' : '';
echo'<li class="'.$lang.$selected_class.'"><a href="<cms:show k_admin_link />switch.php?lang='.$lang.'&redirect='.urlencode($_SERVER["REQUEST_URI"]).'"><span>'.strtoupper($lang).'</span></a></li>';
}
</cms:php>
but it shows me en/de/pl like I typed in config.
But I want full name like English/Polish.
In other places im using <cms:if but in this foreach I don't have idea how to achive that.