Inicio › API reference ›
hook_translation_link_alter
hooks/core.php, line 2366
- Versions
- hooks
hook_translation_link_alter(&$links, $path)
Perform alterations on translation links.
A translation link may need to point to a different path or use a translated link text before going through l(), which will just handle the path aliases.
Parameters
$links Nested array of links keyed by language code.
$path The current path.
Valor de retorno
None.
Código
<?php
function hook_translation_link_alter(&$links, $path) {
global $language;
if (isset($links[$language])) {
foreach ($links[$language] as $link) {
$link['attributes']['class'] .= ' active-language';
}
}
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día