Active
Project:
Localizer
Version:
5.x-3.0
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2008 at 21:22 UTC
Updated:
14 Mar 2008 at 17:41 UTC
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
Comment #1
kinaya commentedHi!
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
Comment #2
kinaya commentedAlright, 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"