Altering markup of language switcher I want to lightly alter the language switcher block's markup by adding additional classes, among others "clearfix" to clear the floats. I cannot however pin down where the markup is created.

This link http://drupal.org/node/1369090 (last post) suggests using template.php but again, I cannot see how I would alter the wrapper div's markup.

Is there any way to achieve this?
In D7, the language switcher block is created in locale_block_view():

function locale_block_view($type) {
  if (drupal_multilingual()) {
    $path = drupal_is_front_page() ? '&lt;front&gt;' : $_GET['q'];
    $links = language_negotiation_get_switch_links($type, $path);

    if (isset($links-&gt;links)) {
      drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css');
      $class = "language-switcher-{$links-&gt;provider}";
      $variables = array('links' =&gt; $links-&gt;links, 'attributes' =&gt; array('class' =&gt; array($class)));
      $block['content'] = theme('links__locale_block', $variables);
      $block['subject'] = t('Languages');
      return $block;
    }
  }
}


You can use hook_block_view_alter() to modify the markup of the block.

If you want modify the output of the links, you can override the theme_links() function in your theme using THEME_links__locale_block() in the template.php file.