Skip to content

Instantly share code, notes, and snippets.

@feldmayer
Created August 16, 2012 13:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feldmayer/3370310 to your computer and use it in GitHub Desktop.
Save feldmayer/3370310 to your computer and use it in GitHub Desktop.
Drupal 7: Load block programmatically with i18n
<?php
$block_id = 2;
$block = block_block_view($block_id);
$block['content'] = i18n_string(array('blocks', 'block', $block_id, 'body'), $block['content']);
?>
@banoodle
Copy link

banoodle commented Nov 6, 2014

Thank you! This really helped me!

@bradsawicki
Copy link

Thanks!

@JPustkuchen
Copy link

Thank you very much 👍

@shuva-inno
Copy link

Thanks buddy....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment