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

plach’s picture