Hi.

I would like to make nodes and menus, which don't have a translation, not to be displayed.

The same thing i would like to achieve with Primary Links.

I don't use by hostname.

How can i do this with minimal changes in code.

Thanks in advance

Comments

kinaya’s picture

Hi!

I would really like to solve this as well. As it is now, all my untranslated pages are showing in the menu which doesn't look to proffessional...

I don't know php but wouldn't it be possible to hack menu.inc and tell it to only show menu items that exist in the current language?

thanks,
a

kinaya’s picture

Alright, A friend helped me find a solution.

Add this to localizermenu.module:

// START HACK
if(empty($translation['title']) && $lang != "sv") //
unset($_menu['items'][$mid]);
// END HACK

Add it in the function "function localizermenu_translate_all()", right after

$_menu['items'][$mid]['description'] = empty($translation['description']) ? $item['description'] : $translation['description'];

My default language is swedish, but i guess you can just change it to "en"