API to localize a path? I'm searching for a way to get all localized paths for one path.

For non-content pages this is quite simple:

foreach (language_list() as $language)
  $paths[$language-&gt;language] = url(current_path(), array('language' =&gt; $language));
}


For content pages (node, taxonomy, …) the path might be completely different and things like translation_path_get_translations() seem more like what I need.

Is there a reliable way to get paths to all translations of a page that works whether it's a content-page or not? It feels like there has to be an API-function for that.
I finally found out about language_negotiation_get_switch_links($type,$path). The tricky part is the $type argument. The types are defined by implementations of hook_language_types_info() and at least for my setup $type = 'language' does the trick.