You are here

2 May 2012

Translate block title in Drupal 7 using this theme hook.

Source code viewer
  1. function THEME_block_view_alter(&$data, $block) {
  2. if($block->module == 'search') { // condition, so all block titles won't be translated
  3. $block->title = t($block->title);
  4. }
  5. }
Programming Language: PHP