How can I get the translated path to the current node? How to get path to current node but of another language?

Available languages:


English (URL prefix: en)
Polish (default, no URL prefix)


Enabled detection methods:


URL (by prefix)
Session (parameter: language)
Browser
Default


I created translation of taxonomy and translations of some basic page nodes. However, none of the following codes work.

drupal_get_path_alias(null, 'en')
drupal_get_normal_path('', 'en')
drupal_get_path_alias('hardcoded-existing-path', 'en')
url(current_path(), array('language'=&gt;'en'))


How to make it work? All internalization modules are enabled.
The problem is the lack of a language string / prefix for polish. By this URL detection is skipped. 

Look into locale_language_from_url() line 275

&lt;?php
 case LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX:
   // $_GET['q'] might not be available at this time, because
   // path initialization runs after the language bootstrap phase.
  list($language, $_GET['q']) = language_url_split_prefix(isset($_GET['q']) ? $_GET['q'] : NULL, $languages);
  if ($language !== FALSE) {
    $language_url = $language-&gt;language;
  }
 ?&gt;


If there is no language found in the URL is skips. Now the language detection is by session and so on. The only real option is that all languages you use have a prefix. The only real problem that than occurs is that the homepage would always redirect wich is not that nice for bots. But still better than fall back to language detection you don't want.

Besides that you could mode "default" just below "URL (prefix)" so Drupal won't use the session or the browser. But even this is not reliable from my experience.