diff --git a/globalredirect.module b/globalredirect.module index 8f24754..1b304dc 100644 --- a/globalredirect.module +++ b/globalredirect.module @@ -159,6 +159,12 @@ function globalredirect_init() { // Change the global $language's prefix, to make drupal_goto() // follow the proper prefix $options['language'] = $language = $all_languages[$node->language]; + // We need to make sure that we pass the correct prefix in the + // $options. Hint: In Drupal's default language the prefix can be + // left blank. + $language_list = language_list(); + $target_language_prefix = $language_list[$node->language]->prefix; + $options['prefix'] = $target_language_prefix; globalredirect_goto('node/' . $node->nid . $matches[2], $options); } }