The function translation_language_switch_links_alter() says it is an implementation of hook_language_switch_link_alter() in its doc header. Note that the function is links_alter, and the doc says link_alter, with no s. The doc is wrong, it should have an s.

Furthermore, the doc for the hook in locale.api.php is for
hook_language_switch_link_alter()
That is also wrong.

Verification that it should be links_alter:

 drupal_alter('language_switch_links', $result, $type, $path);

This is from function language_negotiation_get_switch_links() in includes/language.inc

Well. Another alternative would be to standardize on link and remove the s from all of those spots. Anyway, currently I would say it is a doc issue and the s should be added to the doc headers and hook doc that are currently missing the s.

CommentFileSizeAuthor
#1 675144.patch1.22 KBjhodgdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Status: Active » Needs review
FileSize
1.22 KB

Here's a patch that adds s to the hook name, to bring it into compliance with the actual code.

webchick’s picture

Status: Needs review » Fixed

Committed to HEAD, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.