diff --git a/core/lib/Drupal/Component/Utility/SortArray.php b/core/lib/Drupal/Component/Utility/SortArray.php
index a8d9f00..79688ec 100644
--- a/core/lib/Drupal/Component/Utility/SortArray.php
+++ b/core/lib/Drupal/Component/Utility/SortArray.php
@@ -93,34 +93,6 @@ public static function sortByTitleProperty($a, $b) {
    }
 
   /**
-   * Sorts a structured array firstly by weight, then by title.
-   *
-   * @param array $a
-   *   The first item to compare.
-   * @param array $b
-   *   The second item to compare.
-   * @param string $weight_key
-   *   (optional) The weight key to use. Defaults to 'weight'.
-   * @param string $title_key
-   *   (optional) The title key to use. Defaults to 'title'.
-   *
-   * @return int
-   *   The comparison result for uasort().
-   */
-  public static function sortByWeightAndTitleKey($a, $b, $weight_key = 'weight', $title_key = 'title') {
-    $a = (array) $a;
-    $b = (array) $b;
-
-    $weight_cmp = static::sortByKeyInt($a, $b, $weight_key);
-
-    if ($weight_cmp === 0) {
-      return static::sortByKeyString($a, $b, $title_key);
-    }
-
-    return $weight_cmp;
-  }
-
-  /**
    * Sorts a string array item by an arbitrary key.
    *
    * @param array $a
diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php
index d8df0cb..38553e4 100644
--- a/core/lib/Drupal/Core/Language/Language.php
+++ b/core/lib/Drupal/Core/Language/Language.php
@@ -206,12 +206,17 @@ public function setNegotiationMethodId($method_id) {
   /**
    * Sort language objects.
    *
-   * @param array $languages
+   * @param \Drupal\Core\Language\LanguageInterface[] $languages
    *   The array of language objects keyed by langcode.
    */
   public static function sort(&$languages) {
-    uasort($languages, function ($a, $b) {
-      return SortArray::sortByWeightAndTitleKey($a, $b, 'weight', 'name');
+    uasort($languages, function (LanguageInterface $a, LanguageInterface $b) {
+      $a_weight = $a->getWeight();
+      $b_weight = $b->getWeight();
+      if ($a_weight == $b_weight) {
+        return strnatcasecmp($a->getName(), $b->getName());
+      }
+      return ($a_weight < $b_weight) ? -1 : 1;
     });
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
index ed1357b..c2804e4 100644
--- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
@@ -314,106 +314,4 @@ public function providerSortByTitleProperty() {
     return $tests;
   }
 
-  /**
-   * Tests SortArray::sortByWeightAndTitleKey() input against expected output.
-   *
-   * @dataProvider providerTestSortByWeightAndTitleKey
-   *
-   * @param array $a
-   *   The first input item for comparison.
-   * @param array $b
-   *   The second item for comparison.
-   * @param integer $expected
-   *   The expected output from calling the method.
-   */
-  public function testSortByWeightAndTitleKey($a, $b, $expected) {
-    $result = SortArray::sortByWeightAndTitleKey($a, $b);
-    $this->assertEquals($expected, $result);
-  }
-
-  /**
-   * Data provider for testSortByWeightAndTitleKey.
-   *
-   * @return array
-   *   An array of test data.
-   */
-  public function providerTestSortByWeightAndTitleKey() {
-    $stdclass_title_1 = new \stdClass();
-    $stdclass_title_1->title = 'a';
-
-    $stdclass_title_2 = new \stdClass();
-    $stdclass_title_2->title = 'b';
-
-    $stdclass_weight_1 = new \stdClass();
-    $stdclass_weight_1->weight = 1;
-
-    $stdclass_weight_2 = new \stdClass();
-    $stdclass_weight_2->weight = 2;
-
-    $stdclass_weight_3 = clone $stdclass_weight_1;
-
-    return array(
-      array(
-        array(),
-        array(),
-        0
-      ),
-      array(
-        array('weight' => 1),
-        array('weight' => 2),
-        -1
-      ),
-      array(
-        array('weight' => 2),
-        array('weight' => 1),
-        1
-      ),
-      array(
-        array('title' => 'b', 'weight' => 1),
-        array('title' => 'a', 'weight' => 2),
-        -1
-      ),
-      array(
-        array('title' => 'a', 'weight' => 2),
-        array('title' => 'b', 'weight' => 1),
-        1
-      ),
-      array(
-        array('title' => 'a', 'weight' => 1),
-        array('title' => 'b', 'weight' => 1),
-        -1
-      ),
-      array(
-        array('title' => 'b', 'weight' => 1),
-        array('title' => 'a', 'weight' => 1),
-        1
-      ),
-      array(
-        array('title' => 'a'),
-        array('title' => 'b'),
-        -1
-      ),
-      array(
-        array('title' => 'A'),
-        array('title' => 'a'),
-        0
-      ),
-      array(
-        $stdclass_title_1,
-        $stdclass_title_2,
-        -1
-      ),
-      array(
-        $stdclass_weight_1,
-        $stdclass_weight_2,
-        -1
-      ),
-      array(
-        $stdclass_weight_1,
-        $stdclass_weight_3,
-        0
-      ),
-    );
-  }
-
 }
diff --git a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
index 100e5c0..02f3db5 100644
--- a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
@@ -7,8 +7,11 @@
 
 namespace Drupal\Tests\Core\Language;
 
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityType;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Language\LanguageInterface;
+use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -91,18 +94,32 @@ public function testGetNegotiationMethodId() {
   }
 
   /**
-   * Tests sorting an array of Language objects.
+   * Tests sorting an array of language objects.
    *
    * @covers ::sort()
    *
    * @dataProvider providerTestSortArrayOfLanguages
    *
-   * @param \Drupal\Core\Language\Language[] $languages
-   *   An array of \Drupal\Core\Language\Language objects.
+   * @param \Drupal\Core\Language\LanguageInterface[] $languages
+   *   An array of language objects: a mix of \Drupal\Core\Language\Language and
+   *   \Drupal\language\Entity\ConfigurableLanguage.
    * @param array $expected
    *   The expected array of keys.
    */
   public function testSortArrayOfLanguages(array $languages, array $expected) {
+    // Can not mock the entity type because accessing a mock entity type during
+    // the sort will cause the "uasort(): Array was modified by the user
+    // comparison function" PHP error.
+    $entityType = new EntityType(array('id' => 'rainbow', 'entity_keys' => array('id' => 'id', 'label' => 'label')));
+    $entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $entityManager->expects($this->any())
+      ->method('getDefinition')
+      ->with('configurable_language')
+      ->will($this->returnValue($entityType));
+    $container = new ContainerBuilder();
+    $container->set('entity.manager', $entityManager);
+    \Drupal::setContainer($container);
+
     Language::sort($languages);
     $this->assertSame($expected, array_keys($languages));
   }
@@ -126,16 +143,26 @@ public function providerTestSortArrayOfLanguages() {
     $language10B->setName('B');
     $language10B->setWeight(10);
 
+    $language8A = new ConfigurableLanguage(array('id' => 'hh'), 'configurable_language');
+    $language8A->setName('A');
+    $language8A->setWeight(8);
+
+    $language10C = new ConfigurableLanguage(array('id' => 'hh'), 'configurable_language');
+    $language10C->setName('C');
+    $language10C->setWeight(10);
+
     return array(
       // Set up data set #0, already ordered by weight.
       array(
         // Set the data.
         array(
+          $language8A->getId() => $language8A,
           $language9A->getId() => $language9A,
           $language10B->getId() => $language10B,
         ),
         // Set the expected key order.
         array(
+          $language8A->getId(),
           $language9A->getId(),
           $language10B->getId(),
         ),
@@ -144,9 +171,11 @@ public function providerTestSortArrayOfLanguages() {
       array(
         array(
           $language10B->getId() => $language10B,
+          $language10C->getId() => $language8A,
           $language9A->getId() => $language9A,
         ),
         array(
+          $language8A->getId(),
           $language9A->getId(),
           $language10B->getId(),
         ),
@@ -156,21 +185,25 @@ public function providerTestSortArrayOfLanguages() {
         array(
           $language10A->getId() => $language10A,
           $language10B->getId() => $language10B,
+          $language10C->getId() => $language10C,
         ),
         array(
           $language10A->getId(),
           $language10B->getId(),
+          $language10C->getId(),
         ),
       ),
       // Set up data set #3, tied by weight, out of order by name.
       array(
         array(
           $language10B->getId() => $language10B,
+          $language10C->getId() => $language10C,
           $language10A->getId() => $language10A,
         ),
         array(
           $language10A->getId(),
           $language10B->getId(),
+          $language10C->getId(),
         ),
       ),
     );
