A simple snippet based on theme_block() and t() functions. (Tested on Drupal 5.x, Zen subtheme).
- Copy and paste this code into your template.php:
function zen_block($block) {
$output = “<div class=\”block block-$block->module\” id=\”block-$block->module-$block->delta\”>\n”;
$output .= ” <h2 class=\”title\”>”.t($block->subject).”</h2>\n”;
$output .= ” <div class=\”content\”>$block->content</div>\n”;
$output .= “</div>\n”;
return $output;
} - Go to admin/settings/locale/string/search and search the title to translate from English to your localization language.


0 Responses to “Translate Drupal block titles”