Customizing the ui locale switching block
Last modified: April 18, 2007 - 07:03
In a block with input format PHP add this code :
<?php
$languages=localizer_block_switchuilocale_links(variable_get('localizer_switchblock_showflags', TRUE), variable_get('localizer_switchblock_showlangname',TRUE), variable_get('localizer_switchblock_flagseparator', ' ', FALSE));
echo '<ul>';
foreach($languages as $i=>$link) {
echo '<li>' . $link . '</li>';
}
echo '</ul>';
?>The syntax of localizer_block_switchuilocale_links function is :
localizer_block_switchuilocale_links($flags=TRUE, $names=TRUE, $separator = ' ', $setcurrentactive)
$flags : show/hide the flags
$names : show /hide the languages names
$separator : separation text between flags and names
$setcurrentactive : highlights the current language