diff --git a/core/includes/locale.inc b/core/includes/locale.inc
index 4cd0c59..02b996a 100644
--- a/core/includes/locale.inc
+++ b/core/includes/locale.inc
@@ -340,7 +340,7 @@ function locale_language_url_fallback($language = NULL, $language_type = LANGUAG
   // the default one, otherwise we fall back to an already detected language.
   $domains = locale_language_negotiation_url_domains();
   $prefixes = locale_language_negotiation_url_prefixes();
-  if (($prefix && empty($prefixes[$default->language])) || (!$prefix && empty($domains[$default->language]))) {
+  if ((($prefix && empty($default->prefix)) || (!$prefix && empty($default->domain))) && language_negotiation_get($language_type, LOCALE_LANGUAGE_NEGOTIATION_URL)) {
     return $default->language;
   }
   else {
diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test
index 0e801c1..c049746 100644
--- a/core/modules/translation/translation.test
+++ b/core/modules/translation/translation.test
@@ -17,10 +17,10 @@ class TranslationTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('locale', 'translation', 'translation_test');
+    parent::setUp('locale', 'path', 'translation', 'translation_test');
 
     // Setup users.
-    $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages', 'translate content'));
+    $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages', 'translate content', 'administer url aliases', 'create url aliases'));
     $this->translator = $this->drupalCreateUser(array('create page content', 'edit own page content', 'translate content'));
 
     $this->drupalLogin($this->admin_user);
@@ -57,6 +57,60 @@ class TranslationTestCase extends DrupalWebTestCase {
     $this->drupalLogin($this->translator);
   }
 
+  function testTranslationAlias() {
+    // Create Basic page in English.
+    $node_title = $this->randomName();
+    $node_body =  $this->randomName();
+    $node = $this->createPage($node_title, $node_body, 'en');
+
+    // Submit translation in Spanish.
+    $node_translation_title = $this->randomName();
+    $node_translation_body = $this->randomName();
+    $node_translation = $this->createTranslation($node, $node_translation_title, $node_translation_body, 'es');
+
+    // Login as admin to create aliases.
+    $this->drupalLogin($this->admin_user);
+
+    // Create a path alias in default language (English).
+    $path = 'admin/config/search/path/add';
+    $translated_path = $this->randomName(8);
+    $prefix = 'es';
+    $edit = array(
+      'source'   => 'node/' . $node_translation->nid,
+      'alias'    => $translated_path,
+      'language' => $prefix,
+    );
+    $this->drupalPost($path, $edit, t('Save'));
+
+    // Get translated node alias path, with the path prefix.
+    $this->drupalGet($prefix . '/' . $translated_path);
+    $this->assertText($node_translation->title, t('Translated node alias works with path prefix.'));
+
+    // Enable session detection, disable url detection, this is how url
+    // detection works.
+    $edit = array(
+      'language[enabled][locale-session]' => TRUE,
+      'language[enabled][locale-url]' => FALSE,
+      'language[weight][locale-session]' => -10,
+    );
+    $this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
+
+    // Switch language by passing language parameter, this is how session
+    // detection works.
+    $this->drupalGet('<front>', array('query' => array('language' => $prefix)));
+
+    // Get translated node alias.
+    $this->drupalGet($translated_path);
+    $this->assertText($node_translation->title, t('Translated node alias works with session.'));
+
+    // Get the english node to check the translated node link.
+    $this->drupalGet('node/' . $node->nid);
+
+    // Test if the alias of the translated node switch link exist.
+    $elements = $this->xpath('//a[@href=:href and .=:title]', array(':href' => url($translated_path), ':title' => 'Español'));
+    $this->assertTrue(!empty($elements), t('Translated node switch link has the alias as the href.'));
+  }
+
   /**
    * Create a basic page with translation, modify the basic page outdating
    * translation, and update translation.
