You are here

function i18nBlocksTestCase::i18nTranslateBlock in Internationalization 7

Translate block fields to all languages

1 call to i18nBlocksTestCase::i18nTranslateBlock()
i18nBlocksTestCase::testBlockTranslation in i18n_block/i18n_block.test

File

i18n_block/i18n_block.test, line 126
Test case for multilingual blocks

Class

i18nBlocksTestCase
@file Test case for multilingual blocks

Code

function i18nTranslateBlock($block) {
  $translations['title'] = $this
    ->createStringTranslation('blocks', $block['title']);
  $translations['body'] = $this
    ->createStringTranslation('blocks', $block['body']);
  return $translations;
}