Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node/42 = pathalias_de (german version)
- node/43 = pathalias_en (english version)
- global $language;
- $translations = translation_path_get_translations("node/42");
- /*
- Returns the paths of all translations of a node, based on its Drupal path:
- array(2) {
- ["de"]=>string(7) "node/42"
- ["en"]=>string(7) "node/43"
- }
- */
- print l(t('Link Title'), $translations[$language->language]); //l() will return the alias to node/42
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement