So if I add the core 'menu' block to my page depending on what language I'm viewing the page in the menu items will change (i.e. only English menu items will show when viewing the English page, German items for the German page.) All works as it should!

However if add a 'menu block' block to my page it will always display the menu items of all language no matter what language I am viewing. So you'll see both England and German links when viewing the English or German page.

If core handles this correctly I assume the issue is within this module somewhere?

Cheers

Comments

jdelaune’s picture

Status: Active » Needs review

Found the issue. Sorry I don't have GIT on my laptop so can't produce a patch at the moment. But lines 278-281 on menu_block.module need to be changed to:

  // Localize the tree.
  if (module_exists('i18n_menu')) {
    $tree = i18n_menu_localize_tree($tree);
  }
jdelaune’s picture

Status: Needs review » Closed (fixed)

Well looks like this is fixed on GIT so I'll close this :)

Ludo.R’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active

It seems it has not been implemented well.
In menu_block.module (lines 278-281) :

  // Localize the tree.
  if (module_exists('i18nmenu')) {
    i18nmenu_localize_tree($tree);
  }

But the "Menu translation" module name is i18n_menu.

So it should be (as jdelaune says) :

  // Localize the tree.
  if (module_exists('i18n_menu')) {
    $tree = i18n_menu_localize_tree($tree);
  }

I think the 18n modules names have changed since Drupal 6.x

jdelaune’s picture

Status: Active » Fixed

#1114722: i18n support is broken

This was fixed back on the 15th May?

Ludo.R’s picture

Oh ok, but it hasn't been released yet in a stable version.
Last version (2.2) has been released 2011-Mar-09.

I think I will patch the module myself, until a stable version is released.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.