hook_translation_link_alter
- Versions
- 6
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.
Return value
None.
Related topics
Code
developer/hooks/core.php, line 2456
<?php
function hook_translation_link_alter(&$links, $path) {
global $language;
if (isset($links[$language])) {
foreach ($links[$language] as $link) {
$link['attributes']['class'] .= ' active-language';
}
}
}
?>Login or register to post comments 