function i18n_translation_link in Internationalization 7
Build translation link
File
- ./
i18n.module, line 574 - Internationalization (i18n) module.
Code
function i18n_translation_link($path, $langcode, $link = array()) {
$language = i18n_language_object($langcode);
$link += array(
'href' => $path,
'title' => $language->native,
'language' => $language,
'i18n_translation' => TRUE,
);
$link['attributes']['class'] = array(
'language-link',
);
// @todo Fix languageicons weight, but until that
if (function_exists('languageicons_link_add')) {
languageicons_link_add($link);
}
return $link;
}