Hey guys,
Sometimes we created the themes template in drupal 7 and we need to render custom blocks and views block to display proper diversion, but I face a problem to render block in multilingual site it show the same in both languages.
So I found the solution, hopes it helps to other also
$block_id = 2;
$block = block_block_view($block_id);
$block['content'] = i18n_string(array('blocks', 'block', $block_id, 'body'), $block['content']);
print render($block['content']);
Just need to update the $block id with yours.
- Log in to post comments