diff -up i18n.module i18n.module
--- i18n.module	2007-12-04 21:17:44.000000000 +0100
+++ i18n.module	2008-02-27 17:32:14.000000000 +0100
@@ -86,11 +86,8 @@ function i18n_init(){
     // Check for update or cron scripts to disable rewriting and redirection
     if(preg_match('|/(?!index\.php)\w+\.php|', request_uri())){
       i18n_selection_mode('off');
-    } elseif ($lang != i18n_default_language()) {
-      // Redirect to main page in $lang when it's not default language.
-      _i18n_goto($lang);
     } else {
-      $_GET['q'] = i18n_frontpage($lang);
+      _i18n_goto($lang);
     } 
   } elseif ($lang == $path) { // When path is only language code
     $_GET['q'] = i18n_frontpage($lang);
@@ -220,6 +217,11 @@ function i18n_nodeapi(&$node, $op, $teas
           i18n_selection_mode('node', $parent->language);
         } 
         break;
+      case 'view':
+        if ($node->language != i18n_get_lang_prefix(_i18n_get_original_path())) {
+          _i18n_goto(i18n_path(i18n_get_normal_path(_i18n_get_original_path()), $node->language));
+        }
+        break;        
       }
   }   
 }
@@ -912,6 +914,35 @@ function i18n_form_alter($form_id, &$for
 function i18n_perm() {
   return array('administer all languages');
 }
+
+/**
+ * Implementation of hook_token_values().
+ */
+function i18n_token_values($type, $object = NULL) {
+  $values = array();
+  switch ($type) {
+  case 'node':
+  case 'taxonomy':
+    $values['lang'] = i18n_node_get_lang($object->nid, '');
+    break;
+  }
+  return $values;
+}
+
+/**
+ * Implementation of hook_token_list().
+ */
+function i18n_token_list($type = 'all') {
+  $tokens = array();
+  if ($type == 'node' || $type == 'all') {
+    $tokens['node']['lang'] = t("Language code of the document.");
+  }
+  if ($type == 'taxonomy' || $type == 'all') {
+    $tokens['taxonomy']['lang'] = t("Language code of the document.");
+  }
+  return $tokens;
+}
+
 /**
  * Process menu and menu item add/edit form submissions.
  */
