function theme_i18n_link in Internationalization 5.2
Same name and namespace in other branches
- 5.3 i18n.module \theme_i18n_link()
- 5 i18n.module \theme_i18n_link()
Produces a language link with the right flag
3 theme calls to theme_i18n_link()
- i18n_get_links in ./
i18n.module - Function i18n_get_links
- theme_translation_link in translation/
translation.module - Theme a link for a translation
- translation_get_links in translation/
translation.module - Returns an array of links for all languages
File
- ./
i18n.module, line 664 - Internationalization (i18n) module
Code
function theme_i18n_link($text, $target, $lang, $query = NULL, $fragment = NULL) {
$output = '<span class="i18n-link">';
$attributes = $lang == i18n_get_lang() ? array(
'class' => 'active',
) : NULL;
$output .= l(theme('i18n_language_icon', $lang), $target, $attributes, $query, $fragment, FALSE, TRUE);
$output .= " ";
$output .= l($text, $target, $attributes, $query, $fragment, FALSE, TRUE);
$output .= '</span>';
return $output;
}