Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.88
diff -u -p -r1.88 translation.module
--- modules/translation/translation.module	9 Oct 2010 17:38:41 -0000	1.88
+++ modules/translation/translation.module	12 Oct 2010 14:36:37 -0000
@@ -484,9 +484,17 @@ function translation_supported_type($typ
 function translation_path_get_translations($path) {
   $paths = array();
   // Check for a node related path, and for its translations.
-  if ((preg_match("!^node/([0-9]+)(/.+|)$!", $path, $matches)) && ($node = node_load((int)$matches[1])) && !empty($node->tnid)) {
-    foreach (translation_node_get_translations($node->tnid) as $language => $translation_node) {
-      $paths[$language] = 'node/' . $translation_node->nid . $matches[2];
+  if ((preg_match("!^node/(\d+)(/.+|)!", $path, $matches)) && ($node = node_load((int) $matches[1]))) {
+    $translations = translation_node_get_translations($node->tnid);
+    if (!empty($translations)) {
+      foreach ($translations as $language => $translation_node) {
+        $paths[$language] = 'node/' . $translation_node->nid . $matches[2];
+      }
+    }
+    elseif ($node->language != LANGUAGE_NONE) {
+      // If the current node has no translation but has a language assigned,
+      // return it.
+      $paths[$node->language] = 'node/' . $node->nid;
     }
   }
   return $paths;
@@ -499,12 +507,16 @@ function translation_path_get_translatio
  */
 function translation_language_switch_links_alter(array &$links, $type, $path) {
   $language_type = variable_get('translation_language_type', LANGUAGE_TYPE_INTERFACE);
-  if ($type == $language_type && $paths = translation_path_get_translations($path)) {
+  if ($type == $language_type && ($paths = translation_path_get_translations($path))) {
     $path = explode('/', $path);
     $node = node_load($path[1]);
     $translations = translation_node_get_translations($node->tnid);
     foreach ($links as $langcode => $link) {
-      if (isset($paths[$langcode]) && $translations[$langcode]->status) {
+      // For each available translation alter the link path to point to the
+      // corresponding node. If we have no translations and the current language
+      // (for the selected language type) differs from the node language we need
+      // to show one single switch link matching it.
+      if (isset($paths[$langcode]) && (empty($translations) || $translations[$langcode]->status)) {
         // Translation in a different node.
         $links[$langcode]['href'] = $paths[$langcode];
       }
