Posted by judgedrid on November 2, 2009 at 4:59pm
Jump to:
| Project: | Nice Menus |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
For some reason nice menus fail to filter menu items based on the current language and display all the items in the menu whatever language setting they have.
Comments
#1
Answering to my own question, i modified the code a bit to support the i18nmenu module
<?php
function theme_nice_menu_build($menu) {
$output = '';
foreach ($menu as $menu_item) {
if (module_exists(i18nmenu))
{
global $language;
$lang_match=($menu_item['link']['options']['langcode']==$language->language || $menu_item['link']['options']['langcode']=='');
}
$mlid = $menu_item['link']['mlid'];
// Check to see if it is a visible menu item.
if (($menu_item['link']['hidden'] == 0) AND $lang_match) {
?>
#2
This feature is added in the 2.x version (note that menu translation is not in core, so this is not a bug, but a feature.) #300628: Support menu translation (i18n)