Hi everyone!
I'm trying to add the localizer language switch directly to $primary_link variable.
Something like this:
$languages=localizer_block_switch_language_links(variable_get('localizer_switchblock_showflags', TRUE), variable_get('localizer_switchblock_showlangname',TRUE), variable_get('localizer_switchblock_flagseparator', ' ', FALSE));
foreach($languages as $i=>$link) {
echo $link;
}
$primary_links = $primary_links + array('traslation'=> Array('title'=>$language, 'href' => $link));
Of course this don't work...
The problem is that i can't extract url switcher from $link...
There is a localizer variable that contain the switcher url?
Comments
Comment #1
Giolf commentedOk, I read localizer documentation and then solved in this way.
Now it works, but localizer automatically add current language before $switch_url (that containt the right url to the current node translation)...How to disable this?
Comment #2
coworksbe commentedDisabling prefixes can be done in admin/settings/localizer - collapsible "language prefixes".