Needs work
Project:
MultiBlock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2011 at 08:29 UTC
Updated:
13 Aug 2015 at 10:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Syd Barrett commentedTry the dev version http://drupal.org/project/multiblock .
Comment #2
wiliam_steven commentedI also have troubling in this translation, the multi block not working and not displaying anything.
Comment #3
TWD commentedStill a problem for any blocks with custom content.
If I create a new instance of such a block and click on "Translate" it only gives me the block Title field, the Body field is not shown.
Comment #4
tramm commentedI have to same problem as described in #3.
Comment #5
Jorge Navarro commentedSame problem. Subscribing.
Comment #6
aye mon commentedI also have problem as #3.
Comment #7
neddstark commentedyou have to translate the original block, then you need to patch the module so the multi block instance will render the translation:
after line 106:
$block = module_invoke($block_info->module, 'block_'. $op, $block_info->orig_delta);add the following line:
$block['content'] = i18n_string(array('blocks', 'block', $block_info->orig_delta, 'body'), $block['content']);This will take care to render the proper language content.
Comment #8
Jorge Navarro commented@neddstark After adding the line I get some errors and blocks disappear:
Comment #9
neddstark commented@Jorge Navarro
did you activated the translation for original block, and translated it? the instance should display the translation afterwards.
Comment #10
intrafusion@neddstark Please could you review the recent changes and supply a patch which can be tested, etc.
Comment #11
mstiem commentedHi,
because I went in the same issue, and could get a good result by adding this line code from comment #7 I created a patch. I hope that helps. Good for me so far
Comment #12
mstiem commentedHi,
after closer look to the default settings... and to prevent a fatal error if "i18n" not enabled.Here is a new patch which covers the normal case with no i18n.
Comment #13
mstiem commentedpatch created for the multilingual i18n translations
Comment #14
intrafusionThanks for your assistance, your patch has been committed.
Comment #17
intrafusionThis patch has broken the module as reported by #2541088: Views Exposed filter problem & #2550651: MultiBlock + Menu Block + String translation = Failure
Comment #19
gravisrs commentedIn #12
We should translate only blocks, that are from module block (as other modules should handle translations in their own way, and to avoid running i18n_string on html output from other blocks), am I right ?
So in patch at that line:
+ if (module_exists('i18n')) {I think we should use
+ if (module_exists('i18n') && $block['orig_module'] == 'block') {