I have drupal 6.x site with i18n and dhtml_menu
all items apear in the menu even when other language is active
for example when I am in the English site (example.com/en) , i see also the menu items that are marked as other language (*not* language natural items)

when i have switched to other theme without the dhtml_menu this worked fine

Thanks for the great module

Comments

avior’s picture

someone can help me with that ,
I am about to uninstall this great module because of that

avior’s picture

adding this code just before the end of the function dhtml_menu_theme_menu_item_link($link) {
solved my problem , hope this helps someone

  global $language;
  if(!empty($link['localized_options']['langcode'])
      &&isset($link['localized_options']['langcode'])&&
      $link['localized_options']['langcode']!=$language->language)
    return;
    
  
  // Pass the altered variables to the normal menu themer.
  return $function($link);

avior’s picture

Status: Active » Needs review

please add this code so people can review it

samalander’s picture

I added the code in #2 and it fixed that same issue with my site.

TommyChris’s picture

Version: 6.x-3.5 » 7.x-1.x-dev

I have the same issue but with D7. Can anybody help?

vuil’s picture

Version: 7.x-1.x-dev » 6.x-3.5
Issue summary: View changes
Status: Needs review » Fixed

I revert the issue to 6.x-3.5 version. It can not be reproduced on the 7.x-1.x-dev branch. And, I close it as Fixed. Thank you!

Status: Fixed » Closed (fixed)

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

vuil’s picture