[edited]
See #1 below - $query is ignored when re-generating target urls.

Comments

andy inman’s picture

Ok, I've tracked down what's going on. The hook is called at line 72:

drupal_alter('translation_link', $options, $path);

... but later the url is rebuilt, and ignores any query string that was added to the url. So, I'll call this a bug :)

Line 83:

$path = check_url(url($lang_option['href'], array('language' => $lang_option['language'], 'absolute' => TRUE)));

... needs to include the $query element:

      $path = check_url(url($lang_option['href'], array('language' => $lang_option['language'], 'query' => $lang_option['query'], 'absolute' => TRUE)));

Note the addition of 'query' => $lang_option['query']. A similar change is needed at line 80.

I'll produce a patch.

manfer’s picture

Status: Active » Closed (duplicate)

I can't see query in lang_option. To add query strings to the switcher follow http://drupal.org/node/1283948

manfer’s picture

Issue summary: View changes

Removed irrelevant info