How to get work Internationalization module with l function?
There's no easy way to do this, but you can do something like this:

$nid = 22;
$node = node_load($nid);
if ($node) {
  $translations = translation_node_get_translations($node-&gt;tnid);
  $nid = isset($translations[$language-&gt;language]) ? $translations[$language-&gt;language]-&gt;nid : $nid;
}


Or use the Entity translation module, which relies on the ability of fields to have values in multiple languages and then the node id doesn't change.