function theme_translation_node_link in Internationalization 5.3
Same name and namespace in other branches
- 5 translation/translation.module \theme_translation_node_link()
- 5.2 translation/translation.module \theme_translation_node_link()
Theme a link to node translation
Since Drupal 5, returns array instead of html
1 theme call to theme_translation_node_link()
- translation_link in translation/
translation.module - Implementation of hook_link().
File
- translation/
translation.module, line 1229
Code
function theme_translation_node_link($node, $lang, $baselang = NULL, $title = FALSE) {
$baselang = $baselang ? $baselang : $lang;
if ($title) {
$name = $node->title;
}
else {
$languages = i18n_languages('native');
$name = $languages[$lang];
}
return array(
'title' => $name,
'href' => i18n_path('node/' . $node->nid, $baselang),
);
}