Changing __switch_lang_block__ layout

hi i would like to change my  __switch_lang_block__ layout.

i want to have the lyout show the flag AND the language name next to it.can anyone tell me the files i need to change and how i change them? thank

English English

Like above.

Japanese Japanese

Quote · 23 Oct 2008

Hello!

It can be done via editing function getLangSwitcher() function in inc/languages.inc.php file

Regards

Quote · 23 Oct 2008

hi leon,

thanks for your help! thats what i was looking for.


i was wondering if you can give me a little more help.

so far i have

foreach( $aLangs as $sName => $sLang ) {
$sTitle = htmlspecialchars( substr( $sLang, 0, -2 ) );
$sFlag  = $site['flags'] . substr( $sLang, -2 ) . '.gif';

if( $sCurrentLanguage == $sName ) {
$sRet .= '
<img class="lang_selected" src="' . $sFlag . '" alt="' . $sTitle . '" title="' . $sTitle . '" />';
} else {
$sLink = $sCurLink . 'lang=' . $sName;
$sRet .= <<<EOF
<a href="{$sLink}" title="{$sTitle}">
<img class="lang_not_selected" src="{$sFlag}" alt="{$sTitle}" title="{$sTitle}" /></a>&nbsp;<a href="{$sLink}" title="{$sTitle}">$sTitle</a>
EOF;

this gives me the unused language name but as im new to php i dont know the syntax for the used language.

i believe i should change

$sRet .= '
<img class="lang_selected" src="' . $sFlag . '" alt="' . $sTitle . '" title="' . $sTitle . '" />';

but im not sure to what. any suggestions?

thanks again,

gareth

Quote · 24 Oct 2008

hi leon!

update - its ok! i got it i was missing a ' so i kept getting an error but no problem.

for anyone else like me who is new to this im using

<img class="lang_selected" src="' . $sFlag . '" alt="' . $sTitle . '" title="' . $sTitle . '" /> '. $sTitle .'';

this seems to work.

cheers

gareth

Quote · 24 Oct 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.