--- globalredirect.module	2007-04-29 14:50:46.000000000 +0200
+++ globalredirect.module.new	2007-10-10 16:39:16.000000000 +0200
@@ -30,7 +30,7 @@
     }
 
     // Get the request string (minus trailing slash e.g. node/123/)
-    $request = preg_replace('/\/$/', '', $_REQUEST['q']);
+    $request = trim($_REQUEST['q'], '/');
     
     // Check the path (eg, node/123) for an alias. If one is found, redirect.
     if ($alias = drupal_get_path_alias($request)) {
@@ -44,5 +44,13 @@
         drupal_goto($request, $query_string, NULL, 301);
       }
     }
+    
+    if(function_exists('i18n_get_normal_path')) {
+      $path = i18n_get_normal_path($request);
+      $alias = drupal_get_path_alias($path);
+      if($alias && $alias != $request) {
+            drupal_goto($alias, $query_string, NULL, 301);
+      }
+    }
   }
 }
