Override locale_block_view in custom module In the locale.module file there is:

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;
    }
  }
}


I would like to alter this function in my custom module. I've created a custom module named custom (module is enabled). I've tried to alter the function with this function : hook_block_view.

But when I do that it doesn't work:

function other_block_view($delta = '')
{
    die;
}


Nothing happens ... . The module works because hook_block_view_alter works. But I need to change the $links variable in that other function .. .
I've fixed it like this:

function theme_links__locale_block(&amp;$variables) {
    $links = array();

    foreach($variables['links'] as $link)
    {
        $link['title'] = $link['language']-&gt;language;
        $links[] = $link;
    }

    $variables['links'] = $links;

    $content = theme_links($variables);
    return $content;
}