hook_translation_link_alter

  1. drupal
    1. drupal6 core.php
    2. drupal7
Versionen
drupal6 hook_translation_link_alter(&$links, $path)
drupal7 hook_translation_link_alter(array &$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.

Übergabeparameter

$links Nested array of links keyed by language code.

$path The current path.

Rückgabewert

None.

Verwandte Themen

Code

modules/locale/locale.api.php, line 40

<?php
function hook_translation_link_alter(array &$links, $path) {
  global $language;

  if (isset($links[$language])) {
    foreach ($links[$language] as $link) {
      $link['attributes']['class'] .= ' active-language';
    }
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen