I know how to theme the flags for the language switcher in 5x, but something has changed and I can't find the theme function in the new module.

The old function that I altered to remove the unordered list and the text was like this:

function phptemplate_i18n_link($text, $target, $lang, $query= NULL, $fragment = NULL){
$attributes = ($lang == i18n_get_lang()) ? array('class' => 'active') : NULL;
$output .= l(theme('i18n_language_icon', $lang), $target, $attributes, $query, $fragment, FALSE, TRUE);
return $output;
}

Does anyone know how to go about changing this in 6x?

Comments

PixelClever’s picture

I found a solution that works for me. It seems that the function that handles this is now called theme_languageicons_place and can be over riden in the standard template.php fashion. I still haven't found a way to remove the actual list, but with the text gone I can style the list as needed.

function yourthemename_languageicons_place($text, $icon, $separator = ' ') {
switch(variable_get('languageicons_placement', 'before')) {
case 'after':
return $text . $separator . $icon;
case 'replace':
return $icon;
case 'before':
default:
return $icon;
}
}

jose reyero’s picture

Project: Internationalization » Language Icons

Moved to a different package

Freso’s picture

Status: Active » Fixed

The list isn't created by Language Icons, but by theme('links', $links, array()) in locale.module's locale_block(). However, as you seem to have figured out a way to theme it to your needs (even if you haven't been able to get rid of the list), I'm marking the issue as "fixed".

myDRU’s picture

Ok, in locale.module's locale_block function call theme('links', $links, array()) creates the list for the language switcher block.
But where is the list created for the language switcher links that appear at the bottom of each node? I would like to get rid of them, as the same info appears twice now.

Freso’s picture

@myDRU: Please open a separate support request when you have a new question. Also, as your question isn't pertaining to Language Icons but to core's locale, please make sure you file it the proper place.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.