diff --git a/intlinks_title_filter.inc b/intlinks_title_filter.inc
index faf2d9c..4038dd3 100644
--- a/intlinks_title_filter.inc
+++ b/intlinks_title_filter.inc
@@ -60,14 +60,30 @@ function intlinks_get_node_title_from_nid($nid) {
  *   and/or URL path alias if link passed was, e.g. <a href="/node/123">.
  */
 function _intlinks_title_process_link($matches) {
+    
   if (($matches[2][0] != "/") && ($matches[2][0] != '.')) {
     // Do nothing if the link is not internal (root rel or doc rel).
     return $matches[0];
     // All links *should* be root relative.
   }
+  
 
   $trimmed_path = ltrim($matches[2], "/");
   $path_parts = explode("#", $trimmed_path);
+  
+
+  // Added to get the current node language
+  $node_lang = '';
+  $node_prefix = '';
+  if ($node_id = intlinks_is_node_path($path_parts[0])) {
+      $node = node_load($node_id);
+    if($node){
+        $languages = language_list();
+        $node_lang = $node->language;
+        $node_prefix = $languages[$node->language]->prefix;
+    }
+  }
+  
 
   // If an HTML title attribute already exists...
   if (strpos($matches[1], 'title=') !== FALSE) {
@@ -82,17 +98,17 @@ function _intlinks_title_process_link($matches) {
        // The 2nd part of a normal Drupal path is the node id.
       if ($node_id = intlinks_is_node_path($path_parts[0])) {
         $node_path = 'node/' . $node_id;
-         // Get alias, if one exists; otherwise, keep path as-is.
-        $path = drupal_get_path_alias($node_path);
+        // Get alias, if one exists; otherwise, keep path as-is.        
+        //edited to manage the lang prefix
+        $path = drupal_get_path_alias($node_path, $node_lang);
         $insert_path = '/' . check_plain($path);
         // Exploding around '#' produces 2-element array for paths w/ anchors.
         if (count($path_parts) == 2) {
           $anchor = $path_parts[1];
           $insert_path .= '#' . $anchor;
         }
-        // Insert the path alias into the link and return
-        return preg_replace('%href="([^"]+?)"%', 'href="' .
-          $insert_path . '"', $matches[0]);
+        // Insert the path alias into the link and return        
+        return preg_replace('%href="([^"]+?)"%', 'href="' . ((empty($node_prefix)) ? '' : $node_prefix . '/') . $insert_path . '"', $matches[0]);
       }
       // Path starts with 'node/', but isn't a proper Drupal "normal path".
       // Return such links, unchanged.
@@ -158,14 +174,18 @@ function _intlinks_title_process_link($matches) {
      // But, better safe than sorry: Give it a proper test.
       if ($node_id = intlinks_is_node_path($matches[2])) {
         $node_path = 'node/' . $node_id;
-        $path = drupal_get_path_alias($node_path);
+        //edited to manage the lang prefix
+        $path = drupal_get_path_alias($node_path, $node_lang);
         $node_title = intlinks_get_node_title_from_nid($node_id);
         if ($node_title === FALSE) {
           // Terminate. Something is wrong; all nodes should have titles.
           return $matches[0];
         }
         $insert_title = ' title="' . check_plain($node_title) . '"';
-        $insert_path = '/' . check_plain($path);
+        
+        //edited to manage the lang prefix
+        $insert_path = '/' . ((empty($node_prefix)) ? '' : $node_prefix . '/') . check_plain($path);
+        
         // There is an anchor in the link if $path_parts array has 2 elements.
         if (count($path_parts) == 2) {
           $anchor = $path_parts[1];
