Returns links to the current page with different langcodes.
Using #type causes these links to be rendered with l().
public function lActiveClass() {
// We assume that 'en' and 'fr' have been configured.
$languages = language_list();
return array(
'no_language' => array(
'#type' => 'link',
'#title' => t('Link to the current path with no langcode provided.'),
'#href' => current_path(),
'#options' => array(
'attributes' => array(
'id' => 'no_lang_link',
),
),
),
'fr' => array(
'#type' => 'link',
'#title' => t('Link to a French version of the current path.'),
'#href' => current_path(),
'#options' => array(
'language' => $languages['fr'],
'attributes' => array(
'id' => 'fr_link',
),
),
),
'en' => array(
'#type' => 'link',
'#title' => t('Link to an English version of the current path.'),
'#href' => current_path(),
'#options' => array(
'language' => $languages['en'],
'attributes' => array(
'id' => 'en_link',
),
),
),
);
}