Hi,

I was trying to translate a block field title, with no success.
If i translate the block in a regular way it works, but the block field seems to ignore me.

I've following this issue https://www.drupal.org/node/1402500, but is an old one and the version I'm using is the 7.x-2.10

What finally did was in ds.module, line 989 change

return '<h2 class="block-title">' . $block->subject . '</h2>' . $block->content;

for this

return '<h2 class="block-title">' . t($block->subject) . '</h2>' . $block->content;

After that a new string appears in admin/config/regional/translate/translate

Is there a clean way to translate block field titles? I don't like the idea of altering the module

thanks

Comments

bceyssens’s picture

Status: Active » Closed (works as designed)

I do not think this is a Display Suite bug. The block subject should be made translatable in its hook_block_view definition.

An example from the Devel module:
$block['subject'] = t('Switch user');