I noticed that breadcrumb isn't translated when node/% page is overriden by ctools/panels.
This happens because hook_node_view is not invoked when overriding node view with panels.
In this issue's comments (https://www.drupal.org/node/1606912#comment-8318685) hook_ctools_render_alter is used to overcome this.
Maybe the following code can be added so that hook_node_view will be invoked or called and the breadcrumb will be translated.
(I'm not sure if calling or invoking the hook is preferred and why, but both worked for me)
/**
* Implements hook_ctools_render_alter().
*
* Used to invoke/call i18n_book_navigation_node_view in case the node_view page is overriden from ctools page manager.
*/
function i18n_book_navigation_ctools_render_alter(&$info, &$page, &$context) {
$task = $context['task'];
if(($task['task type'] = 'page') && ($task['name'] == 'node_view')) {
$data = array_values($context['contexts']);
module_invoke('i18n_book_navigation', 'node_view',$data[0]->data,'full');
// i18n_book_navigation_node_view($data[0]->data,'full');
}
}
Comments
Comment #1
zekvyrin commentedComment #2
wadmiraal commentedIt's on dev. Thanks for the patch.