I'm translating the site with my custom theme to another language. The problem is in menu links. On the original language they are fine, but with another one they are looks like "node/id". I've tried drupal_lookup_path with and without language, drupal_get_normal_path, drupal_get_path_alias but links are still the same.
I'm feeling like i've missed something in preference, but have no idea how to make links looks properly.
some code from my draw_menu function:
$items = get_menu_weight($menuName, $language->language);
foreach($items as $item) {
$alias = drupal_lookup_path('alias',$item->link_path,$item->language);
...
if ($item->link_path == "http://"){
$drawItems .= '<li><i>'.$item->link_title.'</i>';
}else{
if($alias == "/"){
$drawItems .= '<li><a href="http://'.$_SERVER['HTTP_HOST'].'/" title="'.$item->link_title.'">'.$item->link_title.'</a>';
}else{
$drawItems .= '<li><a href="http://'.$_SERVER['HTTP_HOST'].'/'.$alias.'" title="'.$item->link_title.'">'.$item->link_title.'</a>';
}
}
...
}
Thank you for your advises.