function lingotek_translated_menu_link_alter in Lingotek Translation 6
File
- ./
lingotek.module, line 308
Code
function lingotek_translated_menu_link_alter(&$item, $menu) {
global $language;
if ($item["menu_name"] != "navigation" && variable_get('lingotek_menu_overwrite', FALSE)) {
$nid = str_replace(str_replace("%", "", $item['router_path']), "", $item['link_path']);
$node = lingotek_get_node($language->prefix, $nid);
if ($node && $node->title != "") {
$item['href'] = str_replace("%", $node->nid, $item['router_path']);
$item['link_title'] = check_plain($node->title);
}
}
}