Closed (fixed)
Project:
Language Icons
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2008 at 01:01 UTC
Updated:
14 Jul 2012 at 19:18 UTC
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
Comment #1
PixelClever commentedI 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;
}
}
Comment #2
jose reyero commentedMoved to a different package
Comment #3
Freso commentedThe list isn't created by Language Icons, but by
theme('links', $links, array())in locale.module'slocale_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".Comment #4
myDRU commentedOk, 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.
Comment #5
Freso commented@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.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.