Closed (duplicate)
Project:
Context
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2012 at 12:21 UTC
Updated:
28 Apr 2012 at 11:12 UTC
Hi @all,
I just mentioned that the breadcrumb reaction plugin does not respect menu link languages when the i18n_menu module is installed.
Instead of
$result = db_select('menu_links')
->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
->condition('hidden', 0)
->condition('link_path', $path)
->execute();
Something like this should be used:
$result = db_select('menu_links')
->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
->condition('hidden', 0)
->condition('link_path', $path);
// New code
if (module_exists('i18n_menu') {
$result->condition('language', array(LANGUAGE_NONE, $GLOBALS['language']->language), 'IN');
}
// New code [END]
$result->execute();
Another solution would be to add a tag to the query, so the i18n module may alter the SQL properly.
Thanx in advance & cheers
hctom
Comments
Comment #1
plach#1119596: Breadcrumb Reaction : Translate the title on multilingue website