Removing the active language I'm having some trouble with removing the active language from the Language Switcher Dropdown module. I'm trying to override theme_languageicons_icon() with the following code, but it doesn't seem to work.

function themename_languageicons_icon(&amp;$variables) {
  global $language;

  foreach ($variables as $varKey =&gt; $value) {
    if ($variables['language']-&gt;language == $language-&gt;language) {
      unset($variables[$varKey]);
      break;    
    }
  }

  return theme('links', $variables);
}


Do you have any idea on how to achieve this? I don't want to disable the active language using CSS since I'm having different style properties for the first-child and last-child of the list.
For a similar problem (removing the language switch links for non-translated equivalent pages), I've implemented hook_language_switch_links_alter() in my theme.

Although I haven't tried it out myself, I think the code example will point you in the right direction. Instead of setting an 'active-language' class attribute, you can unset the link.

function mymodule_language_switch_links_alter(array &amp;$links, $type, $path) {
  global $language;

  if ($type == LANGUAGE_TYPE_CONTENT &amp;&amp; isset($links[$language-&gt;language])) {
    foreach ($links[$language-&gt;language] as $link) {
      $link['attributes']['class'][] = 'active-language';
    }
  }
}