Drupal, menu links multilanguage 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-&gt;language);
foreach($items as $item) {
   $alias = drupal_lookup_path('alias',$item-&gt;link_path,$item-&gt;language);


...

    if ($item-&gt;link_path == "http://"){
    $drawItems .= '&lt;li&gt;&lt;i&gt;'.$item-&gt;link_title.'&lt;/i&gt;';
   }else{
    if($alias == "/"){
        $drawItems .= '&lt;li&gt;&lt;a href="http://'.$_SERVER['HTTP_HOST'].'/" title="'.$item-&gt;link_title.'"&gt;'.$item-&gt;link_title.'&lt;/a&gt;';
    }else{
        $drawItems .= '&lt;li&gt;&lt;a href="http://'.$_SERVER['HTTP_HOST'].'/'.$alias.'" title="'.$item-&gt;link_title.'"&gt;'.$item-&gt;link_title.'&lt;/a&gt;';
    }
   }


...

}


Thank you for your advises.
I don't know what get_menu_weight() returns (it is not in the standard Drupal API, is it?), so the following is the answer for a general case in Drupal 7.

In short, as long as the menu item is linked to a node, and if the node has at least one translation, the following code should work to get a path-alias of the node for all the translatable languages:  

$hstpath = translation_path_get_translations('node/123');
array_walk($hstpath, function(&amp;$v, $k){$v = drupal_get_path_alias($v,$k);});


gives an associated aray like:  

Array(
  [en] =&gt; info/basic.html
  [fr] =&gt; info/basic.html
)


where both English (en) and French (fr) versions have the same path-alias of info/basic.html.

How to convert this path-string to a link to the node to view in the desired language depends on both your language-detection configuration and with which language environment you would like to display the node.

For example, if the URL with the path-alias is given the highest priority, then add the prefix of /fr/ to the French node (as long as French is not configured to be the default language with no path-prefix defined).  In addition, you may need to add base_path() at the head, if Drupal is not installed in the top directory of the website.

For a reference, a candidate answer to &quot;Menu links not being translated&quot; explains some basic for the Drupal menu with i18n.