i'm using taxonomy_menu module for navigation in my website.
the menu items's link url generated by taxonomy_menu module is in the form of 'taxonomy_menu/1/1'
when i apply the i18n module,it adds a language prefix to the url in the form of 'en/taxonomy_menu/1/1',then when i swith to another language of the page in i18n block,the url will be 'zh-han_chs/taxonomy_menu/1/1',it doesn't work even though i have set a translation for the term in i18n
so i add a litter code in the function theme_menu_item_linkin the menu.inc

function theme_menu_item_link($item, $link_item) {
	$pattern           = "{taxonomy_menu.*/}";
	$replace           = "taxonomy/term/";
	$link_item['path'] = preg_replace($pattern , $replace ,$link_item['path']);
       return l($item['title'], $link_item['path'], array_key_exists('description', $item) ? array('title' => $items['description']) : array());
}

then everything looks fine,except that when i enter a parent term in the menu,it doesn't change to the expaned status and the child terms doesn't show in sub-menu as usual.
i think maybe the change i did to the theme_menu_item_link() function cause the taxonmy_menu module can't get taxonomy tree correctly.i don't know how ,so i need your help,thank you.

Comments

brmassa’s picture

Status: Active » Closed (fixed)