diff --git a/core/includes/common.inc b/core/includes/common.inc
index 3d245a0..76c57f7 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -768,7 +768,7 @@ function l($text, $path, array $options = array()) {
   // Add a hreflang attribute if we know the language of this link's url and
   // hreflang has not already been set.
   if (!empty($variables['options']['language']) && !isset($variables['options']['attributes']['hreflang'])) {
-    $variables['options']['attributes']['hreflang'] = $variables['options']['language']->id;
+    $variables['options']['attributes']['hreflang'] = $variables['options']['language']->getId();
   }
 
   // Set the "active" class if the 'set_active_class' option is not empty.
@@ -1538,7 +1538,7 @@ function _drupal_add_js($data = NULL, $options = NULL) {
             'currentPath' => $current_path,
             'currentPathIsAdmin' => $current_path_is_admin,
             'isFront' => drupal_is_front_page(),
-            'currentLanguage' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->id,
+            'currentLanguage' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(),
           );
           if (!empty($current_query)) {
             ksort($current_query);
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 1268e12..c09b0ac 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1043,7 +1043,7 @@ function template_preprocess_links(&$variables) {
           $link_element['#options']['set_active_class'] = TRUE;
 
           if (!empty($link['language'])) {
-            $li_attributes['hreflang'] = $link['language']->id;
+            $li_attributes['hreflang'] = $link['language']->getId();
           }
 
           // Add a "data-drupal-link-query" attribute to let the
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 125907d..6889820 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -722,7 +722,7 @@ function update_language_list($flags = LanguageInterface::STATE_CONFIGURABLE) {
         $langcode = substr($langcode_config_name, strlen('language.entity.'));
         $info = \Drupal::config($langcode_config_name)->get();
         $languages[$langcode] = new Language(array(
-          'default' => ($info['id'] == $default->id),
+          'default' => ($info['id'] == $default->getId()),
           'name' => $info['label'],
           'id' => $info['id'],
           'direction' => $info['direction'],
@@ -734,7 +734,7 @@ function update_language_list($flags = LanguageInterface::STATE_CONFIGURABLE) {
     }
     else {
       // No language module, so use the default language only.
-      $languages = array($default->id => $default);
+      $languages = array($default->getId() => $default);
       // Add the special languages, they will be filtered later if needed.
       $languages += \Drupal::languageManager()->getDefaultLockedLanguages($default->weight);
     }
diff --git a/core/lib/Drupal/Core/Cache/LanguageCacheContext.php b/core/lib/Drupal/Core/Cache/LanguageCacheContext.php
index e2c1bd9..0a3f16c 100644
--- a/core/lib/Drupal/Core/Cache/LanguageCacheContext.php
+++ b/core/lib/Drupal/Core/Cache/LanguageCacheContext.php
@@ -45,7 +45,7 @@ public function getContext() {
     $context_parts = array();
     if ($this->languageManager->isMultilingual()) {
       foreach ($this->languageManager->getLanguageTypes() as $type) {
-        $context_parts[] = $this->languageManager->getCurrentLanguage($type)->id;
+        $context_parts[] = $this->languageManager->getCurrentLanguage($type)->getId();
       }
     }
     return implode(':', $context_parts);
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
index 0e071b8..693135d 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
@@ -189,7 +189,7 @@ protected function doLoadMultiple(array $ids = NULL) {
    */
   protected function doCreate(array $values) {
     // Set default language to site default if not provided.
-    $values += array('langcode' => $this->languageManager->getDefaultLanguage()->id);
+    $values += array('langcode' => $this->languageManager->getDefaultLanguage()->getId());
     $entity = new $this->entityClass($values, $this->entityTypeId);
 
     return $entity;
diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php
index b97f2e1..0b4f817 100644
--- a/core/lib/Drupal/Core/Datetime/DateFormatter.php
+++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php
@@ -133,7 +133,7 @@ public function format($timestamp, $type = 'medium', $format = '', $timezone = N
     }
 
     if (empty($langcode)) {
-      $langcode = $this->languageManager->getCurrentLanguage()->id;
+      $langcode = $this->languageManager->getCurrentLanguage()->getId();
     }
 
     // Create a DrupalDateTime object from the timestamp and timezone.
diff --git a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php
index 78b3f1c..2f07108 100644
--- a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php
+++ b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php
@@ -43,7 +43,7 @@ class DrupalDateTime extends DateTimePlus {
    */
   public function __construct($time = 'now', $timezone = NULL, $settings = array()) {
     if (!isset($settings['langcode'])) {
-      $settings['langcode'] = \Drupal::languageManager()->getCurrentLanguage()->id;
+      $settings['langcode'] = \Drupal::languageManager()->getCurrentLanguage()->getId();
     }
 
     // Instantiate the parent class.
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index e8df9c8..f4a6c65 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -588,7 +588,7 @@ public function language() {
   protected function setDefaultLangcode() {
     // Get the language code if the property exists.
     if ($this->hasField('langcode') && ($item = $this->get('langcode')) && isset($item->language)) {
-      $this->defaultLangcode = $item->language->id;
+      $this->defaultLangcode = $item->language->getId();
     }
 
     if (empty($this->defaultLangcode)) {
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
index f1a10ca..c1f68bf 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
@@ -91,7 +91,7 @@ public function getFormLangcode(FormStateInterface $form_state) {
       // Imply a 'view' operation to ensure users edit entities in the same
       // language they are displayed. This allows to keep contextual editing
       // working also for multilingual entities.
-      $form_state->set('langcode', $this->entityManager->getTranslationFromContext($this->entity)->language()->id);
+      $form_state->set('langcode', $this->entityManager->getTranslationFromContext($this->entity)->language()->getId());
     }
     return $form_state->get('langcode');
   }
@@ -100,7 +100,7 @@ public function getFormLangcode(FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function isDefaultFormLangcode(FormStateInterface $form_state) {
-    return $this->getFormLangcode($form_state) == $this->entity->getUntranslated()->language()->id;
+    return $this->getFormLangcode($form_state) == $this->entity->getUntranslated()->language()->getId();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityForm.php b/core/lib/Drupal/Core/Entity/EntityForm.php
index ee6c8b3..efdaafb 100644
--- a/core/lib/Drupal/Core/Entity/EntityForm.php
+++ b/core/lib/Drupal/Core/Entity/EntityForm.php
@@ -137,7 +137,7 @@ public function form(array $form, FormStateInterface $form_state) {
       // new entities.
       $form['langcode'] = array(
         '#type' => 'value',
-        '#value' => !$entity->isNew() ? $entity->language()->id : language_default()->id,
+        '#value' => !$entity->isNew() ? $entity->language()->getId() : language_default()->getId(),
       );
     }
     return $form;
@@ -273,7 +273,7 @@ public function save(array $form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function getFormLangcode(FormStateInterface $form_state) {
-    return $this->entity->language()->id;
+    return $this->entity->language()->getId();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index a2aedf3..eac9e88 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -335,7 +335,7 @@ public function getBaseFieldDefinitions($entity_type_id) {
     // Check the static cache.
     if (!isset($this->baseFieldDefinitions[$entity_type_id])) {
       // Not prepared, try to load from cache.
-      $cid = 'entity_base_field_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->id;
+      $cid = 'entity_base_field_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->getId();
       if ($cache = $this->cacheBackend->get($cid)) {
         $this->baseFieldDefinitions[$entity_type_id] = $cache->data;
       }
@@ -433,7 +433,7 @@ public function getFieldDefinitions($entity_type_id, $bundle) {
     if (!isset($this->fieldDefinitions[$entity_type_id][$bundle])) {
       $base_field_definitions = $this->getBaseFieldDefinitions($entity_type_id);
       // Not prepared, try to load from cache.
-      $cid = 'entity_bundle_field_definitions:' . $entity_type_id . ':' . $bundle . ':' . $this->languageManager->getCurrentLanguage()->id;
+      $cid = 'entity_bundle_field_definitions:' . $entity_type_id . ':' . $bundle . ':' . $this->languageManager->getCurrentLanguage()->getId();
       if ($cache = $this->cacheBackend->get($cid)) {
         $bundle_field_definitions = $cache->data;
       }
@@ -541,7 +541,7 @@ public function getFieldStorageDefinitions($entity_type_id) {
         }
       }
       // Not prepared, try to load from cache.
-      $cid = 'entity_field_storage_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->id;
+      $cid = 'entity_field_storage_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->getId();
       if ($cache = $this->cacheBackend->get($cid)) {
         $field_storage_definitions = $cache->data;
       }
@@ -680,7 +680,7 @@ public function getBundleInfo($entity_type) {
    */
   public function getAllBundleInfo() {
     if (empty($this->bundleInfo)) {
-      $langcode = $this->languageManager->getCurrentLanguage()->id;
+      $langcode = $this->languageManager->getCurrentLanguage()->getId();
       if ($cache = $this->cacheBackend->get("entity_bundle_info:$langcode")) {
         $this->bundleInfo = $cache->data;
       }
@@ -721,7 +721,7 @@ public function getExtraFields($entity_type_id, $bundle) {
     // Read from the persistent cache. Since hook_entity_extra_field_info() and
     // hook_entity_extra_field_info_alter() might contain t() calls, we cache
     // per language.
-    $cache_id = 'entity_bundle_extra_fields:' . $entity_type_id . ':' . $bundle . ':' . $this->languageManager->getCurrentLanguage()->id;
+    $cache_id = 'entity_bundle_extra_fields:' . $entity_type_id . ':' . $bundle . ':' . $this->languageManager->getCurrentLanguage()->getId();
     $cached = $this->cacheBackend->get($cache_id);
     if ($cached) {
       $this->extraFields[$entity_type_id][$bundle] = $cached->data;
@@ -783,7 +783,7 @@ public function getTranslationFromContext(EntityInterface $entity, $langcode = N
 
     if ($entity instanceof TranslatableInterface) {
       if (empty($langcode)) {
-        $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id;
+        $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
       }
 
       // Retrieve language fallback candidates to perform the entity language
@@ -794,7 +794,7 @@ public function getTranslationFromContext(EntityInterface $entity, $langcode = N
 
       // Ensure the default language has the proper language code.
       $default_language = $entity->getUntranslated()->language();
-      $candidates[$default_language->id] = LanguageInterface::LANGCODE_DEFAULT;
+      $candidates[$default_language->getId()] = LanguageInterface::LANGCODE_DEFAULT;
 
       // Return the most fitting entity translation.
       foreach ($candidates as $candidate) {
@@ -849,7 +849,7 @@ protected function getAllDisplayModesByEntityType($display_type) {
     if (!isset($this->displayModeInfo[$display_type])) {
       $key = 'entity_' . $display_type . '_info';
       $entity_type_id = 'entity_' . $display_type;
-      $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->id;
+      $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->getId();
       if ($cache = $this->cacheBackend->get("$key:$langcode")) {
         $this->displayModeInfo[$display_type] = $cache->data;
       }
diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
index cd27e7d..1720602 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
@@ -110,7 +110,7 @@ public function view(EntityInterface $entity, $view_mode = 'full', $langcode = N
    */
   public function viewMultiple(array $entities = array(), $view_mode = 'full', $langcode = NULL) {
     if (!isset($langcode)) {
-      $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id;
+      $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
     }
 
     $build_list = array(
diff --git a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
index 442162c..30c65ca 100644
--- a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
+++ b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
@@ -94,7 +94,7 @@ public static function createInstance(ContainerInterface $container, EntityTypeI
    */
   public function doCreate(array $values = array()) {
     // Set default language to site default if not provided.
-    $values += array('langcode' => $this->languageManager->getDefaultLanguage()->id);
+    $values += array('langcode' => $this->languageManager->getDefaultLanguage()->getId());
     $entity = new $this->entityClass($values, $this->entityTypeId);
 
     // @todo This is handled by ContentEntityStorageBase, which assumes
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
index a46df01..3736db7 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
@@ -1052,8 +1052,8 @@ protected function mapToDataStorageRecord(EntityInterface $entity, $table_name =
       $table_name = $this->dataTable;
     }
     $record = $this->mapToStorageRecord($entity, $table_name);
-    $record->langcode = $entity->language()->id;
-    $record->default_langcode = intval($record->langcode == $entity->getUntranslated()->language()->id);
+    $record->langcode = $entity->language()->getId();
+    $record->default_langcode = intval($record->langcode == $entity->getUntranslated()->language()->getId());
     return $record;
   }
 
@@ -1139,7 +1139,7 @@ protected function loadFieldItems(array $entities) {
     foreach ($entities as $key => $entity) {
       $bundles[$entity->bundle()] = TRUE;
       $ids[] = $load_current ? $key : $entity->getRevisionId();
-      $default_langcodes[$key] = $entity->getUntranslated()->language()->id;
+      $default_langcodes[$key] = $entity->getUntranslated()->language()->getId();
     }
 
     // Collect impacted fields.
@@ -1215,7 +1215,7 @@ protected function saveFieldItems(EntityInterface $entity, $update = TRUE) {
     $id = $entity->id();
     $bundle = $entity->bundle();
     $entity_type = $entity->getEntityTypeId();
-    $default_langcode = $entity->getUntranslated()->language()->id;
+    $default_langcode = $entity->getUntranslated()->language()->getId();
     $translation_langcodes = array_keys($entity->getTranslationLanguages());
     $table_mapping = $this->getTableMapping();
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
index 1dca1ee..4cd2695 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
@@ -72,7 +72,7 @@ public function onRespond(FilterResponseEvent $event) {
     $response->headers->set('X-UA-Compatible', 'IE=edge,chrome=1', FALSE);
 
     // Set the Content-language header.
-    $response->headers->set('Content-language', $this->languageManager->getCurrentLanguage()->id);
+    $response->headers->set('Content-language', $this->languageManager->getCurrentLanguage()->getId());
 
     // Attach globally-declared headers to the response object so that Symfony
     // can send them for us correctly.
diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php
index 8f72cdc..f845eed 100644
--- a/core/lib/Drupal/Core/Language/Language.php
+++ b/core/lib/Drupal/Core/Language/Language.php
@@ -42,7 +42,7 @@ class Language implements LanguageInterface {
    *
    * @var string
    */
-  public $id = '';
+  protected $id = '';
 
   /**
    * The direction, left-to-right, or right-to-left.
diff --git a/core/lib/Drupal/Core/Language/LanguageManager.php b/core/lib/Drupal/Core/Language/LanguageManager.php
index 35a3fad..c73c495 100644
--- a/core/lib/Drupal/Core/Language/LanguageManager.php
+++ b/core/lib/Drupal/Core/Language/LanguageManager.php
@@ -133,7 +133,7 @@ public function getLanguages($flags = LanguageInterface::STATE_CONFIGURABLE) {
     if (!isset($this->languages)) {
       // No language module, so use the default language only.
       $default = $this->getDefaultLanguage();
-      $this->languages = array($default->id => $default);
+      $this->languages = array($default->getId() => $default);
       // Add the special languages, they will be filtered later if needed.
       $this->languages += $this->getDefaultLockedLanguages($default->weight);
     }
diff --git a/core/lib/Drupal/Core/Page/DefaultHtmlFragmentRenderer.php b/core/lib/Drupal/Core/Page/DefaultHtmlFragmentRenderer.php
index bcb8146..775184a 100644
--- a/core/lib/Drupal/Core/Page/DefaultHtmlFragmentRenderer.php
+++ b/core/lib/Drupal/Core/Page/DefaultHtmlFragmentRenderer.php
@@ -96,7 +96,7 @@ public function preparePage(HtmlPage $page, &$page_array) {
     // HTML element attributes.
     $language_interface = $this->languageManager->getCurrentLanguage();
     $html_attributes = $page->getHtmlAttributes();
-    $html_attributes['lang'] = $language_interface->id;
+    $html_attributes['lang'] = $language_interface->getId();
     $html_attributes['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
 
     $this->setDefaultMetaTags($page);
diff --git a/core/lib/Drupal/Core/Path/AliasManager.php b/core/lib/Drupal/Core/Path/AliasManager.php
index bca2eea..f09fd7c 100644
--- a/core/lib/Drupal/Core/Path/AliasManager.php
+++ b/core/lib/Drupal/Core/Path/AliasManager.php
@@ -157,7 +157,7 @@ public function getPathByAlias($alias, $langcode = NULL) {
     // language. If we used a language different from the one conveyed by the
     // requested URL, we might end up being unable to check if there is a path
     // alias matching the URL path.
-    $langcode = $langcode ?: $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_URL)->id;
+    $langcode = $langcode ?: $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId();
 
     // If we already know that there are no paths for this alias simply return.
     if (empty($alias) || !empty($this->noPath[$langcode][$alias])) {
@@ -191,7 +191,7 @@ public function getAliasByPath($path, $langcode = NULL) {
     // language. If we used a language different from the one conveyed by the
     // requested URL, we might end up being unable to check if there is a path
     // alias matching the URL path.
-    $langcode = $langcode ?: $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_URL)->id;
+    $langcode = $langcode ?: $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId();
 
     // Check the path whitelist, if the top-level part before the first /
     // is not in the list, then there is no need to do anything further,
diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
index 1c709a1..67226ab 100644
--- a/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
+++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
@@ -45,7 +45,7 @@ public function processInbound($path, Request $request) {
    */
   public function processOutbound($path, &$options = array(), Request $request = NULL) {
     if (empty($options['alias'])) {
-      $langcode = isset($options['language']) ? $options['language']->id : NULL;
+      $langcode = isset($options['language']) ? $options['language']->getId() : NULL;
       $path = $this->aliasManager->getAliasByPath($path, $langcode);
     }
     return $path;
diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php
index 7364da9..feb935c 100644
--- a/core/lib/Drupal/Core/Session/UserSession.php
+++ b/core/lib/Drupal/Core/Session/UserSession.php
@@ -185,10 +185,10 @@ public function isAnonymous() {
   function getPreferredLangcode($fallback_to_default = TRUE) {
     $language_list = language_list();
     if (!empty($this->preferred_langcode) && isset($language_list[$this->preferred_langcode])) {
-      return $language_list[$this->preferred_langcode]->id;
+      return $language_list[$this->preferred_langcode]->getId();
     }
     else {
-      return $fallback_to_default ? language_default()->id : '';
+      return $fallback_to_default ? language_default()->getId() : '';
     }
   }
 
@@ -198,10 +198,10 @@ function getPreferredLangcode($fallback_to_default = TRUE) {
   function getPreferredAdminLangcode($fallback_to_default = TRUE) {
     $language_list = language_list();
     if (!empty($this->preferred_admin_langcode) && isset($language_list[$this->preferred_admin_langcode])) {
-      return $language_list[$this->preferred_admin_langcode]->id;
+      return $language_list[$this->preferred_admin_langcode]->getId();
     }
     else {
-      return $fallback_to_default ? language_default()->id : '';
+      return $fallback_to_default ? language_default()->getId() : '';
     }
   }
 
diff --git a/core/lib/Drupal/Core/StringTranslation/TranslationManager.php b/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
index e6d2a66..d489b1c 100644
--- a/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
+++ b/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
@@ -61,7 +61,7 @@ class TranslationManager implements TranslationInterface, TranslatorInterface {
    */
   public function __construct(LanguageManagerInterface $language_manager) {
     $this->languageManager = $language_manager;
-    $this->defaultLangcode = $language_manager->getDefaultLanguage()->id;
+    $this->defaultLangcode = $language_manager->getDefaultLanguage()->getId();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
index 3a0780f..61cdc73 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
@@ -56,7 +56,7 @@ public function getValue() {
   public function setValue($value, $notify = TRUE) {
     // Support passing language objects.
     if (is_object($value)) {
-      $this->id = $value->id;
+      $this->id = $value->getId();
       $this->language = $value;
     }
     elseif (isset($value) && !is_scalar($value)) {
@@ -88,7 +88,7 @@ public function id() {
       return $this->id;
     }
     elseif (isset($this->language)) {
-      return $this->language->id;
+      return $this->language->getId();
     }
   }
 
diff --git a/core/lib/Drupal/Core/Utility/LinkGenerator.php b/core/lib/Drupal/Core/Utility/LinkGenerator.php
index f8660ab..ad5d0c8 100644
--- a/core/lib/Drupal/Core/Utility/LinkGenerator.php
+++ b/core/lib/Drupal/Core/Utility/LinkGenerator.php
@@ -90,7 +90,7 @@ public function generateFromUrl($text, Url $url) {
     // Add a hreflang attribute if we know the language of this link's url and
     // hreflang has not already been set.
     if (!empty($variables['options']['language']) && !isset($variables['options']['attributes']['hreflang'])) {
-      $variables['options']['attributes']['hreflang'] = $variables['options']['language']->id;
+      $variables['options']['attributes']['hreflang'] = $variables['options']['language']->getId();
     }
 
     // Set the "active" class if the 'set_active_class' option is not empty.
diff --git a/core/lib/Drupal/Core/Utility/Token.php b/core/lib/Drupal/Core/Utility/Token.php
index d03d645..73376e1 100644
--- a/core/lib/Drupal/Core/Utility/Token.php
+++ b/core/lib/Drupal/Core/Utility/Token.php
@@ -311,7 +311,7 @@ public function findWithPrefix(array $tokens, $prefix, $delimiter = ':') {
    */
   public function getInfo() {
     if (is_null($this->tokenInfo)) {
-      $cache_id = 'token_info:' . $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id;
+      $cache_id = 'token_info:' . $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
       $cache = $this->cache->get($cache_id);
       if ($cache) {
         $this->tokenInfo = $cache->data;
diff --git a/core/lib/Drupal/Core/Validation/DrupalTranslator.php b/core/lib/Drupal/Core/Validation/DrupalTranslator.php
index 01302ce..84847a5 100644
--- a/core/lib/Drupal/Core/Validation/DrupalTranslator.php
+++ b/core/lib/Drupal/Core/Validation/DrupalTranslator.php
@@ -55,7 +55,7 @@ public function setLocale($locale) {
    * Implements \Symfony\Component\Translation\TranslatorInterface::getLocale().
    */
   public function getLocale() {
-    return $this->locale ? $this->locale : \Drupal::languageManager()->getCurrentLanguage()->id;
+    return $this->locale ? $this->locale : \Drupal::languageManager()->getCurrentLanguage()->getId();
   }
 
   /**
diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php
index 1832cb5..d623870 100644
--- a/core/modules/aggregator/src/FeedForm.php
+++ b/core/modules/aggregator/src/FeedForm.php
@@ -31,7 +31,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => $this->t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $feed->language()->id,
+      '#default_value' => $feed->language()->getId(),
       '#languages' => LanguageInterface::STATE_ALL,
       '#weight' => -4,
     );
diff --git a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
index 642646a..752c8c1 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
@@ -203,7 +203,7 @@ public function process(FeedInterface $feed) {
         $entry = reset($entry);
       }
       else {
-        $entry = entity_create('aggregator_item', array('langcode' => $feed->language()->id));
+        $entry = entity_create('aggregator_item', array('langcode' => $feed->language()->getId()));
       }
       if ($item['timestamp']) {
         $entry->setPostedTime($item['timestamp']);
diff --git a/core/modules/aggregator/src/Tests/FeedLanguageTest.php b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
index ecf9030..fea50ce 100644
--- a/core/modules/aggregator/src/Tests/FeedLanguageTest.php
+++ b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
@@ -51,12 +51,12 @@ protected function setUp() {
   public function testFeedLanguage() {
     $feeds = array();
     // Create feeds.
-    $feeds[1] = $this->createFeed(NULL, array('langcode' => $this->langcodes[1]->id));
-    $feeds[2] = $this->createFeed(NULL, array('langcode' => $this->langcodes[2]->id));
+    $feeds[1] = $this->createFeed(NULL, array('langcode' => $this->langcodes[1]->getId()));
+    $feeds[2] = $this->createFeed(NULL, array('langcode' => $this->langcodes[2]->getId()));
 
     // Make sure that the language has been assigned.
-    $this->assertEqual($feeds[1]->language()->id, $this->langcodes[1]->id);
-    $this->assertEqual($feeds[2]->language()->id, $this->langcodes[2]->id);
+    $this->assertEqual($feeds[1]->language()->getId(), $this->langcodes[1]->getId());
+    $this->assertEqual($feeds[2]->language()->getId(), $this->langcodes[2]->getId());
 
     // Create example nodes to create feed items from and then update the feeds.
     $this->createSampleNodes();
@@ -68,7 +68,7 @@ public function testFeedLanguage() {
       $items = entity_load_multiple_by_properties('aggregator_item', array('fid' => $feed->id()));
       $this->assertTrue(count($items) > 0, 'Feed items were created.');
       foreach ($items as $item) {
-        $this->assertEqual($item->language()->id, $feed->language()->id);
+        $this->assertEqual($item->language()->getId(), $feed->language()->getId());
       }
     }
   }
diff --git a/core/modules/block/src/Tests/BlockStorageUnitTest.php b/core/modules/block/src/Tests/BlockStorageUnitTest.php
index b063051..5fb4e8b 100644
--- a/core/modules/block/src/Tests/BlockStorageUnitTest.php
+++ b/core/modules/block/src/Tests/BlockStorageUnitTest.php
@@ -84,7 +84,7 @@ protected function createTests() {
 
     // Ensure that default values are filled in.
     $expected_properties = array(
-      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->id,
+      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
       'status' => TRUE,
       'dependencies' => array('module' => array('block_test'), 'theme' => array('stark')),
       'id' => 'test_block',
diff --git a/core/modules/block_content/src/BlockContentForm.php b/core/modules/block_content/src/BlockContentForm.php
index df923ee..769a7f3 100644
--- a/core/modules/block_content/src/BlockContentForm.php
+++ b/core/modules/block_content/src/BlockContentForm.php
@@ -109,14 +109,14 @@ public function form(array $form, FormStateInterface $form_state) {
       // Set the correct default language.
       if ($block->isNew()) {
         $language_default = $this->languageManager->getCurrentLanguage($language_configuration['langcode']);
-        $block->langcode->value = $language_default->id;
+        $block->langcode->value = $language_default->getId();
       }
     }
 
     $form['langcode'] = array(
       '#title' => $this->t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $block->getUntranslated()->language()->id,
+      '#default_value' => $block->getUntranslated()->language()->getId(),
       '#languages' => LanguageInterface::STATE_ALL,
       '#access' => isset($language_configuration['language_show']) && $language_configuration['language_show'],
     );
diff --git a/core/modules/block_content/src/Tests/BlockContentTypeTest.php b/core/modules/block_content/src/Tests/BlockContentTypeTest.php
index b36d009..1d74bb2 100644
--- a/core/modules/block_content/src/Tests/BlockContentTypeTest.php
+++ b/core/modules/block_content/src/Tests/BlockContentTypeTest.php
@@ -57,7 +57,7 @@ public function testBlockContentTypeCreation() {
     $this->assertTrue($block_type, 'The new block type has been created.');
 
     // Check that the block type was created in site default language.
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     $this->assertEqual($block_type->language()->getId(), $default_langcode);
   }
 
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 861ed73..d24e5b7 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -472,7 +472,7 @@ function template_preprocess_book_export_html(&$variables) {
 
   // HTML element attributes.
   $attributes = array();
-  $attributes['lang'] = $language_interface->id;
+  $attributes['lang'] = $language_interface->getId();
   $attributes['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
   $variables['html_attributes'] = new Attribute($attributes);
 }
diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php
index ad906ed..747e8a0 100644
--- a/core/modules/book/src/BookManager.php
+++ b/core/modules/book/src/BookManager.php
@@ -466,7 +466,7 @@ public function bookTreeAllData($bid, $link = NULL, $max_depth = NULL) {
     $nid = isset($link['nid']) ? $link['nid'] : 0;
     // Generate a cache ID (cid) specific for this $bid, $link, $language, and
     // depth.
-    $cid = 'book-links:' . $bid . ':all:' . $nid . ':' . $language_interface->id . ':' . (int) $max_depth;
+    $cid = 'book-links:' . $bid . ':all:' . $nid . ':' . $language_interface->getId() . ':' . (int) $max_depth;
 
     if (!isset($tree[$cid])) {
       // If the tree data was not in the static cache, build $tree_parameters.
@@ -619,7 +619,7 @@ protected function doBookTreeBuild($bid, array $parameters = array()) {
     if (isset($parameters['expanded'])) {
       sort($parameters['expanded']);
     }
-    $tree_cid = 'book-links:' . $bid . ':tree-data:' . $language_interface->id . ':' . hash('sha256', serialize($parameters));
+    $tree_cid = 'book-links:' . $bid . ':tree-data:' . $language_interface->getId() . ':' . hash('sha256', serialize($parameters));
 
     // If we do not have this tree in the static cache, check {cache_data}.
     if (!isset($trees[$tree_cid])) {
diff --git a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
index 6d92f98..0762728 100644
--- a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
+++ b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
@@ -271,8 +271,8 @@ public function getJSSettings(EditorEntity $editor) {
     // Map the interface language code to a CKEditor translation.
     $ckeditor_langcodes = $this->getLangcodes();
     $language_interface = $this->languageManager->getCurrentLanguage();
-    if (isset($ckeditor_langcodes[$language_interface->id])) {
-      $display_langcode = $ckeditor_langcodes[$language_interface->id];
+    if (isset($ckeditor_langcodes[$language_interface->getId()])) {
+      $display_langcode = $ckeditor_langcodes[$language_interface->getId()];
     }
 
     // Next, set the most fundamental CKEditor settings.
diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php
index 2c99bf8..a7b7e68 100644
--- a/core/modules/comment/src/CommentForm.php
+++ b/core/modules/comment/src/CommentForm.php
@@ -64,7 +64,7 @@ protected function init(FormStateInterface $form_state) {
     // set.
     if ($comment->isNew()) {
       $language_content = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT);
-      $comment->langcode->value = $language_content->id;
+      $comment->langcode->value = $language_content->getId();
     }
 
     parent::init($form_state);
@@ -165,7 +165,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $comment->getUntranslated()->language()->id,
+      '#default_value' => $comment->getUntranslated()->language()->getId(),
       '#languages' => Language::STATE_ALL,
       '#access' => isset($language_configuration['language_show']) && $language_configuration['language_show'],
     );
diff --git a/core/modules/comment/src/Tests/CommentTokenReplaceTest.php b/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
index 97335f8..56686fd 100644
--- a/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
+++ b/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
@@ -59,8 +59,8 @@ function testCommentTokenReplacement() {
     $tests['[comment:body]'] = $comment->comment_body->processed;
     $tests['[comment:url]'] = url('comment/' . $comment->id(), $url_options + array('fragment' => 'comment-' . $comment->id()));
     $tests['[comment:edit-url]'] = url('comment/' . $comment->id() . '/edit', $url_options);
-    $tests['[comment:created:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $comment->getCreatedTime(), 2, $language_interface->id);
-    $tests['[comment:changed:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $comment->getChangedTime(), 2, $language_interface->id);
+    $tests['[comment:created:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $comment->getCreatedTime(), 2, $language_interface->getId());
+    $tests['[comment:changed:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $comment->getChangedTime(), 2, $language_interface->getId());
     $tests['[comment:parent:cid]'] = $comment->hasParentComment() ? $comment->getParentComment()->id() : NULL;
     $tests['[comment:parent:title]'] = String::checkPlain($parent_comment->getSubject());
     $tests['[comment:node:nid]'] = $comment->getCommentedEntityId();
@@ -72,7 +72,7 @@ function testCommentTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('comment' => $comment), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('comment' => $comment), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized comment token %token replaced.', array('%token' => $input)));
     }
 
@@ -89,7 +89,7 @@ function testCommentTokenReplacement() {
     $tests['[comment:author:name]'] = $this->admin_user->getUsername();
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('comment' => $comment), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
+      $output = $token_service->replace($input, array('comment' => $comment), array('langcode' => $language_interface->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized comment token %token replaced.', array('%token' => $input)));
     }
 
@@ -105,7 +105,7 @@ function testCommentTokenReplacement() {
     $tests['[node:comment-count-new]'] = 2;
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('entity' => $node, 'node' => $node), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('entity' => $node, 'node' => $node), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Node comment token %token replaced.', array('%token' => $input)));
     }
   }
diff --git a/core/modules/comment/src/Tests/CommentTypeTest.php b/core/modules/comment/src/Tests/CommentTypeTest.php
index 87fb38b..7143e1f 100644
--- a/core/modules/comment/src/Tests/CommentTypeTest.php
+++ b/core/modules/comment/src/Tests/CommentTypeTest.php
@@ -74,7 +74,7 @@ public function testCommentTypeCreation() {
     $this->assertTrue($comment_type, 'The new comment type has been created.');
 
     // Check that the comment type was created in site default language.
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     $this->assertEqual($comment_type->language()->getId(), $default_langcode);
 
     // Edit the comment-type and ensure that we cannot change the entity-type.
diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php
index 0a896a0..4bdbe25 100644
--- a/core/modules/config/src/Tests/ConfigEntityTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityTest.php
@@ -37,7 +37,7 @@ class ConfigEntityTest extends WebTestBase {
    * Tests CRUD operations.
    */
   function testCRUD() {
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     // Verify default properties on a newly created empty entity.
     $empty = entity_create('config_test');
     $this->assertTrue($empty->uuid());
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index f5e4947..3d3fa23 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -51,7 +51,7 @@ function testImport() {
     // Create new config entity.
     $original_dynamic_data = array(
       'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651',
-      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->id,
+      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
       'status' => TRUE,
       'dependencies' => array(),
       'id' => 'new',
diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php
index e5e760e..eff180c 100644
--- a/core/modules/config/src/Tests/ConfigImporterTest.php
+++ b/core/modules/config/src/Tests/ConfigImporterTest.php
@@ -165,7 +165,7 @@ function testNew() {
     // Create new config entity.
     $original_dynamic_data = array(
       'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651',
-      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->id,
+      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
       'status' => TRUE,
       'dependencies' => array(),
       'id' => 'new',
diff --git a/core/modules/config/src/Tests/ConfigOverridesPriorityTest.php b/core/modules/config/src/Tests/ConfigOverridesPriorityTest.php
index 71b3599..3e6e288 100644
--- a/core/modules/config/src/Tests/ConfigOverridesPriorityTest.php
+++ b/core/modules/config/src/Tests/ConfigOverridesPriorityTest.php
@@ -56,7 +56,7 @@ public function testOverridePriorities() {
     ));
     \Drupal::languageManager()->setConfigOverrideLanguage($language);
     \Drupal::languageManager()
-      ->getLanguageConfigOverride($language->id, 'system.site')
+      ->getLanguageConfigOverride($language->getId(), 'system.site')
       ->set('name', $language_overridden_name)
       ->set('mail', $language_overridden_mail)
       ->save();
diff --git a/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php b/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php
index 9ea54ef..8604c92 100644
--- a/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php
+++ b/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php
@@ -33,7 +33,7 @@ public function access(Route $route, AccountInterface $account, $langcode = NULL
       $access =
         !empty($target_language) &&
         !$target_language->locked &&
-        (empty($this->sourceLanguage) || ($target_language->id != $this->sourceLanguage->id));
+        (empty($this->sourceLanguage) || ($target_language->getId() != $this->sourceLanguage->getId()));
 
       return $base_access->andIf(AccessResult::allowedIf($access));
     }
diff --git a/core/modules/config_translation/src/Controller/ConfigTranslationController.php b/core/modules/config_translation/src/Controller/ConfigTranslationController.php
index 646d3b8..250cd7d 100644
--- a/core/modules/config_translation/src/Controller/ConfigTranslationController.php
+++ b/core/modules/config_translation/src/Controller/ConfigTranslationController.php
@@ -152,7 +152,7 @@ public function itemPage(Request $request, RouteMatchInterface $route_match, $pl
       '#header' => array($this->t('Language'), $this->t('Operations')),
     );
     foreach ($languages as $language) {
-      $langcode = $language->id;
+      $langcode = $language->getId();
 
       // This is needed because
       // ConfigMapperInterface::getAddRouteParameters(), for example,
diff --git a/core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php b/core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php
index d4c18a4..217d219 100644
--- a/core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php
+++ b/core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php
@@ -136,7 +136,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Request $
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     foreach ($this->mapper->getConfigNames() as $name) {
-      $this->languageManager->getLanguageConfigOverride($this->language->id, $name)->delete();
+      $this->languageManager->getLanguageConfigOverride($this->language->getId(), $name)->delete();
     }
 
     // Flush all persistent caches.
diff --git a/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php b/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php
index d195d24..fefe5f8 100644
--- a/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php
+++ b/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php
@@ -215,7 +215,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     foreach ($this->mapper->getConfigNames() as $name) {
       // Set configuration values based on form submission and source values.
       $base_config = $config_factory->get($name);
-      $config_translation = $this->languageManager->getLanguageConfigOverride($this->language->id, $name);
+      $config_translation = $this->languageManager->getLanguageConfigOverride($this->language->getId(), $name);
       $locations = $this->localeStorage->getLocations(array('type' => 'configuration', 'name' => $name));
 
       $this->setConfig($this->language, $base_config, $config_translation, $form_values[$name], !empty($locations));
@@ -311,7 +311,7 @@ protected function buildConfigForm(Element $schema, $config_data, $base_config_d
           '#theme' => 'config_translation_manage_form_element',
         );
         $build[$element_key]['source'] = array(
-          '#markup' => $base_config_data[$key] ? ('<span lang="' . $this->sourceLanguage->id . '">' . nl2br($base_config_data[$key] . '</span>')) : t('(Empty)'),
+          '#markup' => $base_config_data[$key] ? ('<span lang="' . $this->sourceLanguage->getId() . '">' . nl2br($base_config_data[$key] . '</span>')) : t('(Empty)'),
           '#title' => $this->t(
             '!label <span class="visually-hidden">(!source_language)</span>',
             array(
@@ -377,7 +377,7 @@ protected function setConfig(LanguageInterface $language, Config $base_config, L
           // Get the translation for this original source string from locale.
           $conditions = array(
             'lid' => $source_string->lid,
-            'language' => $language->id,
+            'language' => $language->getId(),
           );
           $translations = $this->localeStorage->getTranslations($conditions + array('translated' => TRUE));
           // If we got a translation, take that, otherwise create a new one.
diff --git a/core/modules/config_translation/src/FormElement/DateFormat.php b/core/modules/config_translation/src/FormElement/DateFormat.php
index b19c66c..5b19e26 100644
--- a/core/modules/config_translation/src/FormElement/DateFormat.php
+++ b/core/modules/config_translation/src/FormElement/DateFormat.php
@@ -32,7 +32,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte
       '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>',
       '#description' => $description,
       '#default_value' => $value,
-      '#attributes' => array('lang' => $language->id),
+      '#attributes' => array('lang' => $language->getId()),
       '#field_suffix' => ' <div class="edit-date-format-suffix"><small id="edit-date-format-suffix">' . $format . '</small></div>',
       '#ajax' => array(
         'callback' => 'Drupal\config_translation\FormElement\DateFormat::ajaxSample',
diff --git a/core/modules/config_translation/src/FormElement/Textarea.php b/core/modules/config_translation/src/FormElement/Textarea.php
index e4692ec..05b18bb 100644
--- a/core/modules/config_translation/src/FormElement/Textarea.php
+++ b/core/modules/config_translation/src/FormElement/Textarea.php
@@ -31,7 +31,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte
       '#default_value' => $value,
       '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>',
       '#rows' => $rows,
-      '#attributes' => array('lang' => $language->id),
+      '#attributes' => array('lang' => $language->getId()),
     );
   }
 
diff --git a/core/modules/config_translation/src/FormElement/Textfield.php b/core/modules/config_translation/src/FormElement/Textfield.php
index 34759dc..ccd7cc5 100644
--- a/core/modules/config_translation/src/FormElement/Textfield.php
+++ b/core/modules/config_translation/src/FormElement/Textfield.php
@@ -25,7 +25,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte
       '#type' => 'textfield',
       '#default_value' => $value,
       '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>',
-      '#attributes' => array('lang' => $language->id),
+      '#attributes' => array('lang' => $language->getId()),
     );
   }
 
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index f1dfca7..0799f79 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -107,14 +107,14 @@ function contact_mail($key, &$message, $params) {
     $variables['!sender-url'] = $params['sender']->getEmail();
   }
 
-  $options = array('langcode' => $language->id);
+  $options = array('langcode' => $language->getId());
 
   switch ($key) {
     case 'page_mail':
     case 'page_copy':
       $message['subject'] .= t('[!form] !subject', $variables, $options);
       $message['body'][] = t("!sender-name (!sender-url) sent a message using the contact form at !form-url.", $variables, $options);
-      $build = entity_view($contact_message, 'mail', $language->id);
+      $build = entity_view($contact_message, 'mail', $language->getId());
       $message['body'][] = drupal_render($build);
       break;
 
@@ -133,7 +133,7 @@ function contact_mail($key, &$message, $params) {
       $message['body'][] = t('Hello !recipient-name,', $variables, $options);
       $message['body'][] = t("!sender-name (!sender-url) has sent you a message via your contact form at !site-name.", $variables, $options);
       $message['body'][] = t("If you don't want to receive such emails, you can change your settings at !recipient-edit-url.", $variables, $options);
-      $build = entity_view($contact_message, 'mail', $language->id);
+      $build = entity_view($contact_message, 'mail', $language->getId());
       $message['body'][] = drupal_render($build);
       break;
   }
diff --git a/core/modules/contact/src/MessageForm.php b/core/modules/contact/src/MessageForm.php
index 1882efc..28c8ad1 100644
--- a/core/modules/contact/src/MessageForm.php
+++ b/core/modules/contact/src/MessageForm.php
@@ -91,7 +91,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => $this->t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $message->getUntranslated()->language()->id,
+      '#default_value' => $message->getUntranslated()->language()->getId(),
       '#languages' => Language::STATE_ALL,
       '#access' => isset($language_configuration['language_show']) && $language_configuration['language_show'],
     );
@@ -219,14 +219,14 @@ public function save(array $form, FormStateInterface $form_state) {
 
     // If requested, send a copy to the user, using the current language.
     if ($message->copySender()) {
-      drupal_mail('contact', $key_prefix . '_copy', $sender->getEmail(), $language_interface->id, $params, $sender->getEmail());
+      drupal_mail('contact', $key_prefix . '_copy', $sender->getEmail(), $language_interface->getId(), $params, $sender->getEmail());
     }
 
     // If configured, send an auto-reply, using the current language.
     if (!$message->isPersonal() && $contact_form->getReply()) {
       // User contact forms do not support an auto-reply message, so this
       // message always originates from the site.
-      drupal_mail('contact', 'page_autoreply', $sender->getEmail(), $language_interface->id, $params);
+      drupal_mail('contact', 'page_autoreply', $sender->getEmail(), $language_interface->getId(), $params);
     }
 
     $this->flood->register('contact', $this->config('contact.settings')->get('flood.interval'));
@@ -271,7 +271,7 @@ protected function init(FormStateInterface $form_state) {
     // set.
     if ($message->isNew() && !$message->langcode->value) {
       $language_content = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT);
-      $message->langcode->value = $language_content->id;
+      $message->langcode->value = $language_content->getId();
     }
 
     parent::init($form_state);
diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php
index 436b2bf..3c82ba2 100644
--- a/core/modules/contact/src/Tests/ContactSitewideTest.php
+++ b/core/modules/contact/src/Tests/ContactSitewideTest.php
@@ -118,7 +118,7 @@ function testSiteWideContact() {
 
     // Check that the form was created in site default language.
     $langcode = \Drupal::config('contact.form.' . $id)->get('langcode');
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     $this->assertEqual($langcode, $default_langcode);
 
     // Make sure the newly created form is included in the list of forms.
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 570bd4d..2e79f3b 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -593,7 +593,7 @@ function content_translation_entity_presave(EntityInterface $entity) {
     // @todo Avoid using request attributes once translation metadata become
     //   regular fields.
     $attributes = \Drupal::request()->attributes;
-    \Drupal::service('content_translation.synchronizer')->synchronizeFields($entity, $entity->language()->id, $attributes->get('source_langcode'));
+    \Drupal::service('content_translation.synchronizer')->synchronizeFields($entity, $entity->language()->getId(), $attributes->get('source_langcode'));
   }
 }
 
diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php
index b619036..176a40b 100644
--- a/core/modules/content_translation/src/ContentTranslationHandler.php
+++ b/core/modules/content_translation/src/ContentTranslationHandler.php
@@ -50,7 +50,7 @@ public function __construct(EntityTypeInterface $entity_type) {
    * {@inheritdoc}
    */
   public function retranslate(EntityInterface $entity, $langcode = NULL) {
-    $updated_langcode = !empty($langcode) ? $langcode : $entity->language()->id;
+    $updated_langcode = !empty($langcode) ? $langcode : $entity->language()->getId();
     $translations = $entity->getTranslationLanguages();
     foreach ($translations as $langcode => $language) {
       $entity->translation[$langcode]['outdated'] = $langcode != $updated_langcode;
@@ -79,7 +79,7 @@ public function getTranslationAccess(EntityInterface $entity, $op) {
    */
   public function getSourceLangcode(FormStateInterface $form_state) {
     if ($source = $form_state->get(['content_translation', 'source'])) {
-      return $source->id;
+      return $source->getId();
     }
     return FALSE;
   }
@@ -90,7 +90,7 @@ public function getSourceLangcode(FormStateInterface $form_state) {
   public function entityFormAlter(array &$form, FormStateInterface $form_state, EntityInterface $entity) {
     $form_object = $form_state->getFormObject();
     $form_langcode = $form_object->getFormLangcode($form_state);
-    $entity_langcode = $entity->getUntranslated()->language()->id;
+    $entity_langcode = $entity->getUntranslated()->language()->getId();
     $source_langcode = $this->getSourceLangcode($form_state);
 
     $new_translation = !empty($source_langcode);
@@ -138,8 +138,8 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
         ),
       );
       foreach (language_list(LanguageInterface::STATE_CONFIGURABLE) as $language) {
-        if (isset($translations[$language->id])) {
-          $form['source_langcode']['source']['#options'][$language->id] = $language->name;
+        if (isset($translations[$language->getId()])) {
+          $form['source_langcode']['source']['#options'][$language->getId()] = $language->name;
         }
       }
     }
@@ -151,8 +151,8 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
     if ($language_widget && $has_translations) {
       $form['langcode']['#options'] = array();
       foreach (language_list(LanguageInterface::STATE_CONFIGURABLE) as $language) {
-        if (empty($translations[$language->id]) || $language->id == $entity_langcode) {
-          $form['langcode']['#options'][$language->id] = $language->name;
+        if (empty($translations[$language->getId()]) || $language->getId() == $entity_langcode) {
+          $form['langcode']['#options'][$language->getId()] = $language->getname;
         }
       }
     }
diff --git a/core/modules/content_translation/src/FieldTranslationSynchronizer.php b/core/modules/content_translation/src/FieldTranslationSynchronizer.php
index 6715577..6b94671 100644
--- a/core/modules/content_translation/src/FieldTranslationSynchronizer.php
+++ b/core/modules/content_translation/src/FieldTranslationSynchronizer.php
@@ -51,7 +51,7 @@ public function synchronizeFields(ContentEntityInterface $entity, $sync_langcode
     // If the entity language is being changed there is nothing to synchronize.
     $entity_type = $entity->getEntityTypeId();
     $entity_unchanged = isset($entity->original) ? $entity->original : $this->entityManager->getStorage($entity_type)->loadUnchanged($entity->id());
-    if ($entity->getUntranslated()->language()->id != $entity_unchanged->getUntranslated()->language()->id) {
+    if ($entity->getUntranslated()->language()->getId() != $entity_unchanged->getUntranslated()->language()->getId()) {
       return;
     }
 
diff --git a/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php b/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php
index 1b723ce..2e6d685 100644
--- a/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php
+++ b/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php
@@ -72,14 +72,14 @@ public function getCancelUrl() {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     // Remove the translated values.
-    $this->entity->removeTranslation($this->language->id);
+    $this->entity->removeTranslation($this->language->getId());
     $this->entity->save();
 
     // Remove any existing path alias for the removed translation.
     // @todo This should be taken care of by the Path module.
     if (\Drupal::moduleHandler()->moduleExists('path')) {
       $path = $this->entity->getSystemPath();
-      $conditions = array('source' => $path, 'langcode' => $this->language->id);
+      $conditions = array('source' => $path, 'langcode' => $this->language->getId());
       \Drupal::service('path.alias_storage')->delete($conditions);
     }
 
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
index 23c19bd..983756f 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
@@ -64,7 +64,7 @@ class ContentTranslationContextualLinksTest extends WebTestBase {
   protected function setUp() {
     parent::setUp();
     // Set up an additional language.
-    $this->langcodes = array(language_default()->id, 'es');
+    $this->langcodes = array(language_default()->getId(), 'es');
     ConfigurableLanguage::createFromLangcode('es')->save();
 
     // Create a content type.
@@ -101,7 +101,7 @@ protected function setUp() {
 
     // Enable content translation.
     $configuration = array(
-      'langcode' => language_default()->id,
+      'langcode' => language_default()->getId(),
       'language_show' => TRUE,
     );
     language_save_default_configuration('node', $this->bundle, $configuration);
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php b/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
index 9655e46..ae30c3a 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
@@ -103,7 +103,7 @@ protected function setupLanguages() {
     foreach ($this->langcodes as $langcode) {
       ConfigurableLanguage::createFromLangcode($langcode)->save();
     }
-    array_unshift($this->langcodes, \Drupal::languageManager()->getDefaultLanguage()->id);
+    array_unshift($this->langcodes, \Drupal::languageManager()->getDefaultLanguage()->getId());
   }
 
   /**
diff --git a/core/modules/field/src/Plugin/views/field/Field.php b/core/modules/field/src/Plugin/views/field/Field.php
index 7788a5b..99c5e96 100644
--- a/core/modules/field/src/Plugin/views/field/Field.php
+++ b/core/modules/field/src/Plugin/views/field/Field.php
@@ -933,7 +933,7 @@ function field_langcode(EntityInterface $entity) {
       // no data for the selected language. FieldItemListInterface::view() does
       // this as well, but since the returned language code is used before
       // calling it, the fallback needs to happen explicitly.
-      $langcode = $this->entityManager->getTranslationFromContext($entity, $langcode)->language()->id;
+      $langcode = $this->entityManager->getTranslationFromContext($entity, $langcode)->language()->getId();
 
       return $langcode;
     }
diff --git a/core/modules/field/src/Tests/TranslationTest.php b/core/modules/field/src/Tests/TranslationTest.php
index f37bdf6..3a436c7 100644
--- a/core/modules/field/src/Tests/TranslationTest.php
+++ b/core/modules/field/src/Tests/TranslationTest.php
@@ -167,7 +167,7 @@ function testTranslatableFieldSaveLoad() {
 
     // @todo Test every translation once the Entity Translation API allows for
     //   multilingual defaults.
-    $langcode = $entity->language()->id;
+    $langcode = $entity->language()->getId();
     $this->assertEqual($entity->getTranslation($langcode)->{$field_name_default}->getValue(), $instance->default_value, format_string('Default value correctly populated for language %language.', array('%language' => $langcode)));
 
     // Check that explicit empty values are not overridden with default values.
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module
index a419156..d7e99cc 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module
@@ -92,7 +92,7 @@ function field_test_entity_display_build_alter(&$output, $context) {
   }
 
   if (isset($output['test_field'])) {
-    $output['test_field'][] = array('#markup' => 'entity language is ' . $context['entity']->language()->id);
+    $output['test_field'][] = array('#markup' => 'entity language is ' . $context['entity']->language()->getId());
   }
 }
 
diff --git a/core/modules/file/src/Tests/FileFieldWidgetTest.php b/core/modules/file/src/Tests/FileFieldWidgetTest.php
index 5343fc8..9ae0940 100644
--- a/core/modules/file/src/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/src/Tests/FileFieldWidgetTest.php
@@ -201,7 +201,7 @@ function testMultiValuedWidget() {
    */
   function testPrivateFileSetting() {
     // Grant the admin user required permissions.
-    user_role_grant_permissions($this->admin_user->roles[0]->target_id, array('administer node fields'));
+    user_role_grant_permissions($this->admin_user->roles[0]->value, array('administer node fields'));
 
     $type_name = 'article';
     $field_name = strtolower($this->randomMachineName());
diff --git a/core/modules/file/src/Tests/FileTokenReplaceTest.php b/core/modules/file/src/Tests/FileTokenReplaceTest.php
index 36fe888..450c778 100644
--- a/core/modules/file/src/Tests/FileTokenReplaceTest.php
+++ b/core/modules/file/src/Tests/FileTokenReplaceTest.php
@@ -48,10 +48,10 @@ function testFileTokenReplacement() {
     $tests['[file:mime]'] = String::checkPlain($file->getMimeType());
     $tests['[file:size]'] = format_size($file->getSize());
     $tests['[file:url]'] = String::checkPlain(file_create_url($file->getFileUri()));
-    $tests['[file:created]'] = format_date($file->getCreatedTime(), 'medium', '', NULL, $language_interface->id);
-    $tests['[file:created:short]'] = format_date($file->getCreatedTime(), 'short', '', NULL, $language_interface->id);
-    $tests['[file:changed]'] = format_date($file->getChangedTime(), 'medium', '', NULL, $language_interface->id);
-    $tests['[file:changed:short]'] = format_date($file->getChangedTime(), 'short', '', NULL, $language_interface->id);
+    $tests['[file:created]'] = format_date($file->getCreatedTime(), 'medium', '', NULL, $language_interface->getId());
+    $tests['[file:created:short]'] = format_date($file->getCreatedTime(), 'short', '', NULL, $language_interface->getId());
+    $tests['[file:changed]'] = format_date($file->getChangedTime(), 'medium', '', NULL, $language_interface->getId());
+    $tests['[file:changed:short]'] = format_date($file->getChangedTime(), 'short', '', NULL, $language_interface->getId());
     $tests['[file:owner]'] = String::checkPlain(user_format_name($this->admin_user));
     $tests['[file:owner:uid]'] = $file->getOwnerId();
 
@@ -59,7 +59,7 @@ function testFileTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('file' => $file), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('file' => $file), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized file token %token replaced.', array('%token' => $input)));
     }
 
@@ -70,7 +70,7 @@ function testFileTokenReplacement() {
     $tests['[file:size]'] = format_size($file->getSize());
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('file' => $file), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
+      $output = $token_service->replace($input, array('file' => $file), array('langcode' => $language_interface->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized file token %token replaced.', array('%token' => $input)));
     }
   }
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 1423f5e..79ef7b3 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -244,13 +244,13 @@ function filter_formats(AccountInterface $account = NULL) {
   // All available formats are cached for performance.
   if (!isset($formats['all'])) {
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
-    if ($cache = \Drupal::cache()->get("filter_formats:{$language_interface->id}")) {
+    if ($cache = \Drupal::cache()->get("filter_formats:{$language_interface->getId()}")) {
       $formats['all'] = $cache->data;
     }
     else {
       $formats['all'] = \Drupal::entityManager()->getStorage('filter_format')->loadByProperties(array('status' => TRUE));
       uasort($formats['all'], 'Drupal\Core\Config\Entity\ConfigEntityBase::sort');
-      \Drupal::cache()->set("filter_formats:{$language_interface->id}", $formats['all'], Cache::PERMANENT, array('filter_formats' => TRUE));
+      \Drupal::cache()->set("filter_formats:{$language_interface->getId()}", $formats['all'], Cache::PERMANENT, array('filter_formats' => TRUE));
     }
   }
 
diff --git a/core/modules/filter/src/Tests/FilterCrudTest.php b/core/modules/filter/src/Tests/FilterCrudTest.php
index 75bf568..37d1232 100644
--- a/core/modules/filter/src/Tests/FilterCrudTest.php
+++ b/core/modules/filter/src/Tests/FilterCrudTest.php
@@ -78,7 +78,7 @@ function testTextFormatCrud() {
    */
   function verifyTextFormat($format) {
     $t_args = array('%format' => $format->name);
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
 
     // Verify the loaded filter has all properties.
     $filter_format = entity_load('filter_format', $format->format);
diff --git a/core/modules/forum/src/Form/Overview.php b/core/modules/forum/src/Form/Overview.php
index eb05b3a..126d845 100644
--- a/core/modules/forum/src/Form/Overview.php
+++ b/core/modules/forum/src/Form/Overview.php
@@ -31,19 +31,29 @@ class Overview extends OverviewTerms {
   /**
    * Constructs a \Drupal\forum\Form\OverviewForm object.
    *
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler service.
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager service.
+   * @param \Drupal\Core\Extension\ModuleHandlerInteface $module_handler
+   *   The module handler service.
    */
-  public function __construct(ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager) {
-    parent::__construct($module_handler, $entity_manager);
+  public function __construct(EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler) {
+    parent::__construct($module_handler);
     $this->entityManager = $entity_manager;
   }
 
   /**
    * {@inheritdoc}
    */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('entity.manager'),
+      $container->get('module_handler')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getFormId() {
     return 'forum_overview';
   }
diff --git a/core/modules/forum/src/ForumManager.php b/core/modules/forum/src/ForumManager.php
index ec410de..442d794 100644
--- a/core/modules/forum/src/ForumManager.php
+++ b/core/modules/forum/src/ForumManager.php
@@ -463,7 +463,7 @@ public function resetCache() {
    * {@inheritdoc}
    */
   public function getParents($tid) {
-    return $this->entityManager->getStorage('taxonomy_term')->loadAllParents($tid);
+    return taxonomy_term_load_parents_all($tid);
   }
 
   /**
diff --git a/core/modules/forum/src/Tests/ForumTest.php b/core/modules/forum/src/Tests/ForumTest.php
index ebda138..1493bde 100644
--- a/core/modules/forum/src/Tests/ForumTest.php
+++ b/core/modules/forum/src/Tests/ForumTest.php
@@ -296,7 +296,7 @@ private function doAdminTests($user) {
       'name' => 'Tags',
       'description' => $description,
       'vid' => 'tags',
-      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->id,
+      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
       'help' => $help,
     ));
     $vocabulary->save();
diff --git a/core/modules/forum/src/Tests/ForumUninstallTest.php b/core/modules/forum/src/Tests/ForumUninstallTest.php
index 388910c..eb57a5d 100644
--- a/core/modules/forum/src/Tests/ForumUninstallTest.php
+++ b/core/modules/forum/src/Tests/ForumUninstallTest.php
@@ -37,7 +37,7 @@ function testForumUninstallWithField() {
     // Create a taxonomy term.
     $term = entity_create('taxonomy_term', array(
       'name' => t('A term'),
-      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->id,
+      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
       'description' => '',
       'parent' => array(0),
       'vid' => 'forums',
diff --git a/core/modules/hal/src/Normalizer/FieldNormalizer.php b/core/modules/hal/src/Normalizer/FieldNormalizer.php
index 99a669c..d898815 100644
--- a/core/modules/hal/src/Normalizer/FieldNormalizer.php
+++ b/core/modules/hal/src/Normalizer/FieldNormalizer.php
@@ -26,9 +26,11 @@ class FieldNormalizer extends NormalizerBase {
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
    */
   public function normalize($field, $format = NULL, array $context = array()) {
+    /** @var \Drupal\Core\Field\FieldItemInterface $field */
     $normalized_field_items = array();
 
     // Get the field definition.
+    /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
     $entity = $field->getEntity();
     $field_name = $field->getName();
     $field_definition = $field->getFieldDefinition();
@@ -43,8 +45,8 @@ public function normalize($field, $format = NULL, array $context = array()) {
     // to the field item values.
     else {
       foreach ($entity->getTranslationLanguages() as $language) {
-        $context['langcode'] = $language->id;
-        $translation = $entity->getTranslation($language->id);
+        $context['langcode'] = $language->getId();
+        $translation = $entity->getTranslation($language->getId());
         $translated_field = $translation->get($field_name);
         $normalized_field_items = array_merge($normalized_field_items, $this->normalizeFieldItems($translated_field, $format, $context));
       }
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 96c0a3f..e1b6d90 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -368,11 +368,11 @@ function language_get_default_langcode($entity_type, $bundle) {
   $language_interface = \Drupal::languageManager()->getCurrentLanguage();
   switch ($configuration['langcode']) {
     case 'site_default':
-      $default_value = \Drupal::languageManager()->getDefaultLanguage()->id;
+      $default_value = \Drupal::languageManager()->getDefaultLanguage()->getId();
       break;
 
     case 'current_interface':
-      $default_value = $language_interface->id;
+      $default_value = $language_interface->getId();
       break;
 
     case 'authors_default':
@@ -382,7 +382,7 @@ function language_get_default_langcode($entity_type, $bundle) {
         $default_value = $language_code;
       }
       else {
-        $default_value = $language_interface->id;
+        $default_value = $language_interface->getId();
       }
       break;
   }
@@ -444,10 +444,10 @@ function language_negotiation_url_prefixes_update() {
   foreach (\Drupal::languageManager()->getLanguages() as $language) {
     // The prefix for this language should be updated if it's not assigned yet
     // or the prefix is set to the empty string.
-    if (empty($prefixes[$language->id])) {
+    if (empty($prefixes[$language->getId()])) {
       // For the default language, set the prefix to the empty string,
       // otherwise use the langcode.
-      $prefixes[$language->id] = !empty($language->default) ? '' : $language->id;
+      $prefixes[$language->getId()] = $language->isDefault() ? '' : $language->getId();
     }
     // Otherwise we keep the configured prefix.
   }
@@ -577,7 +577,7 @@ function language_form_system_regional_settings_alter(&$form, FormStateInterface
   $form['locale']['site_default_language'] = array(
     '#type' => 'select',
     '#title' => t('Default language'),
-    '#default_value' => $default->id,
+    '#default_value' => $default->getId(),
     '#options' => $language_options,
     '#description' => t('It is not recommended to change the default language on a working site. <a href="@language-detection">Configure the Selected language</a> setting on the detection and selection page to change the fallback language for language selection.', array('@language-detection' => url('admin/config/regional/language/detection'))),
     '#weight' => -1,
diff --git a/core/modules/language/src/Config/LanguageConfigFactoryOverride.php b/core/modules/language/src/Config/LanguageConfigFactoryOverride.php
index 24c4bf5..a0fbbfe 100644
--- a/core/modules/language/src/Config/LanguageConfigFactoryOverride.php
+++ b/core/modules/language/src/Config/LanguageConfigFactoryOverride.php
@@ -116,7 +116,7 @@ public function getStorage($langcode) {
    * {@inheritdoc}
    */
   public function getCacheSuffix() {
-    return $this->language ? $this->language->id : NULL;
+    return $this->language ? $this->language->getId() : NULL;
   }
 
   /**
diff --git a/core/modules/language/src/ConfigurableLanguageManager.php b/core/modules/language/src/ConfigurableLanguageManager.php
index 1726236..6b552df 100644
--- a/core/modules/language/src/ConfigurableLanguageManager.php
+++ b/core/modules/language/src/ConfigurableLanguageManager.php
@@ -81,13 +81,6 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl
   protected $negotiatedLanguages;
 
   /**
-   * An array of language negotiation method IDs keyed by language type.
-   *
-   * @var array
-   */
-  protected $negotiatedMethods;
-
-  /**
    * Whether or not the language manager has been initialized.
    *
    * @var bool
@@ -216,9 +209,7 @@ public function getCurrentLanguage($type = LanguageInterface::TYPE_INTERFACE) {
       if ($this->negotiator && $this->isMultilingual()) {
         if (!$this->initializing) {
           $this->initializing = TRUE;
-          $negotiation = $this->negotiator->initializeType($type);
-          $this->negotiatedLanguages[$type] = reset($negotiation);
-          $this->negotiatedMethods[$type] = key($negotiation);
+          $this->negotiatedLanguages[$type] = $this->negotiator->initializeType($type);
           $this->initializing = FALSE;
         }
         // If the current interface language needs to be retrieved during
@@ -243,7 +234,6 @@ public function reset($type = NULL) {
     if (!isset($type)) {
       $this->initialized = FALSE;
       $this->negotiatedLanguages = array();
-      $this->negotiatedMethods = array();
       $this->languageTypes = NULL;
       $this->languageTypesInfo = NULL;
       $this->languages = NULL;
@@ -253,7 +243,6 @@ public function reset($type = NULL) {
     }
     elseif (isset($this->negotiatedLanguages[$type])) {
       unset($this->negotiatedLanguages[$type]);
-      unset($this->negotiatedMethods[$type]);
     }
     return $this;
   }
@@ -282,7 +271,7 @@ public function getLanguages($flags = LanguageInterface::STATE_CONFIGURABLE) {
       // Prepopulate the language list with the default language to keep things
       // working even if we have no configuration.
       $default = $this->getDefaultLanguage();
-      $this->languages = array($default->id => $default);
+      $this->languages = array($default->getId() => $default);
 
       // Retrieve the list of languages defined in configuration.
       $prefix = 'language.entity.';
@@ -295,7 +284,7 @@ public function getLanguages($flags = LanguageInterface::STATE_CONFIGURABLE) {
         $langcode = $data['id'];
         // Initialize default property so callers have an easy reference and can
         // save the same object without data loss.
-        $data['default'] = ($langcode == $default->id);
+        $data['default'] = ($langcode == $default->getId());
         $data['name'] = $data['label'];
         $this->languages[$langcode] = new Language($data);
         $weight = max(array($weight, $this->languages[$langcode]->weight));
@@ -344,7 +333,7 @@ public function updateLockedLanguageWeights() {
 
     // Loop locked languages to maintain the existing order.
     $locked_languages = $this->getLanguages(LanguageInterface::STATE_LOCKED);
-    $config_ids = array_map(function($language) { return 'language.entity.' . $language->id; }, $locked_languages);
+    $config_ids = array_map(function($language) { return 'language.entity.' . $language->getId(); }, $locked_languages);
     foreach ($this->configFactory->loadMultiple($config_ids) as $config) {
       // Update system languages weight.
       $max_weight++;
@@ -464,13 +453,4 @@ public function getStandardLanguageListWithoutConfigured() {
     return $predefined;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE) {
-    if (isset($this->negotiatedLanguages[$type]) && isset($this->negotiatedMethods[$type])) {
-      return $this->negotiatedMethods[$type];
-    }
-  }
-
 }
diff --git a/core/modules/language/src/ConfigurableLanguageManagerInterface.php b/core/modules/language/src/ConfigurableLanguageManagerInterface.php
index 0e281a8..f3b2ff2 100644
--- a/core/modules/language/src/ConfigurableLanguageManagerInterface.php
+++ b/core/modules/language/src/ConfigurableLanguageManagerInterface.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\language;
 
-use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Symfony\Component\HttpFoundation\Request;
 
@@ -97,16 +96,4 @@ public function getLanguageConfigOverrideStorage($langcode);
    */
   public function getStandardLanguageListWithoutConfigured();
 
-  /**
-   * Gets the negotiated language method ID.
-   *
-   * @param string $type
-   *   (optional) The language type; e.g., the interface or the content
-   *   language.
-   *
-   * @return string
-   *   The negotiated language method ID.
-   */
-  public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE);
-
 }
diff --git a/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php b/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
index c543fc7..c3218ff 100644
--- a/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
+++ b/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
@@ -85,7 +85,7 @@ public function onKernelRequestLanguage(GetResponseEvent $event) {
       }
       // After the language manager has initialized, set the default langcode
       // for the string translations.
-      $langcode = $this->languageManager->getCurrentLanguage()->id;
+      $langcode = $this->languageManager->getCurrentLanguage()->getId();
       $this->translation->setDefaultLangcode($langcode);
     }
   }
diff --git a/core/modules/language/src/Form/LanguageDeleteForm.php b/core/modules/language/src/Form/LanguageDeleteForm.php
index 5b1d2f6..32fb889 100644
--- a/core/modules/language/src/Form/LanguageDeleteForm.php
+++ b/core/modules/language/src/Form/LanguageDeleteForm.php
@@ -89,7 +89,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     $langcode = $this->entity->id();
 
     // Warn and redirect user when attempting to delete the default language.
-    if (language_default()->id == $langcode) {
+    if (language_default()->getId() == $langcode) {
       drupal_set_message($this->t('The default language cannot be deleted.'));
       $url = $this->urlGenerator->generateFromPath('admin/config/regional/language', array('absolute' => TRUE));
       return new RedirectResponse($url);
diff --git a/core/modules/language/src/Form/LanguageFormBase.php b/core/modules/language/src/Form/LanguageFormBase.php
index f463270..6dd71cc 100644
--- a/core/modules/language/src/Form/LanguageFormBase.php
+++ b/core/modules/language/src/Form/LanguageFormBase.php
@@ -51,7 +51,7 @@ public static function create(ContainerInterface $container) {
   public function commonForm(array &$form) {
     /** @var $language \Drupal\language\Entity\ConfigurableLanguage */
     $language = $this->entity;
-    if ($language->id()) {
+    if ($language->getId()) {
       $form['langcode_view'] = array(
         '#type' => 'item',
         '#title' => $this->t('Language code'),
diff --git a/core/modules/language/src/Form/NegotiationUrlForm.php b/core/modules/language/src/Form/NegotiationUrlForm.php
index e2e241e..b14ed6a 100644
--- a/core/modules/language/src/Form/NegotiationUrlForm.php
+++ b/core/modules/language/src/Form/NegotiationUrlForm.php
@@ -73,7 +73,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     $prefixes = language_negotiation_url_prefixes();
     $domains = language_negotiation_url_domains();
     foreach ($languages as $langcode => $language) {
-      $t_args = array('%language' => $language->name, '%langcode' => $language->id);
+      $t_args = array('%language' => $language->name, '%langcode' => $language->getId());
       $form['prefix'][$langcode] = array(
         '#type' => 'textfield',
         '#title' => $language->default ? $this->t('%language (%langcode) path prefix (Default language)', $t_args) : $this->t('%language (%langcode) path prefix', $t_args),
@@ -83,7 +83,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       );
       $form['domain'][$langcode] = array(
         '#type' => 'textfield',
-        '#title' => $this->t('%language (%langcode) domain', array('%language' => $language->name, '%langcode' => $language->id)),
+        '#title' => $this->t('%language (%langcode) domain', array('%language' => $language->name, '%langcode' => $language->getId())),
         '#maxlength' => 128,
         '#default_value' => isset($domains[$langcode]) ? $domains[$langcode] : '',
       );
diff --git a/core/modules/language/src/LanguageListBuilder.php b/core/modules/language/src/LanguageListBuilder.php
index c8dbe13..42ec9d3 100644
--- a/core/modules/language/src/LanguageListBuilder.php
+++ b/core/modules/language/src/LanguageListBuilder.php
@@ -50,7 +50,7 @@ public function getDefaultOperations(EntityInterface $entity) {
     $default = language_default();
 
     // Deleting the site default language is not allowed.
-    if ($entity->id() == $default->id) {
+    if ($entity->id() == $default->getId()) {
       unset($operations['delete']);
     }
 
diff --git a/core/modules/language/src/LanguageNegotiationMethodBase.php b/core/modules/language/src/LanguageNegotiationMethodBase.php
index f86a1db..3fc6218 100644
--- a/core/modules/language/src/LanguageNegotiationMethodBase.php
+++ b/core/modules/language/src/LanguageNegotiationMethodBase.php
@@ -62,7 +62,8 @@ public function setCurrentUser(AccountInterface $current_user) {
    * {@inheritdoc}
    */
   public function persist(LanguageInterface $language) {
-    // Default implementation persists nothing.
+    // Remember the method ID used to detect the language.
+    $language->method_id = LanguageNegotiatorInterface::METHOD_ID;
   }
 
 }
diff --git a/core/modules/language/src/LanguageNegotiator.php b/core/modules/language/src/LanguageNegotiator.php
index 216d328..4cd648f 100644
--- a/core/modules/language/src/LanguageNegotiator.php
+++ b/core/modules/language/src/LanguageNegotiator.php
@@ -73,7 +73,7 @@ class LanguageNegotiator implements LanguageNegotiatorInterface {
    *
    * @var array
    */
-  protected $negotiatedLanguages = array();
+  protected $negotiatedLanguages;
 
   /**
    * Constructs a new LanguageNegotiator object.
@@ -152,8 +152,7 @@ public function initializeType($type) {
     if (!$language) {
       // If no other language was found use the default one.
       $language = $this->languageManager->getDefaultLanguage();
-      $method_id = static::METHOD_ID;
-    }
+      $method_id = static::METHOD_ID;    }
 
     return array($method_id => $language);
   }
diff --git a/core/modules/language/src/LanguageNegotiatorInterface.php b/core/modules/language/src/LanguageNegotiatorInterface.php
index c5991c2..8f5d3eb 100644
--- a/core/modules/language/src/LanguageNegotiatorInterface.php
+++ b/core/modules/language/src/LanguageNegotiatorInterface.php
@@ -90,7 +90,7 @@
  *       // If we are on an administrative path, override with the default
  *       language.
  *       if ($request->query->has('q') && strtok($request->query->get('q'), '/') == 'admin') {
- *         return $this->languageManager->getDefaultLanguage()->id;
+ *         return $this->languageManager->getDefaultLanguage()->getId();
  *       }
  *       return $langcode;
  *     }
@@ -128,10 +128,8 @@ public function setCurrentUser(AccountInterface $current_user);
    * @param string $type
    *   The language type to be initialized.
    *
-   * @return \Drupal\Core\Language\LanguageInterface[]
-   *   Returns an array containing a single language keyed by the language
-   *   negotiation method ID used to determine the language of the specified
-   *   type. If negotiation is not possible the default language is returned.
+   * @return \Drupal\Core\Language\LanguageInterface
+   *   Return either the language of the specified type or the default language.
    */
   public function initializeType($type);
 
diff --git a/core/modules/language/src/Plugin/Condition/Language.php b/core/modules/language/src/Plugin/Condition/Language.php
index 523c3df..07095e1 100644
--- a/core/modules/language/src/Plugin/Condition/Language.php
+++ b/core/modules/language/src/Plugin/Condition/Language.php
@@ -34,7 +34,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
       $languages = language_list(LanguageInterface::STATE_CONFIGURABLE);
       $langcodes_options = array();
       foreach ($languages as $language) {
-        $langcodes_options[$language->id] = $language->getName();
+        $langcodes_options[$language->getId()] = $language->getName();
       }
       $form['langcodes'] = array(
         '#type' => 'checkboxes',
@@ -71,8 +71,8 @@ public function summary() {
     $language_names = array_reduce($language_list, function(&$result, $item) use ($selected) {
       // If the current item of the $language_list array is one of the selected
       // languages, add it to the $results array.
-      if (!empty($selected[$item->id])) {
-        $result[$item->id] = $item->name;
+      if (!empty($selected[$item->getId()])) {
+        $result[$item->getId()] = $item->name;
       }
       return $result;
     }, array());
@@ -101,7 +101,7 @@ public function evaluate() {
 
     $language = $this->getContextValue('language');
     // Language visibility settings.
-    return !empty($this->configuration['langcodes'][$language->id]);
+    return !empty($this->configuration['langcodes'][$language->getId()]);
   }
 
   /**
diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php
index dc5617d..d1ab4e6 100644
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php
@@ -69,9 +69,11 @@ public function getLangcode(Request $request = NULL) {
    * {@inheritdoc}
    */
   public function persist(LanguageInterface $language) {
+    parent::persist($language);
+
     // We need to update the session parameter with the request value only if we
     // have an authenticated user.
-    $langcode = $language->id;
+    $langcode = $language->getId();
     if ($langcode && $this->languageManager) {
       $languages = $this->languageManager->getLanguages();
       if ($this->currentUser->isAuthenticated() && isset($languages[$langcode])) {
@@ -125,12 +127,12 @@ function getLanguageSwitchLinks(Request $request, $type, $path) {
     $links = array();
     $config = $this->config->get('language.negotiation')->get('session');
     $param = $config['parameter'];
-    $language_query = isset($_SESSION[$param]) ? $_SESSION[$param] : $this->languageManager->getCurrentLanguage($type)->id;
+    $language_query = isset($_SESSION[$param]) ? $_SESSION[$param] : $this->languageManager->getCurrentLanguage($type)->getId();
     $query = array();
     parse_str($request->getQueryString(), $query);
 
     foreach ($this->languageManager->getNativeLanguages() as $language) {
-      $langcode = $language->id;
+      $langcode = $language->getId();
       $links[$langcode] = array(
         'href' => $path,
         'title' => $language->getName(),
diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php
index a96dcbd..fd7eb75 100644
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php
@@ -32,7 +32,7 @@ class LanguageNegotiationUI extends LanguageNegotiationMethodBase {
    * {@inheritdoc}
    */
   public function getLangcode(Request $request = NULL) {
-    return $this->languageManager ? $this->languageManager->getCurrentLanguage()->id : NULL;
+    return $this->languageManager ? $this->languageManager->getCurrentLanguage()->getId() : NULL;
   }
 
 }
diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
index be9f915..c72e5a0 100644
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
@@ -64,14 +64,14 @@ public function getLangcode(Request $request = NULL) {
           // Search prefix within added languages.
           $negotiated_language = FALSE;
           foreach ($languages as $language) {
-            if (isset($config['prefixes'][$language->id]) && $config['prefixes'][$language->id] == $prefix) {
+            if (isset($config['prefixes'][$language->getId()]) && $config['prefixes'][$language->getId()] == $prefix) {
               $negotiated_language = $language;
               break;
             }
           }
 
           if ($negotiated_language) {
-            $langcode = $negotiated_language->id;
+            $langcode = $negotiated_language->getId();
           }
           break;
 
@@ -80,13 +80,13 @@ public function getLangcode(Request $request = NULL) {
           $http_host = $request->getHost();
           foreach ($languages as $language) {
             // Skip the check if the language doesn't have a domain.
-            if (!empty($config['domains'][$language->id])) {
+            if (!empty($config['domains'][$language->getId()])) {
               // Ensure that there is exactly one protocol in the URL when
               // checking the hostname.
-              $host = 'http://' . str_replace(array('http://', 'https://'), '', $config['domains'][$language->id]);
+              $host = 'http://' . str_replace(array('http://', 'https://'), '', $config['domains'][$language->getId()]);
               $host = parse_url($host, PHP_URL_HOST);
               if ($http_host == $host) {
-                $langcode = $language->id;
+                $langcode = $language->getId();
                 break;
               }
             }
@@ -108,7 +108,7 @@ public function processInbound($path, Request $request) {
 
     // Search prefix within added languages.
     foreach ($this->languageManager->getLanguages() as $language) {
-      if (isset($config['prefixes'][$language->id]) && $config['prefixes'][$language->id] == $prefix) {
+      if (isset($config['prefixes'][$language->getId()]) && $config['prefixes'][$language->getId()] == $prefix) {
         // Rebuild $path with the language removed.
         $path = implode('/', $parts);
         break;
@@ -135,17 +135,17 @@ public function processOutbound($path, &$options = array(), Request $request = N
       $options['language'] = $language_url;
     }
     // We allow only added languages here.
-    elseif (!is_object($options['language']) || !isset($languages[$options['language']->id])) {
+    elseif (!is_object($options['language']) || !isset($languages[$options['language']->getId()])) {
       return $path;
     }
     $config = $this->config->get('language.negotiation')->get('url');
     if ($config['source'] == LanguageNegotiationUrl::CONFIG_PATH_PREFIX) {
-      if (is_object($options['language']) && !empty($config['prefixes'][$options['language']->id])) {
-        $options['prefix'] = $config['prefixes'][$options['language']->id] . '/';
+      if (is_object($options['language']) && !empty($config['prefixes'][$options['language']->getId()])) {
+        $options['prefix'] = $config['prefixes'][$options['language']->getId()] . '/';
       }
     }
     elseif ($config['source'] ==  LanguageNegotiationUrl::CONFIG_DOMAIN) {
-      if (is_object($options['language']) && !empty($config['domains'][$options['language']->id])) {
+      if (is_object($options['language']) && !empty($config['domains'][$options['language']->getId()])) {
 
         // Save the original base URL. If it contains a port, we need to
         // retain it below.
@@ -156,7 +156,7 @@ public function processOutbound($path, &$options = array(), Request $request = N
 
         // Ask for an absolute URL with our modified base URL.
         $options['absolute'] = TRUE;
-        $options['base_url'] = $url_scheme . '://' . $config['domains'][$options['language']->id];
+        $options['base_url'] = $url_scheme . '://' . $config['domains'][$options['language']->getId()];
 
         // In case either the original base URL or the HTTP host contains a
         // port, retain it.
@@ -191,7 +191,7 @@ function getLanguageSwitchLinks(Request $request, $type, $path) {
     $links = array();
 
     foreach ($this->languageManager->getNativeLanguages() as $language) {
-      $links[$language->id] = array(
+      $links[$language->getId()] = array(
         'href' => $path,
         'title' => $language->getName(),
         'language' => $language,
diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php
index 6f771e8..abaa6e3 100644
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php
@@ -62,11 +62,11 @@ public function getLangcode(Request $request = NULL) {
       // information, a missing URL language information indicates that URL
       // language should be the default one, otherwise we fall back to an
       // already detected language.
-      if (($prefix && empty($config['prefixes'][$default->id])) || (!$prefix && empty($config['domains'][$default->id]))) {
-        $langcode = $default->id;
+      if (($prefix && empty($config['prefixes'][$default->getId()])) || (!$prefix && empty($config['domains'][$default->getId()]))) {
+        $langcode = $default->getId();
       }
       else {
-        $langcode = $this->languageManager->getCurrentLanguage()->id;
+        $langcode = $this->languageManager->getCurrentLanguage()->getId();
       }
     }
 
diff --git a/core/modules/language/src/Tests/LanguageConfigurationElementTest.php b/core/modules/language/src/Tests/LanguageConfigurationElementTest.php
index 4f3d880..dd103a3 100644
--- a/core/modules/language/src/Tests/LanguageConfigurationElementTest.php
+++ b/core/modules/language/src/Tests/LanguageConfigurationElementTest.php
@@ -77,7 +77,7 @@ public function testDefaultLangcode() {
     language_save_default_configuration('custom_type', 'custom_bundle', array('langcode' => 'current_interface', 'language_show' => TRUE));
     $langcode = language_get_default_langcode('custom_type', 'custom_bundle');
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
-    $this->assertEqual($langcode, $language_interface->id);
+    $this->assertEqual($langcode, $language_interface->getId());
 
     // Site's default.
     $old_default = \Drupal::languageManager()->getDefaultLanguage();
diff --git a/core/modules/language/src/Tests/LanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageConfigurationTest.php
index c154429..cc22d03 100644
--- a/core/modules/language/src/Tests/LanguageConfigurationTest.php
+++ b/core/modules/language/src/Tests/LanguageConfigurationTest.php
@@ -155,7 +155,7 @@ protected function checkConfigurableLanguageWeight($state = 'by default') {
     $replacements = array('@event' => $state);
     foreach (\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_LOCKED) as $locked_language) {
       $replacements['%language'] = $locked_language->name;
-      $this->assertTrue($locked_language->weight > $max_configurable_language_weight, format_string('System language %language has higher weight than configurable languages @event', $replacements));
+      $this->assertTrue($locked_language->getWeight() > $max_configurable_language_weight, format_string('System language %language has higher weight than configurable languages @event', $replacements));
     }
   }
 
diff --git a/core/modules/language/src/Tests/LanguageDependencyInjectionTest.php b/core/modules/language/src/Tests/LanguageDependencyInjectionTest.php
index 44776bb..a45e9c5 100644
--- a/core/modules/language/src/Tests/LanguageDependencyInjectionTest.php
+++ b/core/modules/language/src/Tests/LanguageDependencyInjectionTest.php
@@ -53,7 +53,7 @@ function testDependencyInjectedNewDefaultLanguage() {
     // The language system creates a Language object which contains the
     // same properties as the new default language object.
     $result = \Drupal::languageManager()->getCurrentLanguage();
-    $this->assertIdentical($result->id, 'fr');
+    $this->assertIdentical($result->getId(), 'fr');
 
     // Delete the language to check that we fallback to the default.
     try {
@@ -69,7 +69,7 @@ function testDependencyInjectedNewDefaultLanguage() {
     $default_language->save();
     entity_delete_multiple('configurable_language', array('fr'));
     $result = \Drupal::languageManager()->getCurrentLanguage();
-    $this->assertIdentical($result->id, $default_language->id);
+    $this->assertIdentical($result->getId(), $default_language->getId());
   }
 
 }
diff --git a/core/modules/language/src/Tests/LanguagePathMonolingualTest.php b/core/modules/language/src/Tests/LanguagePathMonolingualTest.php
index d6342e5..c574f91 100644
--- a/core/modules/language/src/Tests/LanguagePathMonolingualTest.php
+++ b/core/modules/language/src/Tests/LanguagePathMonolingualTest.php
@@ -51,7 +51,7 @@ protected function setUp() {
     // Verify that French is the only language.
     $this->container->get('language_manager')->reset();
     $this->assertFalse(\Drupal::languageManager()->isMultilingual(), 'Site is mono-lingual');
-    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->id, 'fr', 'French is the default language');
+    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->getId(), 'fr', 'French is the default language');
 
     // Set language detection to URL.
     $edit = array('language_interface[enabled][language-url]' => TRUE);
diff --git a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
index 4a4658f..ef164c4 100644
--- a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
+++ b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
@@ -85,7 +85,7 @@ private function checkUrl($language, $message1, $message2) {
     // If the rewritten URL has not a language prefix we pick a random prefix so
     // we can always check the prefixed URL.
     $prefixes = language_negotiation_url_prefixes();
-    $stored_prefix = isset($prefixes[$language->id]) ? $prefixes[$language->id] : $this->randomMachineName();
+    $stored_prefix = isset($prefixes[$language->getId()]) ? $prefixes[$language->getId()] : $this->randomMachineName();
     if ($this->assertNotEqual($stored_prefix, $prefix, $message1)) {
       $prefix = $stored_prefix;
     }
diff --git a/core/modules/language/tests/language_test/language_test.module b/core/modules/language/tests/language_test/language_test.module
index 6e81581..c340f22 100644
--- a/core/modules/language/tests/language_test/language_test.module
+++ b/core/modules/language/tests/language_test/language_test.module
@@ -12,9 +12,9 @@
  * Implements hook_page_build().
  */
 function language_test_page_build() {
-  if (\Drupal::moduleHandler()->moduleExists('language')) {
-    language_test_store_language_negotiation();
-    drupal_set_message(t('Language negotiation method: @name', array('@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod())));
+  language_test_store_language_negotiation();
+  if (\Drupal::languageManager()->getCurrentLanguage()->getId() && \Drupal::languageManager()->getCurrentLanguage()->method_id()) {
+    drupal_set_message(t('Language negotiation method: @name', array('@name' => \Drupal::languageManager()->getCurrentLanguage()->method_id)));
   }
 }
 
@@ -66,11 +66,13 @@ function language_test_language_negotiation_info_alter(array &$negotiation_info)
  * Store the last negotiated languages.
  */
 function language_test_store_language_negotiation() {
-  $last = array();
-  foreach (\Drupal::languageManager()->getDefinedLanguageTypes() as $type) {
-    $last[$type] = \Drupal::languageManager()->getCurrentLanguage($type)->id;
+  if (\Drupal::moduleHandler()->moduleExists('language')) {
+    $last = array();
+    foreach (\Drupal::languageManager()->getDefinedLanguageTypes() as $type) {
+      $last[$type] = \Drupal::languageManager()->getCurrentLanguage($type)->getId();
+    }
+    \Drupal::state()->set('language_test.language_negotiation_last', $last);
   }
-  \Drupal::state()->set('language_test.language_negotiation_last', $last);
 }
 
 /**
diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
index 7f2684b..bf62cf7 100644
--- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
+++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
@@ -27,13 +27,17 @@ class LanguageNegotiationUrlTest extends UnitTestCase {
   protected function setUp() {
 
     // Set up some languages to be used by the language-based path processor.
+    $language_de = $this->getMock('\Drupal\Core\Language\LanguageInterface');
+    $language_de->expects($this->any())
+      ->method('getId')
+      ->will($this->returnValue('de'));
+    $language_en = $this->getMock('\Drupal\Core\Language\LanguageInterface');
+    $language_en->expects($this->any())
+      ->method('getId')
+      ->will($this->returnValue('en'));
     $languages = array(
-      'de' => (object) array(
-        'id' => 'de',
-      ),
-      'en' => (object) array(
-        'id' => 'en',
-      ),
+      'de' => $language_de,
+      'en' => $language_en,
     );
 
     // Create a language manager stub.
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 11ffc27..2c698e7 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -218,7 +218,7 @@ function locale_configurable_language_insert(ConfigurableLanguage $language) {
   // Changing the language settings impacts the interface: clear render cache.
   \Drupal::cache('render')->deleteAll();
   // Force JavaScript translation file re-creation for the new language.
-  _locale_invalidate_js($language->id());
+  _locale_invalidate_js($language->id);
 }
 
 /**
@@ -229,7 +229,7 @@ function locale_configurable_language_update(ConfigurableLanguage $language) {
   // Changing the language settings impacts the interface: clear render cache.
   \Drupal::cache('render')->deleteAll();
   // Force JavaScript translation file re-creation for the modified language.
-  _locale_invalidate_js($language->id());
+  _locale_invalidate_js($language->id);
 }
 
 /**
@@ -237,22 +237,22 @@ function locale_configurable_language_update(ConfigurableLanguage $language) {
  */
 function locale_configurable_language_delete(ConfigurableLanguage $language) {
   // Remove translations.
-  \Drupal::service('locale.storage')->deleteTranslations(array('language' => $language->id()));
+  \Drupal::service('locale.storage')->deleteTranslations(array('language' => $language->id));
 
   // Remove interface translation files.
   module_load_include('inc', 'locale', 'locale.bulk');
-  locale_translate_delete_translation_files(array(), array($language->id()));
+  locale_translate_delete_translation_files(array(), array($language->id));
 
   // Remove translated configuration objects.
-  \Drupal\locale\Locale::config()->deleteLanguageTranslations($language->id());
+  \Drupal\locale\Locale::config()->deleteLanguageTranslations($language->id);
 
   // Changing the language settings impacts the interface:
-  _locale_invalidate_js($language->id());
+  _locale_invalidate_js($language->id);
   \Drupal::cache('render')->deleteAll();
 
   // Clear locale translation caches.
-  locale_translation_status_delete_languages(array($language->id()));
-  \Drupal::cache()->delete('locale:' . $language->id());
+  locale_translation_status_delete_languages(array($language->id));
+  \Drupal::cache()->delete('locale:' . $language->id);
 }
 
 /**
@@ -295,7 +295,7 @@ function locale_get_plural($count, $langcode = NULL) {
   // individually for each language.
   $plural_indexes = &drupal_static(__FUNCTION__ . ':plurals', array());
 
-  $langcode = $langcode ? $langcode : $language_interface->id;
+  $langcode = $langcode ? $langcode : $language_interface->getId();
 
   if (!isset($plural_indexes[$langcode][$count])) {
     // Retrieve and statically cache the plural formulas for all languages.
@@ -590,11 +590,11 @@ function locale_js_translate(array $files = array()) {
   }
 
   // If necessary, rebuild the translation file for the current language.
-  if (!empty($parsed['refresh:' . $language_interface->id])) {
+  if (!empty($parsed['refresh:' . $language_interface->getId()])) {
     // Don't clear the refresh flag on failure, so that another try will
     // be performed later.
     if (_locale_rebuild_js()) {
-      unset($parsed['refresh:' . $language_interface->id]);
+      unset($parsed['refresh:' . $language_interface->getId()]);
     }
     // Store any changes after refresh was attempted.
     \Drupal::state()->set('system.javascript_parsed', $parsed);
@@ -608,9 +608,9 @@ function locale_js_translate(array $files = array()) {
   // Add the translation JavaScript file to the page.
   $locale_javascripts = \Drupal::state()->get('locale.translation.javascript') ?: array();
   $translation_file = NULL;
-  if (!empty($files) && !empty($locale_javascripts[$language_interface->id])) {
+  if (!empty($files) && !empty($locale_javascripts[$language_interface->getId()])) {
     // Add the translation JavaScript file to the page.
-    $translation_file = $dir . '/' . $language_interface->id . '_' . $locale_javascripts[$language_interface->id] . '.js';
+    $translation_file = $dir . '/' . $language_interface->getId() . '_' . $locale_javascripts[$language_interface->getId()] . '.js';
   }
   return $translation_file;
 }
@@ -801,16 +801,17 @@ function locale_system_file_system_settings_submit(&$form, FormStateInterface $f
  * Implements hook_preprocess_HOOK() for node templates.
  */
 function locale_preprocess_node(&$variables) {
-  if ($variables['node']->language()->id != LanguageInterface::LANGCODE_NOT_SPECIFIED) {
-    $language_interface = \Drupal::languageManager()->getCurrentLanguage();
+  $node = $variables['node'];
+  if ($node->language()->getId() != LanguageInterface::LANGCODE_NOT_SPECIFIED) {
+    $interface_language = \Drupal::languageManager()->getCurrentLanguage();
 
-    $node_language = $variables['node']->language();
-    if ($node_language->id != $language_interface->id) {
+    $node_language = $node->language();
+    if ($node_language->getId() != $interface_language->getId()) {
       // If the node language was different from the page language, we should
       // add markup to identify the language. Otherwise the page language is
       // inherited.
-      $variables['attributes']['lang'] = $node_language->id;
-      if ($node_language->direction != $language_interface->direction) {
+      $variables['attributes']['lang'] = $node_language->getId();
+      if ($node_language->direction != $interface_language->direction) {
         // If text direction is different form the page's text direction, add
         // direction information as well.
         $dir = array('ltr', 'rtl');
@@ -1268,7 +1269,7 @@ function _locale_rebuild_js($langcode = NULL) {
   // Only add strings with a translation to the translations array.
   $conditions = array(
     'type' => 'javascript',
-    'language' => $language->id,
+    'language' => $language->getId(),
     'translated' => TRUE,
   );
   $translations = array();
@@ -1285,8 +1286,8 @@ function _locale_rebuild_js($langcode = NULL) {
     );
 
     $locale_plurals = \Drupal::state()->get('locale.translation.plurals') ?: array();
-    if (!empty($locale_plurals[$language->id]['formula'])) {
-      $data['pluralFormula'] = $locale_plurals[$language->id]['formula'];
+    if (!empty($locale_plurals[$language->getId()]['formula'])) {
+      $data['pluralFormula'] = $locale_plurals[$language->getId()]['formula'];
     }
 
     $data = 'Drupal.locale = ' . Json::encode($data) . ';';
@@ -1300,23 +1301,23 @@ function _locale_rebuild_js($langcode = NULL) {
   // Delete old file, if we have no translations anymore, or a different file to
   // be saved.
   $locale_javascripts = \Drupal::state()->get('locale.translation.javascript') ?: array();
-  $changed_hash = !isset($locale_javascripts[$language->id]) || ($locale_javascripts[$language->id] != $data_hash);
-  if (!empty($locale_javascripts[$language->id]) && (!$data || $changed_hash)) {
-    file_unmanaged_delete($dir . '/' . $language->id . '_' . $locale_javascripts[$language->id] . '.js');
-    $locale_javascripts[$language->id] = '';
+  $changed_hash = !isset($locale_javascripts[$language->getId()]) || ($locale_javascripts[$language->getId()] != $data_hash);
+  if (!empty($locale_javascripts[$language->getId()]) && (!$data || $changed_hash)) {
+    file_unmanaged_delete($dir . '/' . $language->getId() . '_' . $locale_javascripts[$language->getId()] . '.js');
+    $locale_javascripts[$language->getId()] = '';
     $status = 'deleted';
   }
 
   // Only create a new file if the content has changed or the original file got
   // lost.
-  $dest = $dir . '/' . $language->id . '_' . $data_hash . '.js';
+  $dest = $dir . '/' . $language->getId() . '_' . $data_hash . '.js';
   if ($data && ($changed_hash || !file_exists($dest))) {
     // Ensure that the directory exists and is writable, if possible.
     file_prepare_directory($dir, FILE_CREATE_DIRECTORY);
 
     // Save the file.
     if (file_unmanaged_save_data($data, $dest)) {
-      $locale_javascripts[$language->id] = $data_hash;
+      $locale_javascripts[$language->getId()] = $data_hash;
       // If we deleted a previous version of the file and we replace it with a
       // new one we have an update.
       if ($status == 'deleted') {
@@ -1334,7 +1335,7 @@ function _locale_rebuild_js($langcode = NULL) {
       }
     }
     else {
-      $locale_javascripts[$language->id] = '';
+      $locale_javascripts[$language->getId()] = '';
       $status = 'error';
     }
   }
@@ -1354,7 +1355,7 @@ function _locale_rebuild_js($langcode = NULL) {
       return TRUE;
 
     case 'rebuilt':
-      $logger->warning('JavaScript translation file %file.js was lost.', array('%file' => $locale_javascripts[$language->id]));
+      $logger->warning('JavaScript translation file %file.js was lost.', array('%file' => $locale_javascripts[$language->getId()]));
       // Proceed to the 'created' case as the JavaScript translation file has
       // been created again.
 
diff --git a/core/modules/locale/src/Form/ExportForm.php b/core/modules/locale/src/Form/ExportForm.php
index 631c4aa..00a4be1 100644
--- a/core/modules/locale/src/Form/ExportForm.php
+++ b/core/modules/locale/src/Form/ExportForm.php
@@ -83,7 +83,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
         '#type' => 'select',
         '#title' => $this->t('Language'),
         '#options' => $language_options,
-        '#default_value' => $language_default->id,
+        '#default_value' => $language_default->getId(),
         '#empty_option' => $this->t('Source text only, no translations'),
         '#empty_value' => LanguageInterface::LANGCODE_SYSTEM,
       );
@@ -140,11 +140,11 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     $reader = new PoDatabaseReader();
     $language_name = '';
     if ($language != NULL) {
-      $reader->setLangcode($language->id);
+      $reader->setLangcode($language->getId());
       $reader->setOptions($content_options);
       $languages = $this->languageManager->getLanguages();
-      $language_name = isset($languages[$language->id]) ? $languages[$language->id]->name : '';
-      $filename = $language->id . '.po';
+      $language_name = isset($languages[$language->getId()]) ? $languages[$language->getId()]->name : '';
+      $filename = $language->getId() .'.po';
     }
     else {
       // Template required.
diff --git a/core/modules/locale/src/Form/TranslateFormBase.php b/core/modules/locale/src/Form/TranslateFormBase.php
index 4599c44..8ff3cd8 100644
--- a/core/modules/locale/src/Form/TranslateFormBase.php
+++ b/core/modules/locale/src/Form/TranslateFormBase.php
@@ -170,7 +170,7 @@ protected function translateFilters() {
     }
 
     // Pick the current interface language code for the filter.
-    $default_langcode = $this->languageManager->getCurrentLanguage()->id;
+    $default_langcode = $this->languageManager->getCurrentLanguage()->getId();
     if (!isset($language_options[$default_langcode])) {
       $available_langcodes = array_keys($language_options);
       $default_langcode = array_shift($available_langcodes);
diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php
index 73d653c..e2f4452 100644
--- a/core/modules/locale/src/LocaleConfigManager.php
+++ b/core/modules/locale/src/LocaleConfigManager.php
@@ -326,7 +326,7 @@ public function translateString($name, $langcode, $source, $context) {
    *   A boolean indicating if a language has configuration translations.
    */
   public function hasTranslation($name, LanguageInterface $language) {
-    $translation = $this->languageManager->getLanguageConfigOverride($language->id, $name);
+    $translation = $this->languageManager->getLanguageConfigOverride($language->getId(), $name);
     return !$translation->isNew();
   }
 
diff --git a/core/modules/locale/src/Tests/LocalePathTest.php b/core/modules/locale/src/Tests/LocalePathTest.php
index ae4b9db..d1678af 100644
--- a/core/modules/locale/src/Tests/LocalePathTest.php
+++ b/core/modules/locale/src/Tests/LocalePathTest.php
@@ -121,7 +121,7 @@ public function testPathLanguageConfiguration() {
     $edit = array(
       'source'   => 'node/' . $first_node->id(),
       'alias'    => $custom_path,
-      'langcode' => $first_node->language()->id,
+      'langcode' => $first_node->language()->getId(),
     );
     $this->container->get('path.alias_storage')->save($edit['source'], $edit['alias'], $edit['langcode']);
 
@@ -130,7 +130,7 @@ public function testPathLanguageConfiguration() {
     $edit = array(
       'source'   => 'node/' . $second_node->id(),
       'alias'    => $custom_path,
-      'langcode' => $second_node->language()->id,
+      'langcode' => $second_node->language()->getId(),
     );
     $this->container->get('path.alias_storage')->save($edit['source'], $edit['alias'], $edit['langcode']);
 
diff --git a/core/modules/locale/src/Tests/LocaleStringTest.php b/core/modules/locale/src/Tests/LocaleStringTest.php
index c608d62..4f20349 100644
--- a/core/modules/locale/src/Tests/LocaleStringTest.php
+++ b/core/modules/locale/src/Tests/LocaleStringTest.php
@@ -188,8 +188,10 @@ public function buildSourceString($values = array()) {
    */
   public function createAllTranslations($source, $values = array()) {
     $list = array();
-    foreach ($this->container->get('language_manager')->getLanguages() as $language) {
-      $list[$language->id] = $this->createTranslation($source, $language->id, $values);
+    /** @var \Drupal\Core\Language\LanguageManagerInterface $language_manager */
+    $language_manager = $this->container->get('language_manager');
+    foreach ($language_manager->getLanguages() as $language) {
+      $list[$language->getId()] = $this->createTranslation($source, $language->getId(), $values);
     }
     return $list;
   }
diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module
index 148203a..3c4339f 100644
--- a/core/modules/menu_ui/menu_ui.module
+++ b/core/modules/menu_ui/menu_ui.module
@@ -183,7 +183,7 @@ function menu_ui_node_save(EntityInterface $node) {
           'weight' => isset($definition['weight']) ? $definition['weight'] : 0,
           'enabled' => 1,
           'bundle' => 'menu_link_content',
-          'langcode' => $node->getUntranslated()->language()->id,
+          'langcode' => $node->getUntranslated()->language()->getId(),
         ));
       }
       if (!$entity->save()) {
diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php
index 9fb93b7..f1557d4 100644
--- a/core/modules/migrate/src/Entity/Migration.php
+++ b/core/modules/migrate/src/Entity/Migration.php
@@ -7,9 +7,7 @@
 
 namespace Drupal\migrate\Entity;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\MigrateException;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 use Drupal\migrate\Plugin\RequirementsInterface;
@@ -198,13 +196,6 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem
   public $migration_dependencies = array();
 
   /**
-   * The entity manager.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected $entityManager;
-
-  /**
    * {@inheritdoc}
    */
   public function getSourcePlugin() {
@@ -324,39 +315,28 @@ public function saveHighWater($high_water) {
   public function checkRequirements() {
     // Check whether the current migration source and destination plugin
     // requirements are met or not.
-    if ($this->getSourcePlugin() instanceof RequirementsInterface) {
-      $this->getSourcePlugin()->checkRequirements();
-    }
-    if ($this->getDestinationPlugin() instanceof RequirementsInterface) {
-      $this->getDestinationPlugin()->checkRequirements();
-    }
-
-    /** @var \Drupal\migrate\Entity\MigrationInterface[] $required_migrations */
-    $required_migrations = $this->getEntityManager()->getStorage('migration')->loadMultiple($this->requirements);
+    try {
+      if ($this->getSourcePlugin() instanceof RequirementsInterface && !$this->getSourcePlugin()->checkRequirements()) {
+        return FALSE;
+      }
+      if ($this->getDestinationPlugin() instanceof RequirementsInterface && !$this->getDestinationPlugin()->checkRequirements()) {
+        return FALSE;
+      }
 
-    $missing_migrations = array_diff($this->requirements, array_keys($required_migrations));
-    // Check if the dependencies are in good shape.
-    foreach ($required_migrations as $migration_id => $required_migration) {
-      if (!$required_migration->isComplete()) {
-        $missing_migrations[] = $migration_id;
+      /** @var \Drupal\migrate\Entity\MigrationInterface[] $required_migrations */
+      $required_migrations = \Drupal::entityManager()->getStorage('migration')->loadMultiple($this->requirements);
+      // Check if the dependencies are in good shape.
+      foreach ($required_migrations as $required_migration) {
+        if (!$required_migration->isComplete()) {
+          return FALSE;
+        }
       }
     }
-    if ($missing_migrations) {
-      throw new RequirementsException(String::format('Missing migrations @requirements.', ['@requirements' => implode(', ', $missing_migrations)]), ['requirements' => $missing_migrations]);
+    catch (\Exception $e) {
+      return FALSE;
     }
-  }
 
-  /**
-   * Get the entity manager.
-   *
-   * @return \Drupal\Core\Entity\EntityManagerInterface
-   *   The entity manager.
-   */
-  protected function getEntityManager() {
-    if (!isset($this->entityManager)) {
-      $this->entityManager = \Drupal::entityManager();
-    }
-    return $this->entityManager;
+    return TRUE;
   }
 
   /**
diff --git a/core/modules/migrate/src/Exception/RequirementsException.php b/core/modules/migrate/src/Exception/RequirementsException.php
deleted file mode 100644
index 12b5de1..0000000
--- a/core/modules/migrate/src/Exception/RequirementsException.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Exception\RequirementsException.
- */
-
-namespace Drupal\migrate\Exception;
-
-use Exception;
-
-/**
- * Defines an
- *
- * @see \Drupal\migrate\Plugin\RequirementsInterface
- */
-class RequirementsException extends \RuntimeException {
-
-  /**
-   * The missing requirements.
-   *
-   * @var array
-   */
-  protected $requirements;
-
-  /**
-   * Constructs a new RequirementsException instance.
-   *
-   * @param string $message
-   *   (optional) The Exception message to throw.
-   * @param array $requirements
-   *   (optional) The missing requirements.
-   * @param int $code
-   *   (optional) The Exception code.
-   * @param \Exception $previous
-   *   (optional) The previous exception used for the exception chaining.
-   */
-  public function __construct($message = "", array $requirements = [], $code = 0, Exception $previous = NULL) {
-    parent::__construct($message, $code, $previous);
-
-    $this->requirements = $requirements;
-  }
-
-  /**
-   * Get an array of requirements.
-   *
-   * @return array
-   *   The requirements.
-   */
-  public function getRequirements() {
-    return $this->requirements;
-  }
-
-  /**
-   * Get the requirements as a string.
-   *
-   * @return string
-   *   A formatted requirements string.
-   */
-  public function getRequirementsString() {
-    $output = '';
-    foreach ($this->requirements as $requirement_type => $requirements) {
-      foreach ($requirements as $value) {
-        $output .= "$requirement_type: $value. ";
-      }
-    }
-    return trim($output);
-  }
-
-}
diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php
index a68b087..3f0d695 100644
--- a/core/modules/migrate/src/MigrateExecutable.php
+++ b/core/modules/migrate/src/MigrateExecutable.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Utility\Error;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 
 /**
@@ -234,19 +233,11 @@ public function getSource() {
    */
   public function import() {
     // Knock off migration if the requirements haven't been met.
-    try {
-      $this->migration->checkRequirements();
-    }
-    catch (RequirementsException $e) {
+    if (!$this->migration->checkRequirements()) {
       $this->message->display(
-        $this->t('Migration @id did not meet the requirements. @message @requirements', array(
-          '@id' => $this->migration->id(),
-          '@message' => $e->getMessage(),
-          '@requirements' => $e->getRequirementsString(),
-        )), 'error');
+        $this->t('Migration @id did not meet the requirements', array('@id' => $this->migration->id())), 'error');
       return MigrationInterface::RESULT_FAILED;
     }
-
     $return = MigrationInterface::RESULT_COMPLETED;
     $source = $this->getSource();
     $id_map = $this->migration->getIdMap();
diff --git a/core/modules/migrate/src/Plugin/RequirementsInterface.php b/core/modules/migrate/src/Plugin/RequirementsInterface.php
index 5aa7db6..8a5d816 100644
--- a/core/modules/migrate/src/Plugin/RequirementsInterface.php
+++ b/core/modules/migrate/src/Plugin/RequirementsInterface.php
@@ -15,8 +15,8 @@
   /**
    * Checks if requirements for this plugin are OK.
    *
-   * @throws \Drupal\migrate\Exception\RequirementsException
-   *   Thrown when requirements are not met.
+   * @return bool
+   *   TRUE if it is possible to use the plugin, FALSE if not.
    */
   public function checkRequirements();
 
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php
index 084fd88..6fd3e97 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php
@@ -10,7 +10,6 @@
 
 use Drupal\Core\Plugin\PluginBase;
 use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\Plugin\MigrateDestinationInterface;
 use Drupal\migrate\Plugin\RequirementsInterface;
 
@@ -54,9 +53,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
    * {@inheritdoc}
    */
   public function checkRequirements() {
-    if (empty($this->pluginDefinition['requirements_met'])) {
-      throw new RequirementsException();
-    }
+    return $this->pluginDefinition['requirements_met'];
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/MigrationTest.php b/core/modules/migrate/tests/src/Unit/MigrationTest.php
deleted file mode 100644
index 450a2ee..0000000
--- a/core/modules/migrate/tests/src/Unit/MigrationTest.php
+++ /dev/null
@@ -1,148 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\migrate\Unit\MigrationTest.
- */
-
-namespace Drupal\Tests\migrate\Unit;
-
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\Exception\RequirementsException;
-use Drupal\migrate\Plugin\MigrateDestinationInterface;
-use Drupal\migrate\Plugin\MigrateSourceInterface;
-use Drupal\migrate\Plugin\RequirementsInterface;
-use Drupal\Tests\UnitTestCase;
-
-/**
- * @coversDefaultClass \Drupal\migrate\Entity\Migration
- * @group Migration
- */
-class MigrationTest extends UnitTestCase {
-
-  /**
-   * Tests checking requirements for source plugins.
-   *
-   * @covers ::checkRequirements
-   *
-   * @expectedException \Drupal\migrate\Exception\RequirementsException
-   * @expectedExceptionMessage Missing source requirement
-   */
-  public function testRequirementsForSourcePlugin() {
-    $migration = new TestMigration();
-
-    $source_plugin = $this->getMock('Drupal\Tests\migrate\Unit\RequirementsAwareSourceInterface');
-    $source_plugin->expects($this->once())
-      ->method('checkRequirements')
-      ->willThrowException(new RequirementsException('Missing source requirement', ['key' => 'value']));
-    $destination_plugin = $this->getMock('Drupal\Tests\migrate\Unit\RequirementsAwareDestinationInterface');
-
-    $migration->setSourcePlugin($source_plugin);
-    $migration->setDestinationPlugin($destination_plugin);
-
-    $migration->checkRequirements();
-  }
-
-  /**
-   * Tests checking requirements for destination plugins.
-   *
-   * @covers ::checkRequirements
-   *
-   * @expectedException \Drupal\migrate\Exception\RequirementsException
-   * @expectedExceptionMessage Missing destination requirement
-   */
-  public function testRequirementsForDestinationPlugin() {
-    $migration = new TestMigration();
-
-    $source_plugin = $this->getMock('Drupal\migrate\Plugin\MigrateSourceInterface');
-    $destination_plugin = $this->getMock('Drupal\Tests\migrate\Unit\RequirementsAwareDestinationInterface');
-    $destination_plugin->expects($this->once())
-      ->method('checkRequirements')
-      ->willThrowException(new RequirementsException('Missing destination requirement', ['key' => 'value']));
-
-    $migration->setSourcePlugin($source_plugin);
-    $migration->setDestinationPlugin($destination_plugin);
-
-    $migration->checkRequirements();
-  }
-
-  /**
-   * Tests checking requirements for destination plugins.
-   *
-   * @covers ::checkRequirements
-   *
-   * @expectedException \Drupal\migrate\Exception\RequirementsException
-   * @expectedExceptionMessage Missing migrations test_a, test_c
-   */
-  public function testRequirementsForMigrations() {
-    $migration = new TestMigration();
-
-    // Setup source and destination plugins without any requirements.
-    $source_plugin = $this->getMock('Drupal\migrate\Plugin\MigrateSourceInterface');
-    $destination_plugin = $this->getMock('Drupal\migrate\Plugin\MigrateDestinationInterface');
-    $migration->setSourcePlugin($source_plugin);
-    $migration->setDestinationPlugin($destination_plugin);
-
-    $entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
-    $migration->setEntityManager($entity_manager);
-
-    // We setup the requirements that test_a doesn't exist and test_c is not
-    // completed yet.
-    $migration->setRequirements(['test_a', 'test_b', 'test_c', 'test_d']);
-
-    $migration_b = $this->getMock('Drupal\migrate\Entity\MigrationInterface');
-    $migration_c = $this->getMock('Drupal\migrate\Entity\MigrationInterface');
-    $migration_d = $this->getMock('Drupal\migrate\Entity\MigrationInterface');
-
-    $migration_b->expects($this->once())
-      ->method('isComplete')
-      ->willReturn(TRUE);
-    $migration_c->expects($this->once())
-      ->method('isComplete')
-      ->willReturn(FALSE);
-    $migration_d->expects($this->once())
-      ->method('isComplete')
-      ->willReturn(TRUE);
-
-    $migration_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
-    $migration_storage->expects($this->once())
-      ->method('loadMultiple')
-      ->with(['test_a', 'test_b', 'test_c', 'test_d'])
-      ->willReturn(['test_b' => $migration_b, 'test_c' => $migration_c, 'test_d' => $migration_d]);
-    $entity_manager->expects($this->once())
-      ->method('getStorage')
-      ->with('migration')
-      ->willReturn($migration_storage);
-
-    $migration->checkRequirements();
-  }
-
-}
-
-class TestMigration extends Migration {
-
-  public function __construct() {
-  }
-
-  public function setRequirements(array $requirements) {
-    $this->requirements = $requirements;
-  }
-
-  public function setSourcePlugin(MigrateSourceInterface $source_plugin) {
-    $this->sourcePlugin = $source_plugin;
-  }
-
-  public function setDestinationPlugin(MigrateDestinationInterface $destination_plugin) {
-    $this->destinationPlugin = $destination_plugin;
-  }
-
-  public function setEntityManager(EntityManagerInterface $entity_manager) {
-    $this->entityManager = $entity_manager;
-  }
-
-}
-
-interface RequirementsAwareSourceInterface extends MigrateSourceInterface, RequirementsInterface {}
-
-interface RequirementsAwareDestinationInterface extends MigrateDestinationInterface, RequirementsInterface {}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php b/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php
index 603cb95..d112a11 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/load/LoadEntity.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Plugin\PluginBase;
 use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\MigrateException;
 use Drupal\migrate\Plugin\SourceEntityInterface;
 use Drupal\migrate_drupal\Plugin\MigrateLoadInterface;
@@ -80,15 +79,11 @@ public function loadMultiple(EntityStorageInterface $storage, array $sub_ids = N
       $values['source']['bundle'] = $id;
       /** @var \Drupal\migrate_drupal\Entity\MigrationInterface $migration */
       $migration = $storage->create($values);
-      try {
-        $migration->getSourcePlugin()->checkRequirements();
+      if ($migration->getSourcePlugin()->checkRequirements()) {
         $fields = array_keys($migration->getSourcePlugin()->fields());
         $migration->process += array_combine($fields, $fields);
         $migrations[$migration->id()] = $migration;
       }
-      catch (RequirementsException $e) {
-
-      }
     }
 
     return $migrations;
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
index 24b5067..a3c4a17 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
@@ -7,10 +7,8 @@
 
 namespace Drupal\migrate_drupal\Plugin\migrate\source;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\Plugin\migrate\source\SqlBase;
 use Drupal\migrate\Plugin\RequirementsInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -65,30 +63,36 @@ public function getSystemData() {
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
-    return new static(
+    $plugin = new static(
       $configuration,
       $plugin_id,
       $plugin_definition,
       $migration
     );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function checkRequirements() {
-    if ($this->pluginDefinition['requirements_met'] === TRUE) {
-      if (isset($this->pluginDefinition['source_provider'])) {
-        if ($this->moduleExists($this->pluginDefinition['source_provider'])) {
-          if (isset($this->pluginDefinition['minimum_schema_version']) && !$this->getModuleSchemaVersion($this->pluginDefinition['source_provider']) < $this->pluginDefinition['minimum_schema_version']) {
-            throw new RequirementsException(String::format('Required minimum schema version @minimum_schema_version', ['@minimum_schema_version' => $this->pluginDefinition['minimum_schema_version']]), ['minimum_schema_version' => $this->pluginDefinition['minimum_schema_version']]);
+    /** @var \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase $plugin */
+    if ($plugin_definition['requirements_met'] === TRUE) {
+      if (isset($plugin_definition['source_provider'])) {
+        if ($plugin->moduleExists($plugin_definition['source_provider'])) {
+          if (isset($plugin_definition['minimum_schema_version']) && !$plugin->getModuleSchemaVersion($plugin_definition['source_provider']) < $plugin_definition['minimum_schema_version']) {
+            $plugin->checkRequirements(FALSE);
           }
         }
         else {
-          throw new RequirementsException(String::format('Missing source provider @provider', ['@provider' => $this->pluginDefinition['source_provider']]), ['source_provider' => $this->pluginDefinition['source_provider']]);
+          $plugin->checkRequirements(FALSE);
         }
       }
     }
+    return $plugin;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function checkRequirements($new_value = NULL) {
+    if (isset($new_value)) {
+      $this->requirements = $new_value;
+    }
+    return $this->requirements;
   }
 
   /**
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php
index 66bc81f..8b48daf 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php
@@ -42,7 +42,7 @@ public function testAggregatorFeedImport() {
     $feed = entity_load('aggregator_feed', 5);
     $this->assertNotNull($feed->uuid());
     $this->assertEqual($feed->title->value, 'Know Your Meme');
-    $this->assertEqual($feed->language()->id, 'en');
+    $this->assertEqual($feed->language()->getId(), 'en');
     $this->assertEqual($feed->url->value, 'http://knowyourmeme.com/newsfeed.rss');
     $this->assertEqual($feed->refresh->value, 900);
     $this->assertEqual($feed->checked->value, 1387659487);
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php
index b2c200a..1c2a01a 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php
@@ -67,7 +67,7 @@ public function testAggregatorItem() {
     $this->assertEqual($item->getDescription(), "<h2 id='new'>What's new with Drupal 8?</h2>");
     $this->assertEqual($item->getLink(), 'https://groups.drupal.org/node/395218');
     $this->assertEqual($item->getPostedTime(), 1389297196);
-    $this->assertEqual($item->language()->id, 'en');
+    $this->assertEqual($item->language()->getId(), 'en');
     $this->assertEqual($item->getGuid(), '395218 at https://groups.drupal.org');
 
   }
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php
index 0835650..9894bdd 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php
@@ -51,7 +51,7 @@ public function testBlockMigration() {
     $this->assertEqual('My block 1', $block->label());
     $this->assertEqual(1, $block->getRevisionId());
     $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());
-    $this->assertEqual('en', $block->language()->id);
+    $this->assertEqual('en', $block->language()->getId());
     $this->assertEqual('<h3>My first custom block body</h3>', $block->body->value);
     $this->assertEqual('full_html', $block->body->format);
 
@@ -59,7 +59,7 @@ public function testBlockMigration() {
     $this->assertEqual('My block 2', $block->label());
     $this->assertEqual(2, $block->getRevisionId());
     $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());
-    $this->assertEqual('en', $block->language()->id);
+    $this->assertEqual('en', $block->language()->getId());
     $this->assertEqual('<h3>My second custom block body</h3>', $block->body->value);
     $this->assertEqual('full_html', $block->body->format);
   }
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php
index 77980cd..8206618 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php
@@ -81,7 +81,7 @@ public function testComments() {
     $this->assertEqual(0, $comment->pid->target_id);
     $this->assertEqual(1, $comment->getCommentedEntityId());
     $this->assertEqual('node', $comment->getCommentedEntityTypeId());
-    $this->assertEqual('en', $comment->language()->id);
+    $this->assertEqual('en', $comment->language()->getId());
     $this->assertEqual('comment_no_subject', $comment->getTypeId());
 
     $comment = entity_load('comment', 2);
diff --git a/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php b/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php
index c9085f1..8d69c64 100644
--- a/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php
+++ b/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php
@@ -64,7 +64,7 @@ public function testAggregatorMigrateDependencies() {
     $executable = new MigrateExecutable($migration, $this);
     $this->startCollectingMessages();
     $executable->import();
-    $this->assertEqual($this->migrateMessages['error'], array(String::format('Migration @id did not meet the requirements. Missing migrations d6_aggregator_feed. requirements: d6_aggregator_feed.', array('@id' => $migration->id()))));
+    $this->assertEqual($this->migrateMessages['error'], array(String::format('Migration @id did not meet the requirements', array('@id' => $migration->id()))));
     $this->collectMessages = FALSE;
   }
 
diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc
index e5097bf..6f63aba 100644
--- a/core/modules/node/node.tokens.inc
+++ b/core/modules/node/node.tokens.inc
@@ -161,7 +161,7 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'langcode':
-          $replacements[$original] = $sanitize ? String::checkPlain($node->language()->id) : $node->language()->id;
+          $replacements[$original] = $sanitize ? String::checkPlain($node->language()->getId()) : $node->language()->getId();
           break;
 
         case 'url':
diff --git a/core/modules/node/src/Access/NodeRevisionAccessCheck.php b/core/modules/node/src/Access/NodeRevisionAccessCheck.php
index 0fdc115..f7309d7 100644
--- a/core/modules/node/src/Access/NodeRevisionAccessCheck.php
+++ b/core/modules/node/src/Access/NodeRevisionAccessCheck.php
@@ -128,7 +128,7 @@ public function checkAccess(NodeInterface $node, AccountInterface $account, $op
 
     // If no language code was provided, default to the node revision's langcode.
     if (empty($langcode)) {
-      $langcode = $node->language()->id;
+      $langcode = $node->language()->getId();
     }
 
     // Statically cache access by revision ID, language code, user account ID,
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index ef8c23b..dda694e 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -161,14 +161,14 @@ public function access($operation = 'view', AccountInterface $account = NULL, $r
    * {@inheritdoc}
    */
   public function prepareLangcode() {
-    $langcode = $this->language()->id;
+    $langcode = $this->language()->getId();
     // If the Language module is enabled, try to use the language from content
     // negotiation.
     if (\Drupal::moduleHandler()->moduleExists('language')) {
       // Load languages the node exists in.
       $node_translations = $this->getTranslationLanguages();
       // Load the language from content negotiation.
-      $content_negotiation_langcode = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id;
+      $content_negotiation_langcode = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
       // If there is a translation available, use it.
       if (isset($node_translations[$content_negotiation_langcode])) {
         $langcode = $content_negotiation_langcode;
diff --git a/core/modules/node/src/NodeAccessControlHandler.php b/core/modules/node/src/NodeAccessControlHandler.php
index 550447b..2268a60 100644
--- a/core/modules/node/src/NodeAccessControlHandler.php
+++ b/core/modules/node/src/NodeAccessControlHandler.php
@@ -140,13 +140,13 @@ protected function checkFieldAccess($operation, FieldDefinitionInterface $field_
     // Only users with the administer nodes permission can edit administrative
     // fields.
     $administrative_fields = array('uid', 'status', 'created', 'promote', 'sticky');
-    if ($operation == 'edit' && in_array($field_definition->getName(), $administrative_fields, TRUE)) {
+    if ($operation == 'edit' && in_array($field_definition->getName(), $administrative_fields)) {
       return AccessResult::allowedIfHasPermission($account, 'administer nodes');
     }
 
     // No user can change read only fields.
     $read_only_fields = array('changed', 'revision_timestamp', 'revision_uid');
-    if ($operation == 'edit' && in_array($field_definition->getName(), $read_only_fields, TRUE)) {
+    if ($operation == 'edit' && in_array($field_definition->getName(), $read_only_fields)) {
       return AccessResult::forbidden();
     }
 
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index 45343d5..8dd55e4 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -112,7 +112,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $node->getUntranslated()->language()->id,
+      '#default_value' => $node->getUntranslated()->language()->getId(),
       '#languages' => LanguageInterface::STATE_ALL,
       '#access' => isset($language_configuration['language_show']) && $language_configuration['language_show'],
     );
diff --git a/core/modules/node/src/NodeGrantDatabaseStorage.php b/core/modules/node/src/NodeGrantDatabaseStorage.php
index 78b96b5..e661414 100644
--- a/core/modules/node/src/NodeGrantDatabaseStorage.php
+++ b/core/modules/node/src/NodeGrantDatabaseStorage.php
@@ -202,7 +202,7 @@ public function write(NodeInterface $node, array $grants, $realm = NULL, $delete
             $grant['nid'] = $node->id();
             $grant['langcode'] = $grant_langcode;
             // The record with the original langcode is used as the fallback.
-            if ($grant['langcode'] == $node->language()->id) {
+            if ($grant['langcode'] == $node->language()->getId()) {
               $grant['fallback'] = 1;
             }
             else {
diff --git a/core/modules/node/src/NodeListBuilder.php b/core/modules/node/src/NodeListBuilder.php
index c78915d..d802232 100644
--- a/core/modules/node/src/NodeListBuilder.php
+++ b/core/modules/node/src/NodeListBuilder.php
@@ -96,7 +96,7 @@ public function buildRow(EntityInterface $entity) {
       '#theme' => 'mark',
       '#mark_type' => node_mark($entity->id(), $entity->getChangedTime()),
     );
-    $langcode = $entity->language()->id;
+    $langcode = $entity->language()->getId();
     $uri = $entity->urlInfo();
     $options = $uri->getOptions();
     $options += ($langcode != LanguageInterface::LANGCODE_NOT_SPECIFIED && isset($languages[$langcode]) ? array('language' => $languages[$langcode]) : array());
diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php
index bd51e98..17353bb 100644
--- a/core/modules/node/src/Plugin/Search/NodeSearch.php
+++ b/core/modules/node/src/Plugin/Search/NodeSearch.php
@@ -282,7 +282,7 @@ public function execute() {
         'extra' => $extra,
         'score' => $item->calculated_score,
         'snippet' => search_excerpt($keys, $node->rendered, $item->langcode),
-        'langcode' => $node->language()->id,
+        'langcode' => $node->language()->getId(),
       );
     }
     return $results;
@@ -342,23 +342,23 @@ protected function indexNode(NodeInterface $node) {
     $node_render = $this->entityManager->getViewBuilder('node');
 
     foreach ($languages as $language) {
-      $node = $node->getTranslation($language->id);
+      $node = $node->getTranslation($language->getId());
       // Render the node.
-      $build = $node_render->view($node, 'search_index', $language->id);
+      $build = $node_render->view($node, 'search_index', $language->getId());
 
       unset($build['#theme']);
       $node->rendered = drupal_render($build);
 
-      $text = '<h1>' . String::checkPlain($node->label($language->id)) . '</h1>' . $node->rendered;
+      $text = '<h1>' . String::checkPlain($node->label($language->getId())) . '</h1>' . $node->rendered;
 
       // Fetch extra data normally not visible.
-      $extra = $this->moduleHandler->invokeAll('node_update_index', array($node, $language->id));
+      $extra = $this->moduleHandler->invokeAll('node_update_index', array($node, $language->getId()));
       foreach ($extra as $t) {
         $text .= $t;
       }
 
       // Update index.
-      search_index($node->id(), $this->getPluginId(), $text, $language->id);
+      search_index($node->id(), $this->getPluginId(), $text, $language->getId());
     }
   }
 
diff --git a/core/modules/node/src/Tests/NodeAccessLanguageTest.php b/core/modules/node/src/Tests/NodeAccessLanguageTest.php
index aa29d40..c97dc07 100644
--- a/core/modules/node/src/Tests/NodeAccessLanguageTest.php
+++ b/core/modules/node/src/Tests/NodeAccessLanguageTest.php
@@ -54,7 +54,7 @@ function testNodeAccess() {
     // Creating a public node with langcode Hungarian, will be saved as the
     // fallback in node access table.
     $node_public_hu = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'hu', 'private' => FALSE));
-    $this->assertTrue($node_public_hu->language()->id == 'hu', 'Node created as Hungarian.');
+    $this->assertTrue($node_public_hu->language()->getId() == 'hu', 'Node created as Hungarian.');
 
     // Tests the default access is provided for the public Hungarian node.
     $this->assertNodeAccess($expected_node_access, $node_public_hu, $web_user);
@@ -74,7 +74,7 @@ function testNodeAccess() {
       'private' => FALSE,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
     ));
-    $this->assertTrue($node_public_no_language->language()->id == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
+    $this->assertTrue($node_public_no_language->language()->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
 
     // Tests that access is granted if requested with no language.
     $this->assertNodeAccess($expected_node_access, $node_public_no_language, $web_user);
@@ -92,7 +92,7 @@ function testNodeAccess() {
     \Drupal::entityManager()->getAccessControlHandler('node')->resetCache();
     \Drupal::state()->set('node_access_test_secret_catalan', 1);
     $node_public_ca = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'ca', 'private' => FALSE));
-    $this->assertTrue($node_public_ca->language()->id == 'ca', 'Node created as Catalan.');
+    $this->assertTrue($node_public_ca->language()->getId() == 'ca', 'Node created as Catalan.');
 
     // Tests that access is granted if requested with no language.
     $this->assertNodeAccess($expected_node_access, $node_public_no_language, $web_user);
@@ -147,7 +147,7 @@ function testNodeAccessPrivate() {
     // Creating a private node with langcode Hungarian, will be saved as the
     // fallback in node access table.
     $node_private_hu = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'hu', 'private' => TRUE));
-    $this->assertTrue($node_private_hu->language()->id == 'hu', 'Node created as Hungarian.');
+    $this->assertTrue($node_private_hu->language()->getId() == 'hu', 'Node created as Hungarian.');
 
     // Tests the default access is not provided for the private Hungarian node.
     $this->assertNodeAccess($expected_node_access_no_access, $node_private_hu, $web_user);
@@ -167,7 +167,7 @@ function testNodeAccessPrivate() {
       'private' => TRUE,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
     ));
-    $this->assertTrue($node_private_no_language->language()->id == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
+    $this->assertTrue($node_private_no_language->language()->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
 
     // Tests that access is not granted if requested with no language.
     $this->assertNodeAccess($expected_node_access_no_access, $node_private_no_language, $web_user);
@@ -198,7 +198,7 @@ function testNodeAccessPrivate() {
     // node_access_test_secret_catalan flag works.
     $private_ca_user = $this->drupalCreateUser(array('access content', 'node test view'));
     $node_private_ca = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'ca', 'private' => TRUE));
-    $this->assertTrue($node_private_ca->language()->id == 'ca', 'Node created as Catalan.');
+    $this->assertTrue($node_private_ca->language()->getId() == 'ca', 'Node created as Catalan.');
 
     // Tests that Catalan is still not accessible to either user.
     $this->assertNodeAccess($expected_node_access_no_access, $node_private_ca, $web_user, 'ca');
@@ -230,12 +230,12 @@ function testNodeAccessQueryTag() {
     // Creating a private node with langcode Hungarian, will be saved as
     // the fallback in node access table.
     $node_private = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'hu', 'private' => TRUE));
-    $this->assertTrue($node_private->language()->id == 'hu', 'Node created as Hungarian.');
+    $this->assertTrue($node_private->language()->getId() == 'hu', 'Node created as Hungarian.');
 
     // Creating a public node with langcode Hungarian, will be saved as
     // the fallback in node access table.
     $node_public = $this->drupalCreateNode(array('body' => array(array()), 'langcode' => 'hu', 'private' => FALSE));
-    $this->assertTrue($node_public->language()->id == 'hu', 'Node created as Hungarian.');
+    $this->assertTrue($node_public->language()->getId() == 'hu', 'Node created as Hungarian.');
 
     // Creating a public node with no special langcode, like when no language
     // module enabled.
@@ -243,7 +243,7 @@ function testNodeAccessQueryTag() {
       'private' => FALSE,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
     ));
-    $this->assertTrue($node_no_language->language()->id == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
+    $this->assertTrue($node_no_language->language()->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
 
     // Query the nodes table as the web user with the node access tag and no
     // specific langcode.
diff --git a/core/modules/node/src/Tests/NodeFieldMultilingualTest.php b/core/modules/node/src/Tests/NodeFieldMultilingualTest.php
index 8649a35..d00ffcd 100644
--- a/core/modules/node/src/Tests/NodeFieldMultilingualTest.php
+++ b/core/modules/node/src/Tests/NodeFieldMultilingualTest.php
@@ -77,7 +77,7 @@ function testMultilingualNodeForm() {
     // Check that the node exists in the database.
     $node = $this->drupalGetNodeByTitle($edit[$title_key]);
     $this->assertTrue($node, 'Node found in database.');
-    $this->assertTrue($node->language()->id == $langcode && $node->body->value == $body_value, 'Field language correctly set.');
+    $this->assertTrue($node->language()->getId() == $langcode && $node->body->value == $body_value, 'Field language correctly set.');
 
     // Change node language.
     $langcode = 'it';
@@ -89,7 +89,7 @@ function testMultilingualNodeForm() {
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $node = $this->drupalGetNodeByTitle($edit[$title_key], TRUE);
     $this->assertTrue($node, 'Node found in database.');
-    $this->assertTrue($node->language()->id == $langcode && $node->body->value == $body_value, 'Field language correctly changed.');
+    $this->assertTrue($node->language()->getId() == $langcode && $node->body->value == $body_value, 'Field language correctly changed.');
 
     // Enable content language URL detection.
     $this->container->get('language_negotiator')->saveConfiguration(LanguageInterface::TYPE_CONTENT, array(LanguageNegotiationUrl::METHOD_ID => 0));
diff --git a/core/modules/node/src/Tests/NodeLastChangedTest.php b/core/modules/node/src/Tests/NodeLastChangedTest.php
index 16ea74c..ae5dc27 100644
--- a/core/modules/node/src/Tests/NodeLastChangedTest.php
+++ b/core/modules/node/src/Tests/NodeLastChangedTest.php
@@ -40,7 +40,7 @@ function testNodeLastChanged() {
     $changed_timestamp = node_last_changed($node->id());
     $this->assertEqual($changed_timestamp, $node->getChangedTime(), 'Expected last changed timestamp returned.');
 
-    $changed_timestamp = node_last_changed($node->id(), $node->language()->id);
+    $changed_timestamp = node_last_changed($node->id(), $node->language()->getId());
     $this->assertEqual($changed_timestamp, $node->getChangedTime(), 'Expected last changed timestamp returned.');
   }
 }
diff --git a/core/modules/node/src/Tests/NodeTokenReplaceTest.php b/core/modules/node/src/Tests/NodeTokenReplaceTest.php
index fa7516d..edbc811 100644
--- a/core/modules/node/src/Tests/NodeTokenReplaceTest.php
+++ b/core/modules/node/src/Tests/NodeTokenReplaceTest.php
@@ -68,20 +68,20 @@ function testNodeTokenReplacement() {
     $tests['[node:title]'] = String::checkPlain($node->getTitle());
     $tests['[node:body]'] = $node->body->processed;
     $tests['[node:summary]'] = $node->body->summary_processed;
-    $tests['[node:langcode]'] = String::checkPlain($node->language()->id);
+    $tests['[node:langcode]'] = String::checkPlain($node->language()->getId());
     $tests['[node:url]'] = url('node/' . $node->id(), $url_options);
     $tests['[node:edit-url]'] = url('node/' . $node->id() . '/edit', $url_options);
     $tests['[node:author]'] = String::checkPlain($account->getUsername());
     $tests['[node:author:uid]'] = $node->getOwnerId();
     $tests['[node:author:name]'] = String::checkPlain($account->getUsername());
-    $tests['[node:created:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->getCreatedTime(), 2, $this->interfaceLanguage->id);
-    $tests['[node:changed:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->getChangedTime(), 2, $this->interfaceLanguage->id);
+    $tests['[node:created:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->getCreatedTime(), 2, $this->interfaceLanguage->getId());
+    $tests['[node:changed:since]'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->getChangedTime(), 2, $this->interfaceLanguage->getId());
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $this->tokenService->replace($input, array('node' => $node), array('langcode' => $this->interfaceLanguage->id));
+      $output = $this->tokenService->replace($input, array('node' => $node), array('langcode' => $this->interfaceLanguage->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized node token %token replaced.', array('%token' => $input)));
     }
 
@@ -89,11 +89,11 @@ function testNodeTokenReplacement() {
     $tests['[node:title]'] = $node->getTitle();
     $tests['[node:body]'] = $node->body->value;
     $tests['[node:summary]'] = $node->body->summary;
-    $tests['[node:langcode]'] = $node->language()->id;
+    $tests['[node:langcode]'] = $node->language()->getId();
     $tests['[node:author:name]'] = $account->getUsername();
 
     foreach ($tests as $input => $expected) {
-      $output = $this->tokenService->replace($input, array('node' => $node), array('langcode' => $this->interfaceLanguage->id, 'sanitize' => FALSE));
+      $output = $this->tokenService->replace($input, array('node' => $node), array('langcode' => $this->interfaceLanguage->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized node token %token replaced.', array('%token' => $input)));
     }
 
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc
index 6590b90..4c84c84 100644
--- a/core/modules/search/search.pages.inc
+++ b/core/modules/search/search.pages.inc
@@ -37,7 +37,7 @@ function template_preprocess_search_result(&$variables) {
   $result = $variables['result'];
   $variables['url'] = check_url($result['link']);
   $variables['title'] = String::checkPlain($result['title']);
-  if (isset($result['language']) && $result['language'] != $language_interface->id && $result['language'] != LanguageInterface::LANGCODE_NOT_SPECIFIED) {
+  if (isset($result['language']) && $result['language'] != $language_interface->getId() && $result['language'] != LanguageInterface::LANGCODE_NOT_SPECIFIED) {
     $variables['title_attributes']['lang'] = $result['language'];
     $variables['content_attributes']['lang'] = $result['language'];
   }
diff --git a/core/modules/shortcut/src/ShortcutForm.php b/core/modules/shortcut/src/ShortcutForm.php
index c9f5d3d..86c022e 100644
--- a/core/modules/shortcut/src/ShortcutForm.php
+++ b/core/modules/shortcut/src/ShortcutForm.php
@@ -72,7 +72,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $this->entity->getUntranslated()->language()->id,
+      '#default_value' => $this->entity->getUntranslated()->language()->getId(),
       '#languages' => LanguageInterface::STATE_ALL,
     );
 
diff --git a/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php b/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
index 05b6aab..d481f01 100644
--- a/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
+++ b/core/modules/statistics/src/Tests/StatisticsTokenReplaceTest.php
@@ -49,7 +49,7 @@ function testStatisticsTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = \Drupal::token()->replace($input, array('node' => $node), array('langcode' => $language_interface->id));
+      $output = \Drupal::token()->replace($input, array('node' => $node), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Statistics token %token replaced.', array('%token' => $input)));
     }
   }
diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php
index 8852c31..cc6ee49 100644
--- a/core/modules/system/core.api.php
+++ b/core/modules/system/core.api.php
@@ -357,7 +357,7 @@
  *
  * Example:
  * @code
- * $cid = 'mymodule_example:' . \Drupal::languageManager()->getCurrentLanguage()->id();
+ * $cid = 'mymodule_example:' . \Drupal::languageManager()->getCurrentLanguage()->getId();
  *
  * $data = NULL;
  * if ($cache = \Drupal::cache()->get($cid)) {
diff --git a/core/modules/system/language.api.php b/core/modules/system/language.api.php
index 3a74f82..4890e35 100644
--- a/core/modules/system/language.api.php
+++ b/core/modules/system/language.api.php
@@ -109,7 +109,7 @@ function hook_language_switch_links_alter(array &$links, $type, $path) {
   $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
   if ($type == LanguageInterface::TYPE_CONTENT && isset($links[$language_interface->id])) {
-    foreach ($links[$language_interface->id] as $link) {
+    foreach ($links[$language_interface->getId()] as $link) {
       $link['attributes']['class'][] = 'active-language';
     }
   }
diff --git a/core/modules/system/src/Tests/Common/UrlTest.php b/core/modules/system/src/Tests/Common/UrlTest.php
index 4edae14..3f809c5 100644
--- a/core/modules/system/src/Tests/Common/UrlTest.php
+++ b/core/modules/system/src/Tests/Common/UrlTest.php
@@ -63,7 +63,7 @@ function testLinkAttributes() {
       '#href' => 'http://drupal.org',
       '#title' => 'bar',
     );
-    $langcode = $language->id;
+    $langcode = $language->getId();
 
     // Test that the default hreflang handling for links does not override a
     // hreflang attribute explicitly set in the render array.
diff --git a/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php b/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php
index cd7f237..a44f509 100644
--- a/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php
@@ -61,7 +61,7 @@ public function testDefaultValueCallback() {
     $entity = $this->entityManager->getStorage('entity_test_default_value')->create();
     // The description field has a default value callback for testing, see
     // entity_test_field_default_value().
-    $this->assertEqual($entity->description->value, 'description_' . $entity->language()->id);
+    $this->assertEqual($entity->description->value, 'description_' . $entity->language()->getId());
   }
 
 }
diff --git a/core/modules/system/src/Tests/Entity/EntityFieldTest.php b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
index 5474981..e377ab4 100644
--- a/core/modules/system/src/Tests/Entity/EntityFieldTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
@@ -200,14 +200,14 @@ protected function assertReadWrite($entity_type) {
     $this->assertEqual(\Drupal::languageManager()->getLanguage($langcode), $entity->langcode->language, format_string('%entity_type: Language object can be read.', array('%entity_type' => $entity_type)));
 
     // Change the language by code.
-    $entity->langcode->value = \Drupal::languageManager()->getDefaultLanguage()->id;
-    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->id, $entity->langcode->value, format_string('%entity_type: Language code can be read.', array('%entity_type' => $entity_type)));
+    $entity->langcode->value = \Drupal::languageManager()->getDefaultLanguage()->getId();
+    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->getId(), $entity->langcode->value, format_string('%entity_type: Language code can be read.', array('%entity_type' => $entity_type)));
     $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage(), $entity->langcode->language, format_string('%entity_type: Language object can be read.', array('%entity_type' => $entity_type)));
 
     // Revert language by code then try setting it by language object.
     $entity->langcode->value = $langcode;
     $entity->langcode->language = \Drupal::languageManager()->getDefaultLanguage();
-    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->id, $entity->langcode->value, format_string('%entity_type: Language code can be read.', array('%entity_type' => $entity_type)));
+    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->getId(), $entity->langcode->value, format_string('%entity_type: Language code can be read.', array('%entity_type' => $entity_type)));
     $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage(), $entity->langcode->language, format_string('%entity_type: Language object can be read.', array('%entity_type' => $entity_type)));
 
     // Access the text field and test updating.
diff --git a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
index bdb5dda..26370b2 100644
--- a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
+++ b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
@@ -116,7 +116,7 @@ protected function setUp() {
         'label' => $this->randomString(),
         'weight' => $i,
       ));
-      $this->langcodes[$i] = $language->id();
+      $this->langcodes[$i] = $language->getId();
       $language->save();
     }
   }
diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php
index cc42f0e..e9c7211 100644
--- a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php
@@ -64,12 +64,12 @@ function testEntityFormLanguage() {
 
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
 
-    $this->assertTrue($node->language()->id == $form_langcode, 'Form language is the same as the entity language.');
+    $this->assertTrue($node->language()->getId() == $form_langcode, 'Form language is the same as the entity language.');
 
     // Edit the node and test the form language.
     $this->drupalGet($this->langcodes[0] . '/node/' . $node->id() . '/edit');
     $form_langcode = \Drupal::state()->get('entity_test.form_langcode');
-    $this->assertTrue($node->language()->id == $form_langcode, 'Form language is the same as the entity language.');
+    $this->assertTrue($node->language()->getId() == $form_langcode, 'Form language is the same as the entity language.');
 
     // Explicitly set form langcode.
     $langcode = $this->langcodes[0];
diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php
index 6f9b011..ed3b112 100644
--- a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php
@@ -39,7 +39,7 @@ protected function _testEntityLanguageMethods($entity_type) {
       'name' => 'test',
       'user_id' => $this->container->get('current_user')->id(),
     ));
-    $this->assertEqual($entity->language()->getId(), $this->languageManager->getDefaultLanguage()->id, format_string('%entity_type: Entity created with API has default language.', array('%entity_type' => $entity_type)));
+    $this->assertEqual($entity->language()->getId(), $this->languageManager->getDefaultLanguage()->getId(), format_string('%entity_type: Entity created with API has default language.', array('%entity_type' => $entity_type)));
     $entity = entity_create($entity_type, array(
       'name' => 'test',
       'user_id' => \Drupal::currentUser()->id(),
@@ -153,7 +153,7 @@ protected function _testMultilingualProperties($entity_type) {
     $entity = entity_create($entity_type, array('name' => $name, 'user_id' => $uid, 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED));
     $entity->save();
     $entity = entity_load($entity_type, $entity->id());
-    $default_langcode = $entity->language()->id;
+    $default_langcode = $entity->language()->getId();
     $this->assertEqual($default_langcode, LanguageInterface::LANGCODE_NOT_SPECIFIED, format_string('%entity_type: Entity created as language neutral.', array('%entity_type' => $entity_type)));
     $field = $entity->getTranslation(LanguageInterface::LANGCODE_DEFAULT)->get('name');
     $this->assertEqual($name, $field->value, format_string('%entity_type: The entity name has been correctly stored as language neutral.', array('%entity_type' => $entity_type)));
@@ -173,7 +173,7 @@ protected function _testMultilingualProperties($entity_type) {
     $entity = entity_create($entity_type, array('name' => $name, 'user_id' => $uid, 'langcode' => $langcode));
     $entity->save();
     $entity = entity_load($entity_type, $entity->id());
-    $default_langcode = $entity->language()->id;
+    $default_langcode = $entity->language()->getId();
     $this->assertEqual($default_langcode, $langcode, format_string('%entity_type: Entity created as language specific.', array('%entity_type' => $entity_type)));
     $field = $entity->getTranslation($langcode)->get('name');
     $this->assertEqual($name, $field->value, format_string('%entity_type: The entity name has been correctly stored as a language-aware property.', array('%entity_type' => $entity_type)));
@@ -222,7 +222,7 @@ protected function _testMultilingualProperties($entity_type) {
       );
       $field = $entity->getTranslation($langcode)->get('name');
       $this->assertEqual($properties[$langcode]['name'][0], $field->value, format_string('%entity_type: The entity name has been correctly stored for language %langcode.', $args));
-      $field_langcode = ($langcode == $entity->language()->id) ? $default_langcode : $langcode;
+      $field_langcode = ($langcode == $entity->language()->getId()) ? $default_langcode : $langcode;
       $this->assertEqual($field_langcode, $field->getLangcode(), format_string('%entity_type: The field object has the expected langcode  %langcode.', $args));
       $this->assertEqual($properties[$langcode]['user_id'][0], $entity->getTranslation($langcode)->get('user_id')->target_id, format_string('%entity_type: The entity author has been correctly stored for language %langcode.', $args));
     }
@@ -322,8 +322,8 @@ function testEntityTranslationAPI() {
     $translation = $entity->addTranslation($langcode);
     $this->assertNotIdentical($entity, $translation, 'The entity and the translation object differ from one another.');
     $this->assertTrue($entity->hasTranslation($langcode), 'The new translation exists.');
-    $this->assertEqual($translation->language()->id, $langcode, 'The translation language matches the specified one.');
-    $this->assertEqual($translation->getUntranslated()->language()->id, $default_langcode, 'The original language can still be retrieved.');
+    $this->assertEqual($translation->language()->getId(), $langcode, 'The translation language matches the specified one.');
+    $this->assertEqual($translation->getUntranslated()->language()->getId(), $default_langcode, 'The original language can still be retrieved.');
     $translation->name->value = $name_translated;
     $this->assertEqual($entity->name->value, $name, 'The original name is retained after setting a translated value.');
     $entity->name->value = $name;
@@ -337,16 +337,16 @@ function testEntityTranslationAPI() {
 
     // Check that after loading an entity the language is the default one.
     $entity = $this->reloadEntity($entity);
-    $this->assertEqual($entity->language()->id, $default_langcode, 'The loaded entity is the original one.');
+    $this->assertEqual($entity->language()->getId(), $default_langcode, 'The loaded entity is the original one.');
 
     // Add another translation and check that everything works as expected. A
     // new translation object can be obtained also by just specifying a valid
     // language.
     $langcode2 = $this->langcodes[2];
     $translation = $entity->getTranslation($langcode2);
-    $value = $entity !== $translation && $translation->language()->id == $langcode2 && $entity->hasTranslation($langcode2);
+    $value = $entity !== $translation && $translation->language()->getId() == $langcode2 && $entity->hasTranslation($langcode2);
     $this->assertTrue($value, 'A new translation object can be obtained also by specifying a valid language.');
-    $this->assertEqual($entity->language()->id, $default_langcode, 'The original language has been preserved.');
+    $this->assertEqual($entity->language()->getId(), $default_langcode, 'The original language has been preserved.');
     $translation->save();
     $hooks = $this->getHooksInfo();
     $this->assertEqual($hooks['entity_translation_insert'], $langcode2, 'The generic entity translation insertion hook has fired.');
@@ -450,7 +450,7 @@ function testEntityTranslationAPI() {
    * Tests language fallback applied to field and entity translations.
    */
   function testLanguageFallback() {
-    $current_langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id;
+    $current_langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
     $this->langcodes[] = $current_langcode;
 
     $values = array();
@@ -474,7 +474,7 @@ function testLanguageFallback() {
     // Check that retrieveing the current translation works as expected.
     $entity = $this->reloadEntity($entity);
     $translation = $this->entityManager->getTranslationFromContext($entity, $langcode2);
-    $this->assertEqual($translation->language()->id, $default_langcode, 'The current translation language matches the expected one.');
+    $this->assertEqual($translation->language()->getId(), $default_langcode, 'The current translation language matches the expected one.');
 
     // Check that language fallback respects language weight by default.
     $languages = $this->languageManager->getLanguages();
@@ -482,14 +482,14 @@ function testLanguageFallback() {
     $language->set('weight', -1);
     $language->save();
     $translation = $this->entityManager->getTranslationFromContext($entity, $langcode2);
-    $this->assertEqual($translation->language()->id, $langcode, 'The current translation language matches the expected one.');
+    $this->assertEqual($translation->language()->getId(), $langcode, 'The current translation language matches the expected one.');
 
     // Check that the current translation is properly returned.
     $translation = $this->entityManager->getTranslationFromContext($entity);
-    $this->assertEqual($langcode, $translation->language()->id, 'The current translation language matches the topmost language fallback candidate.');
+    $this->assertEqual($langcode, $translation->language()->getId(), 'The current translation language matches the topmost language fallback candidate.');
     $entity->addTranslation($current_langcode, $values[$current_langcode]);
     $translation = $this->entityManager->getTranslationFromContext($entity);
-    $this->assertEqual($current_langcode, $translation->language()->id, 'The current translation language matches the current language.');
+    $this->assertEqual($current_langcode, $translation->language()->getId(), 'The current translation language matches the current language.');
 
     // Check that if the entity has no translation no fallback is applied.
     $entity2 = $controller->create(array('langcode' => $default_langcode));
diff --git a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
index 6610958..c304499 100644
--- a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
+++ b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
@@ -132,13 +132,13 @@ function testFieldLoad() {
       for ($delta = 0; $delta <= $this->field_cardinality; $delta++) {
         $value = mt_rand(1, 127);
         $values[$revision_id][] = $value;
-        $query->values(array($bundle, 0, $entity->id(), $revision_id, $delta, $entity->language()->id, $value));
+        $query->values(array($bundle, 0, $entity->id(), $revision_id, $delta, $entity->language()->getId(), $value));
       }
       $query->execute();
     }
     $query = db_insert($this->table)->fields($columns);
     foreach ($values[$revision_id] as $delta => $value) {
-      $query->values(array($bundle, 0, $entity->id(), $revision_id, $delta, $entity->language()->id, $value));
+      $query->values(array($bundle, 0, $entity->id(), $revision_id, $delta, $entity->language()->getId(), $value));
     }
     $query->execute();
 
@@ -202,7 +202,7 @@ function testFieldWrite() {
         'deleted' => 0,
         'entity_id' => $entity->id(),
         'revision_id' => $entity->getRevisionId(),
-        'langcode' => $entity->language()->id,
+        'langcode' => $entity->language()->getId(),
         'delta' => $delta,
         $this->field_name . '_value' => $values[$delta]['value'],
       );
@@ -225,7 +225,7 @@ function testFieldWrite() {
         'deleted' => 0,
         'entity_id' => $entity->id(),
         'revision_id' => $entity->getRevisionId(),
-        'langcode' => $entity->language()->id,
+        'langcode' => $entity->language()->getId(),
         'delta' => $delta,
         $this->field_name . '_value' => $values[$delta]['value'],
       );
@@ -253,7 +253,7 @@ function testFieldWrite() {
           'deleted' => 0,
           'entity_id' => $entity->id(),
           'revision_id' => $revision_id,
-          'langcode' => $entity->language()->id,
+          'langcode' => $entity->language()->getId(),
           'delta' => $delta,
           $this->field_name . '_value' => $values[$delta]['value'],
         );
diff --git a/core/modules/system/src/Tests/Entity/FieldTranslationSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldTranslationSqlStorageTest.php
index 2874aed..956b70d 100644
--- a/core/modules/system/src/Tests/Entity/FieldTranslationSqlStorageTest.php
+++ b/core/modules/system/src/Tests/Entity/FieldTranslationSqlStorageTest.php
@@ -80,7 +80,7 @@ protected function assertFieldStorageLangcode(ContentEntityInterface $entity, $m
     $status = TRUE;
     $entity_type = $entity->getEntityTypeId();
     $id = $entity->id();
-    $langcode = $entity->getUntranslated()->language()->id;
+    $langcode = $entity->getUntranslated()->language()->getId();
     $fields = array($this->field_name, $this->untranslatable_field_name);
     /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */
     $table_mapping = \Drupal::entityManager()->getStorage($entity_type)->getTableMapping();
diff --git a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
index 2986920..d0a75d4 100644
--- a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -29,7 +29,7 @@ class KeyValueContentEntityStorageTest extends DrupalUnitTestBase {
    * Tests CRUD operations.
    */
   function testCRUD() {
-    $default_langcode = language_default()->id;
+    $default_langcode = language_default()->getId();
     // Verify default properties on a newly created empty entity.
     $empty = entity_create('entity_test_label');
     $this->assertIdentical($empty->id->value, NULL);
diff --git a/core/modules/system/src/Tests/Mail/MailTest.php b/core/modules/system/src/Tests/Mail/MailTest.php
index a4dcf5f..78ebf24 100644
--- a/core/modules/system/src/Tests/Mail/MailTest.php
+++ b/core/modules/system/src/Tests/Mail/MailTest.php
@@ -60,7 +60,7 @@ public function testCancelMessage() {
     \Drupal::state()->set('system.test_mail_collector', array());
 
     // Send a test message that simpletest_mail_alter should cancel.
-    drupal_mail('simpletest', 'cancel_test', 'cancel@example.com', $language_interface->id);
+    drupal_mail('simpletest', 'cancel_test', 'cancel@example.com', $language_interface->getId());
     // Retrieve sent message.
     $captured_emails = \Drupal::state()->get('system.test_mail_collector');
     $sent_message = end($captured_emails);
diff --git a/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php b/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php
index 907827f..1d5f60e 100644
--- a/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php
+++ b/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php
@@ -40,7 +40,7 @@ public function testSystemTokenRecognition() {
     foreach ($tests as $test) {
       $input = $test['prefix'] . '[site:name]' . $test['suffix'];
       $expected = $test['prefix'] . 'Drupal' . $test['suffix'];
-      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->id));
+      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->getId()));
       $this->assertTrue($output == $expected, format_string('Token recognized in string %string', array('%string' => $input)));
     }
 
@@ -61,12 +61,12 @@ public function testClear() {
 
     // Replace with with the clear parameter, only the valid token should remain.
     $target = String::checkPlain(\Drupal::config('system.site')->get('name'));
-    $result = $this->tokenService->replace($source, array(), array('langcode' => $this->interfaceLanguage->id, 'clear' => TRUE));
+    $result = $this->tokenService->replace($source, array(), array('langcode' => $this->interfaceLanguage->getId(), 'clear' => TRUE));
     $this->assertEqual($target, $result, 'Valid tokens replaced while invalid tokens ignored.');
 
     $target .= '[user:name]';
     $target .= '[bogus:token]';
-    $result = $this->tokenService->replace($source, array(), array('langcode' => $this->interfaceLanguage->id));
+    $result = $this->tokenService->replace($source, array(), array('langcode' => $this->interfaceLanguage->getId()));
     $this->assertEqual($target, $result, 'Valid tokens replaced while invalid tokens ignored.');
   }
 
@@ -106,7 +106,7 @@ public function testSystemSiteTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->id));
+      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized system site information token %token replaced.', array('%token' => $input)));
     }
 
@@ -115,7 +115,7 @@ public function testSystemSiteTokenReplacement() {
     $tests['[site:slogan]'] = $config->get('slogan');
 
     foreach ($tests as $input => $expected) {
-      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->id, 'sanitize' => FALSE));
+      $output = $this->tokenService->replace($input, array(), array('langcode' => $this->interfaceLanguage->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized system site information token %token replaced.', array('%token' => $input)));
     }
 
@@ -141,18 +141,18 @@ public function testSystemDateTokenReplacement() {
     // Generate and test tokens.
     $tests = array();
     $date_formatter = \Drupal::service('date.formatter');
-    $tests['[date:short]'] = $date_formatter->format($date, 'short', '', NULL, $this->interfaceLanguage->id);
-    $tests['[date:medium]'] = $date_formatter->format($date, 'medium', '', NULL, $this->interfaceLanguage->id);
-    $tests['[date:long]'] = $date_formatter->format($date, 'long', '', NULL, $this->interfaceLanguage->id);
-    $tests['[date:custom:m/j/Y]'] = $date_formatter->format($date, 'custom', 'm/j/Y', NULL, $this->interfaceLanguage->id);
-    $tests['[date:since]'] = $date_formatter->formatInterval(REQUEST_TIME - $date, 2, $this->interfaceLanguage->id);
+    $tests['[date:short]'] = $date_formatter->format($date, 'short', '', NULL, $this->interfaceLanguage->getId());
+    $tests['[date:medium]'] = $date_formatter->format($date, 'medium', '', NULL, $this->interfaceLanguage->getId());
+    $tests['[date:long]'] = $date_formatter->format($date, 'long', '', NULL, $this->interfaceLanguage->getId());
+    $tests['[date:custom:m/j/Y]'] = $date_formatter->format($date, 'custom', 'm/j/Y', NULL, $this->interfaceLanguage->getId());
+    $tests['[date:since]'] = $date_formatter->formatInterval(REQUEST_TIME - $date, 2, $this->interfaceLanguage->getId());
     $tests['[date:raw]'] = Xss::filter($date);
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $this->tokenService->replace($input, array('date' => $date), array('langcode' => $this->interfaceLanguage->id));
+      $output = $this->tokenService->replace($input, array('date' => $date), array('langcode' => $this->interfaceLanguage->getId()));
       $this->assertEqual($output, $expected, format_string('Date token %token replaced.', array('%token' => $input)));
     }
   }
diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php
index 98a6e9f..721932d 100644
--- a/core/modules/system/src/Tests/Theme/TwigTransTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php
@@ -76,7 +76,7 @@ protected function setUp() {
     $this->rebuildContainer();
 
     // Check that lolspeak is the default language for the site.
-    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->id, 'xx', 'Lolspeak is the default language');
+    $this->assertEqual(\Drupal::languageManager()->getDefaultLanguage()->getId(), 'xx', 'Lolspeak is the default language');
   }
 
   /**
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 71297db..3ce1efd 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -7,6 +7,7 @@
 
 use Drupal\Component\Utility\String;
 use Drupal\Core\Utility\UpdateException;
+use Drupal\Core\Language\LanguageInterface;
 
 /**
  * @addtogroup hooks
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 6ca3699..1eb6354 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -569,7 +569,7 @@ function system_page_build(&$page) {
       array(
         'path' => current_path(),
         'front' => drupal_is_front_page(),
-        'language' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->id,
+        'language' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(),
         'query' => \Drupal::request()->query->all(),
       )
     );
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index 63e289a..0b4d931 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -391,28 +391,28 @@ function entity_test_entity_operation_alter(array &$operations, EntityInterface
  * Implements hook_entity_translation_insert().
  */
 function entity_test_entity_translation_insert(EntityInterface $translation) {
-  _entity_test_record_hooks('entity_translation_insert', $translation->language()->id);
+  _entity_test_record_hooks('entity_translation_insert', $translation->language()->getId());
 }
 
 /**
  * Implements hook_entity_translation_delete().
  */
 function entity_test_entity_translation_delete(EntityInterface $translation) {
-  _entity_test_record_hooks('entity_translation_delete', $translation->language()->id);
+  _entity_test_record_hooks('entity_translation_delete', $translation->language()->getId());
 }
 
 /**
  * Implements hook_ENTITY_TYPE_translation_insert().
  */
 function entity_test_entity_test_mul_translation_insert(EntityInterface $translation) {
-  _entity_test_record_hooks('entity_test_mul_translation_insert', $translation->language()->id);
+  _entity_test_record_hooks('entity_test_mul_translation_insert', $translation->language()->getId());
 }
 
 /**
  * Implements hook_ENTITY_TYPE_translation_delete().
  */
 function entity_test_entity_test_mul_translation_delete(EntityInterface $translation) {
-  _entity_test_record_hooks('entity_test_mul_translation_delete', $translation->language()->id);
+  _entity_test_record_hooks('entity_test_mul_translation_delete', $translation->language()->getId());
 }
 
 /**
@@ -430,7 +430,7 @@ function entity_test_entity_test_mul_translation_delete(EntityInterface $transla
  * @see \Drupal\field\Entity\FieldInstanceConfig::$default_value
  */
 function entity_test_field_default_value(ContentEntityInterface $entity, FieldDefinitionInterface $definition) {
-  return array(array('value' => $definition->getName() . '_' . $entity->language()->id));
+  return array(array('value' => $definition->getName() . '_' . $entity->language()->getId()));
 }
 
 /**
diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
index 6845520..02f0938 100644
--- a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
+++ b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
@@ -45,7 +45,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['langcode'] = array(
       '#title' => t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $entity->getUntranslated()->language()->id,
+      '#default_value' => $entity->getUntranslated()->language()->getId(),
       '#languages' => LanguageInterface::STATE_ALL,
     );
 
diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php
index 089334f..47fd8ad 100644
--- a/core/modules/system/theme.api.php
+++ b/core/modules/system/theme.api.php
@@ -434,7 +434,7 @@ function hook_theme_suggestions_HOOK(array $variables) {
  */
 function hook_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
   // Add an interface-language specific suggestion to all theme hooks.
-  $suggestions[] = $hook . '__' . \Drupal::languageManager()->getCurrentLanguage()->id;
+  $suggestions[] = $hook . '__' . \Drupal::languageManager()->getCurrentLanguage()->getId();
 }
 
 /**
diff --git a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml
index 8fbedfc..3fce880 100644
--- a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml
+++ b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml
@@ -186,10 +186,3 @@ views.filter.taxonomy_index_tid_depth:
 views.relationship.node_term_data:
   type: views_relationship
   label: 'Taxonomy term'
-  mapping:
-    vids:
-      type: sequence
-      label: 'Vocabularies'
-      sequence:
-        - type: string
-          label: 'Vocabulary'
diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php
index 95e6178..981964c 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\taxonomy\Form;
 
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\FormStateInterface;
@@ -27,23 +26,13 @@ class OverviewTerms extends FormBase {
   protected $moduleHandler;
 
   /**
-   * The term storage controller.
-   *
-   * @var \Drupal\taxonomy\TermStorageInterface
-   */
-  protected $storageController;
-
-  /**
    * Constructs an OverviewTerms object.
    *
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler service.
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager service.
    */
-  public function __construct(ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager) {
+  public function __construct(ModuleHandlerInterface $module_handler) {
     $this->moduleHandler = $module_handler;
-    $this->storageController = $entity_manager->getStorage('taxonomy_term');
   }
 
   /**
@@ -51,8 +40,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityManage
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('module_handler'),
-      $container->get('entity.manager')
+      $container->get('module_handler')
     );
   }
 
@@ -109,7 +97,9 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular
 
     $delta = 0;
     $term_deltas = array();
-    $tree = $this->storageController->loadTree($taxonomy_vocabulary->id(), 0, NULL, TRUE);
+    // @todo taxonomy_get_tree needs to be converted to a service and injected.
+    //   Will be fixed in http://drupal.org/node/1976298.
+    $tree = taxonomy_get_tree($taxonomy_vocabulary->id(), 0, NULL, TRUE);
     $tree_index = 0;
     do {
       // In case this tree is completely empty.
diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php
index 2fa6f4b..0cdbeee 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -33,7 +33,7 @@ public function form(array $form, FormStateInterface $form_state) {
       '#type' => 'language_select',
       '#title' => $this->t('Language'),
       '#languages' => LanguageInterface::STATE_ALL,
-      '#default_value' => $term->getUntranslated()->language()->id,
+      '#default_value' => $term->getUntranslated()->language()->getId(),
       '#access' => !empty($language_configuration['language_show']),
     );
 
diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php
index 015baed..c54f5a7 100644
--- a/core/modules/taxonomy/src/TermStorage.php
+++ b/core/modules/taxonomy/src/TermStorage.php
@@ -17,55 +17,6 @@
 class TermStorage extends SqlContentEntityStorage implements TermStorageInterface {
 
   /**
-   * Array of loaded parents keyed by child term ID.
-   *
-   * @var array
-   */
-  protected $parents = array();
-
-  /**
-   * Array of all loaded term ancestry keyed by ancestor term ID.
-   *
-   * @var array
-   */
-  protected $parentsAll = array();
-
-  /**
-   * Array of child terms keyed by parent term ID.
-   *
-   * @var array
-   */
-  protected $children = array();
-
-  /**
-   * Array of term parents keyed by vocabulary ID and child term ID.
-   *
-   * @var array
-   */
-  protected $treeParents = array();
-
-  /**
-   * Array of term ancestors keyed by vocabulary ID and parent term ID.
-   *
-   * @var array
-   */
-  protected $treeChildren = array();
-
-  /**
-   * Array of terms in a tree keyed by vocabulary ID and term ID.
-   *
-   * @var array
-   */
-  protected $treeTerms = array();
-
-  /**
-   * Array of loaded trees keyed by a cache id matching tree arguments.
-   *
-   * @var array
-   */
-  protected $trees = array();
-
-  /**
    * {@inheritdoc}
    *
    * @param array $values
@@ -97,13 +48,12 @@ protected function buildPropertyQuery(QueryInterface $entity_query, array $value
    */
   public function resetCache(array $ids = NULL) {
     drupal_static_reset('taxonomy_term_count_nodes');
-    $this->parents = array();
-    $this->parentsAll = array();
-    $this->children = array();
-    $this->treeChildren = array();
-    $this->treeParents = array();
-    $this->treeTerms = array();
-    $this->trees = array();
+    drupal_static_reset('taxonomy_get_tree');
+    drupal_static_reset('taxonomy_get_tree:parents');
+    drupal_static_reset('taxonomy_get_tree:terms');
+    drupal_static_reset('taxonomy_term_load_parents');
+    drupal_static_reset('taxonomy_term_load_parents_all');
+    drupal_static_reset('taxonomy_term_load_children');
     parent::resetCache($ids);
   }
 
@@ -136,165 +86,50 @@ public function updateTermHierarchy(EntityInterface $term) {
    * {@inheritdoc}
    */
   public function loadParents($tid) {
-    if (!isset($this->parents[$tid])) {
-      $parents = array();
-      $query = $this->database->select('taxonomy_term_field_data', 't');
-      $query->join('taxonomy_term_hierarchy', 'h', 'h.parent = t.tid');
-      $query->addField('t', 'tid');
-      $query->condition('h.tid', $tid);
-      $query->condition('t.default_langcode', 1);
-      $query->addTag('term_access');
-      $query->orderBy('t.weight');
-      $query->orderBy('t.name');
-      if ($ids = $query->execute()->fetchCol()) {
-        $parents = $this->loadMultiple($ids);
-      }
-      $this->parents[$tid] = $parents;
-    }
-    return $this->parents[$tid];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function loadAllParents($tid) {
-    if (!isset($this->parentsAll[$tid])) {
-      $parents = array();
-      if ($term = $this->load($tid)) {
-        $parents[] = $term;
-        $n = 0;
-        while ($parent = $this->loadParents($parents[$n]->id())) {
-          $parents = array_merge($parents, $parent);
-          $n++;
-        }
-      }
-
-      $this->parentsAll[$tid] = $parents;
-    }
-    return $this->parentsAll[$tid];
+    $query = $this->database->select('taxonomy_term_field_data', 't');
+    $query->join('taxonomy_term_hierarchy', 'h', 'h.parent = t.tid');
+    $query->addField('t', 'tid');
+    $query->condition('h.tid', $tid);
+    $query->condition('t.default_langcode', 1);
+    $query->addTag('term_access');
+    $query->orderBy('t.weight');
+    $query->orderBy('t.name');
+    return $query->execute()->fetchCol();
   }
 
   /**
    * {@inheritdoc}
    */
   public function loadChildren($tid, $vid = NULL) {
-    if (!isset($this->children[$tid])) {
-      $children = array();
-      $query = $this->database->select('taxonomy_term_field_data', 't');
-      $query->join('taxonomy_term_hierarchy', 'h', 'h.tid = t.tid');
-      $query->addField('t', 'tid');
-      $query->condition('h.parent', $tid);
-      if ($vid) {
-        $query->condition('t.vid', $vid);
-      }
-      $query->condition('t.default_langcode', 1);
-      $query->addTag('term_access');
-      $query->orderBy('t.weight');
-      $query->orderBy('t.name');
-      if ($ids = $query->execute()->fetchCol()) {
-        $children = $this->loadMultiple($ids);
-      }
-      $this->children[$tid] = $children;
+    $query = $this->database->select('taxonomy_term_field_data', 't');
+    $query->join('taxonomy_term_hierarchy', 'h', 'h.tid = t.tid');
+    $query->addField('t', 'tid');
+    $query->condition('h.parent', $tid);
+    if ($vid) {
+      $query->condition('t.vid', $vid);
     }
-    return $this->children[$tid];
+    $query->condition('t.default_langcode', 1);
+    $query->addTag('term_access');
+    $query->orderBy('t.weight');
+    $query->orderBy('t.name');
+    return $query->execute()->fetchCol();
   }
 
   /**
    * {@inheritdoc}
    */
-  public function loadTree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE) {
-    $cache_key = implode(':', func_get_args());
-    if (!isset($this->trees[$cache_key])) {
-      // We cache trees, so it's not CPU-intensive to call on a term and its
-      // children, too.
-      if (!isset($this->treeChildren[$vid])) {
-        $this->treeChildren[$vid] = array();
-        $this->treeParents[$vid] = array();
-        $this->treeTerms[$vid] = array();
-        $query = $this->database->select('taxonomy_term_field_data', 't');
-        $query->join('taxonomy_term_hierarchy', 'h', 'h.tid = t.tid');
-        $result = $query
-          ->addTag('term_access')
-          ->fields('t')
-          ->fields('h', array('parent'))
-          ->condition('t.vid', $vid)
-          ->condition('t.default_langcode', 1)
-          ->orderBy('t.weight')
-          ->orderBy('t.name')
-          ->execute();
-        foreach ($result as $term) {
-          $this->treeChildren[$vid][$term->parent][] = $term->tid;
-          $this->treeParents[$vid][$term->tid][] = $term->parent;
-          $this->treeTerms[$vid][$term->tid] = $term;
-        }
-      }
-
-      // Load full entities, if necessary. The entity controller statically
-      // caches the results.
-      $term_entities = array();
-      if ($load_entities) {
-        $term_entities = $this->loadMultiple(array_keys($this->treeTerms[$vid]));
-      }
-
-      $max_depth = (!isset($max_depth)) ? count($this->treeChildren[$vid]) : $max_depth;
-      $tree = array();
-
-      // Keeps track of the parents we have to process, the last entry is used
-      // for the next processing step.
-      $process_parents = array();
-      $process_parents[] = $parent;
-
-      // Loops over the parent terms and adds its children to the tree array.
-      // Uses a loop instead of a recursion, because it's more efficient.
-      while (count($process_parents)) {
-        $parent = array_pop($process_parents);
-        // The number of parents determines the current depth.
-        $depth = count($process_parents);
-        if ($max_depth > $depth && !empty($this->treeChildren[$vid][$parent])) {
-          $has_children = FALSE;
-          $child = current($this->treeChildren[$vid][$parent]);
-          do {
-            if (empty($child)) {
-              break;
-            }
-            $term = $load_entities ? $term_entities[$child] : $this->treeTerms[$vid][$child];
-            if (isset($this->treeParents[$vid][$load_entities ? $term->id() : $term->tid])) {
-              // Clone the term so that the depth attribute remains correct
-              // in the event of multiple parents.
-              $term = clone $term;
-            }
-            $term->depth = $depth;
-            unset($term->parent);
-            $tid = $load_entities ? $term->id() : $term->tid;
-            $term->parents = $this->treeParents[$vid][$tid];
-            $tree[] = $term;
-            if (!empty($this->treeChildren[$vid][$tid])) {
-              $has_children = TRUE;
-
-              // We have to continue with this parent later.
-              $process_parents[] = $parent;
-              // Use the current term as parent for the next iteration.
-              $process_parents[] = $tid;
-
-              // Reset pointers for child lists because we step in there more
-              // often with multi parents.
-              reset($this->treeChildren[$vid][$tid]);
-              // Move pointer so that we get the correct term the next time.
-              next($this->treeChildren[$vid][$parent]);
-              break;
-            }
-          } while ($child = next($this->treeChildren[$vid][$parent]));
-
-          if (!$has_children) {
-            // We processed all terms in this hierarchy-level, reset pointer
-            // so that this function works the next time it gets called.
-            reset($this->treeChildren[$vid][$parent]);
-          }
-        }
-      }
-      $this->trees[$cache_key] = $tree;
-    }
-    return $this->trees[$cache_key];
+  public function loadTree($vid) {
+    $query = $this->database->select('taxonomy_term_field_data', 't');
+    $query->join('taxonomy_term_hierarchy', 'h', 'h.tid = t.tid');
+    return $query
+      ->addTag('term_access')
+      ->fields('t')
+      ->fields('h', array('parent'))
+      ->condition('t.vid', $vid)
+      ->condition('t.default_langcode', 1)
+      ->orderBy('t.weight')
+      ->orderBy('t.name')
+      ->execute();
   }
 
   /**
@@ -354,29 +189,4 @@ public function getNodeTerms($nids, $vocabs = array(), $langcode = NULL) {
     return $terms;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function __sleep() {
-    $vars = parent::__sleep();
-    // Do not serialize static cache.
-    unset($vars['parents'], $vars['parentsAll'], $vars['children'], $vars['treeChildren'], $vars['treeParents'], $vars['treeTerms'], $vars['trees']);
-    return $vars;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function __wakeup() {
-    parent::__wakeup();
-    // Initialize static caches.
-    $this->parents = array();
-    $this->parentsAll = array();
-    $this->children = array();
-    $this->treeChildren = array();
-    $this->treeParents = array();
-    $this->treeTerms = array();
-    $this->trees = array();
-  }
-
 }
diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php
index f60d7a2..7f53683 100644
--- a/core/modules/taxonomy/src/TermStorageInterface.php
+++ b/core/modules/taxonomy/src/TermStorageInterface.php
@@ -37,23 +37,12 @@ public function updateTermHierarchy(EntityInterface $term);
    * @param int $tid
    *   Term ID to retrieve parents for.
    *
-   * @return \Drupal\taxonomy\TermInterface[]
+   * @return array
    *   An array of term objects which are the parents of the term $tid.
    */
   public function loadParents($tid);
 
   /**
-   * Finds all ancestors of a given term ID.
-   *
-   * @param int $tid
-   *   Term ID to retrieve ancestors for.
-   *
-   * @return \Drupal\taxonomy\TermInterface[]
-   *   An array of term objects which are the ancestors of the term $tid.
-   */
-  public function loadAllParents($tid);
-
-  /**
    * Finds all children of a term ID.
    *
    * @param int $tid
@@ -61,7 +50,7 @@ public function loadAllParents($tid);
    * @param string $vid
    *   An optional vocabulary ID to restrict the child search.
    *
-   * @return \Drupal\taxonomy\TermInterface[]
+   * @return array
    *   An array of term objects that are the children of the term $tid.
    */
   public function loadChildren($tid, $vid = NULL);
@@ -71,22 +60,11 @@ public function loadChildren($tid, $vid = NULL);
    *
    * @param string $vid
    *   Vocabulary ID to retrieve terms for.
-   * @param int $parent
-   *   The term ID under which to generate the tree. If 0, generate the tree
-   *   for the entire vocabulary.
-   * @param int $max_depth
-   *   The number of levels of the tree to return. Leave NULL to return all
-   *   levels.
-   * @param bool $load_entities
-   *   If TRUE, a full entity load will occur on the term objects. Otherwise
-   *   they are partial objects queried directly from the {taxonomy_term_data}
-   *   table to save execution time and memory consumption when listing large
-   *   numbers of terms. Defaults to FALSE.
    *
-   * @return \Drupal\taxonomy\TermInterface[]
+   * @return array
    *   An array of term objects that are the children of the vocabulary $vid.
    */
-  public function loadTree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE);
+  public function loadTree($vid);
 
   /**
    * Count the number of nodes in a given vocabulary ID.
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php b/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
index 1952b5d..c1abffc 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
@@ -66,7 +66,7 @@ function testTermIndentation() {
     $this->assertNoPattern('|<div class="indentation">&nbsp;</div>|');
 
     // Check explicitly that term 2 has no parents.
-    \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
+    drupal_static_reset();
     $parents = taxonomy_term_load_parents($term2->id());
     $this->assertTrue(empty($parents), 'Term 2 has no parents now');
   }
diff --git a/core/modules/taxonomy/src/Tests/TermLanguageTest.php b/core/modules/taxonomy/src/Tests/TermLanguageTest.php
index be67e5d..e514682 100644
--- a/core/modules/taxonomy/src/Tests/TermLanguageTest.php
+++ b/core/modules/taxonomy/src/Tests/TermLanguageTest.php
@@ -56,7 +56,7 @@ function testTermLanguage() {
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $terms = taxonomy_term_load_multiple_by_name($edit['name[0][value]']);
     $term = reset($terms);
-    $this->assertEqual($term->language()->id, $edit['langcode'], 'The term contains the correct langcode.');
+    $this->assertEqual($term->language()->getId(), $edit['langcode'], 'The term contains the correct langcode.');
 
     // Check if on the edit page the language is correct.
     $this->drupalGet('taxonomy/term/' . $term->id() . '/edit');
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index 0664608..8b66001 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -433,7 +433,9 @@ function testTermReorder() {
 
     // Fetch the created terms in the default alphabetical order, i.e. term1
     // precedes term2 alphabetically, and term2 precedes term3.
-    \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
+    drupal_static_reset('taxonomy_get_tree');
+    drupal_static_reset('taxonomy_get_treeparent');
+    drupal_static_reset('taxonomy_get_treeterms');
     list($term1, $term2, $term3) = taxonomy_get_tree($this->vocabulary->id(), 0, NULL, TRUE);
 
     $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
@@ -458,7 +460,9 @@ function testTermReorder() {
     );
     $this->drupalPostForm(NULL, $edit, t('Save'));
 
-    \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
+    drupal_static_reset('taxonomy_get_tree');
+    drupal_static_reset('taxonomy_get_treeparent');
+    drupal_static_reset('taxonomy_get_treeterms');
     $terms = taxonomy_get_tree($this->vocabulary->id());
     $this->assertEqual($terms[0]->tid, $term2->id(), 'Term 2 was moved above term 1.');
     $this->assertEqual($terms[1]->parents, array($term2->id()), 'Term 3 was made a child of term 2.');
@@ -470,12 +474,14 @@ function testTermReorder() {
     // Ensure form redirected back to overview.
     $this->assertUrl('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
 
-    \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
+    drupal_static_reset('taxonomy_get_tree');
+    drupal_static_reset('taxonomy_get_treeparent');
+    drupal_static_reset('taxonomy_get_treeterms');
     $terms = taxonomy_get_tree($this->vocabulary->id(), 0, NULL, TRUE);
     $this->assertEqual($terms[0]->id(), $term1->id(), 'Term 1 was moved to back above term 2.');
     $this->assertEqual($terms[1]->id(), $term2->id(), 'Term 2 was moved to back below term 1.');
     $this->assertEqual($terms[2]->id(), $term3->id(), 'Term 3 is still below term 2.');
-    $this->assertEqual($terms[2]->parents, array($term2->id()), 'Term 3 is still a child of term 2.');
+    $this->assertEqual($terms[2]->parents, array($term2->id()), 'Term 3 is still a child of term 2.' . var_export($terms[1]->id(), 1));
   }
 
   /**
diff --git a/core/modules/taxonomy/src/Tests/TokenReplaceTest.php b/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
index 27d02ca..5d79224 100644
--- a/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
+++ b/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
@@ -91,7 +91,7 @@ function testTaxonomyTokenReplacement() {
     $tests['[term:vocabulary:name]'] = String::checkPlain($this->vocabulary->name);
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('term' => $term1), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('term' => $term1), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
     }
 
@@ -111,7 +111,7 @@ function testTaxonomyTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('term' => $term2), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('term' => $term2), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
     }
 
@@ -122,7 +122,7 @@ function testTaxonomyTokenReplacement() {
     $tests['[term:vocabulary:name]'] = $this->vocabulary->name;
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('term' => $term2), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
+      $output = $token_service->replace($input, array('term' => $term2), array('langcode' => $language_interface->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized taxonomy term token %token replaced.', array('%token' => $input)));
     }
 
@@ -138,7 +138,7 @@ function testTaxonomyTokenReplacement() {
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('vocabulary' => $this->vocabulary), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('vocabulary' => $this->vocabulary), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
     }
 
@@ -147,7 +147,7 @@ function testTaxonomyTokenReplacement() {
     $tests['[vocabulary:description]'] = $this->vocabulary->description;
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('vocabulary' => $this->vocabulary), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
+      $output = $token_service->replace($input, array('vocabulary' => $this->vocabulary), array('langcode' => $language_interface->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
     }
   }
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index ba1a436..207e3ba 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -389,22 +389,41 @@ function taxonomy_vocabulary_get_names() {
  * @return
  *   An array of term objects which are the parents of the term $tid, or an
  *   empty array if parents are not found.
- *
- * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal\taxonomy\TermStorageController::loadParents()
  */
 function taxonomy_term_load_parents($tid) {
-  return \Drupal::entityManager()->getStorage('taxonomy_term')->loadParents($tid);
+  $parents = &drupal_static(__FUNCTION__, array());
+
+  if ($tid && !isset($parents[$tid])) {
+    $tids = \Drupal::entityManager()->getStorage('taxonomy_term')->loadParents($tid);
+    $parents[$tid] = entity_load_multiple('taxonomy_term', $tids);
+  }
+
+  return isset($parents[$tid]) ? $parents[$tid] : array();
 }
 
 /**
  * Find all ancestors of a given term ID.
- *
- * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal\taxonomy\TermStorageController::loadAllParents()
  */
 function taxonomy_term_load_parents_all($tid) {
-  return \Drupal::entityManager()->getStorage('taxonomy_term')->loadAllParents($tid);
+  $cache = &drupal_static(__FUNCTION__, array());
+
+  if (isset($cache[$tid])) {
+    return $cache[$tid];
+  }
+
+  $parents = array();
+  if ($term = entity_load('taxonomy_term', $tid)) {
+    $parents[] = $term;
+    $n = 0;
+    while ($parent = taxonomy_term_load_parents($parents[$n]->id())) {
+      $parents = array_merge($parents, $parent);
+      $n++;
+    }
+  }
+
+  $cache[$tid] = $parents;
+
+  return $parents;
 }
 
 /**
@@ -416,12 +435,16 @@ function taxonomy_term_load_parents_all($tid) {
  * @return
  *   An array of term objects that are the children of the term $tid, or an
  *   empty array when no children exist.
- *
- * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal\taxonomy\TermStorageController::loadChildren()
  */
 function taxonomy_term_load_children($tid) {
-  return \Drupal::entityManager()->getStorage('taxonomy_term')->loadChildren($tid);
+  $children = &drupal_static(__FUNCTION__, array());
+
+  if ($tid && !isset($children[$tid])) {
+    $tids = \Drupal::entityManager()->getStorage('taxonomy_term')->loadChildren($tid);
+    $children[$tid] = entity_load_multiple('taxonomy_term', $tids);
+  }
+
+  return isset($children[$tid]) ? $children[$tid] : array();
 }
 
 /**
@@ -445,12 +468,91 @@ function taxonomy_term_load_children($tid) {
  *   to have "depth" and "parents" attributes in addition to its normal ones.
  *   Results are statically cached. Term objects will be partial or complete
  *   depending on the $load_entities parameter.
- *
- * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal\taxonomy\TermStorageController::loadTree()
  */
 function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE) {
-  return \Drupal::entityManager()->getStorage('taxonomy_term')->loadTree($vid, $parent, $max_depth, $load_entities);
+  $children = &drupal_static(__FUNCTION__, array());
+  $parents = &drupal_static(__FUNCTION__ . ':parents', array());
+  $terms = &drupal_static(__FUNCTION__ . ':terms', array());
+
+  // We cache trees, so it's not CPU-intensive to call taxonomy_get_tree() on a
+  // term and its children, too.
+  if (!isset($children[$vid])) {
+    $children[$vid] = array();
+    $parents[$vid] = array();
+    $terms[$vid] = array();
+
+    $result = \Drupal::entityManager()->getStorage('taxonomy_term')->loadTree($vid);
+
+    foreach ($result as $term) {
+      $children[$vid][$term->parent][] = $term->tid;
+      $parents[$vid][$term->tid][] = $term->parent;
+      $terms[$vid][$term->tid] = $term;
+    }
+  }
+
+  // Load full entities, if necessary. The entity storage caches the results.
+  if ($load_entities) {
+    $term_entities = entity_load_multiple('taxonomy_term', array_keys($terms[$vid]));
+  }
+
+  $max_depth = (!isset($max_depth)) ? count($children[$vid]) : $max_depth;
+  $tree = array();
+
+  // Keeps track of the parents we have to process, the last entry is used
+  // for the next processing step.
+  $process_parents = array();
+  $process_parents[] = $parent;
+
+  // Loops over the parent terms and adds its children to the tree array.
+  // Uses a loop instead of a recursion, because it's more efficient.
+  while (count($process_parents)) {
+    $parent = array_pop($process_parents);
+    // The number of parents determines the current depth.
+    $depth = count($process_parents);
+    if ($max_depth > $depth && !empty($children[$vid][$parent])) {
+      $has_children = FALSE;
+      $child = current($children[$vid][$parent]);
+      do {
+        if (empty($child)) {
+          break;
+        }
+        $term = $load_entities ? $term_entities[$child] : $terms[$vid][$child];
+        if (isset($parents[$vid][$load_entities ? $term->id() : $term->tid])) {
+          // Clone the term so that the depth attribute remains correct
+          // in the event of multiple parents.
+          $term = clone $term;
+        }
+        $term->depth = $depth;
+        unset($term->parent);
+        $tid = $load_entities ? $term->id() : $term->tid;
+        $term->parents = $parents[$vid][$tid];
+        $tree[] = $term;
+        if (!empty($children[$vid][$tid])) {
+          $has_children = TRUE;
+
+          // We have to continue with this parent later.
+          $process_parents[] = $parent;
+          // Use the current term as parent for the next iteration.
+          $process_parents[] = $tid;
+
+          // Reset pointers for child lists because we step in there more often
+          // with multi parents.
+          reset($children[$vid][$tid]);
+          // Move pointer so that we get the correct term the next time.
+          next($children[$vid][$parent]);
+          break;
+        }
+      } while ($child = next($children[$vid][$parent]));
+
+      if (!$has_children) {
+        // We processed all terms in this hierarchy-level, reset pointer
+        // so that this function works the next time it gets called.
+        reset($children[$vid][$parent]);
+      }
+    }
+  }
+
+  return $tree;
 }
 
 /**
@@ -684,7 +786,7 @@ function taxonomy_build_node_index($node) {
       $field_name = $field->getName();
       if ($field->getType() == 'taxonomy_term_reference') {
         foreach ($node->getTranslationLanguages() as $language) {
-          foreach ($node->getTranslation($language->id)->$field_name as $item) {
+          foreach ($node->getTranslation($language->getId())->$field_name as $item) {
             if (!$item->isEmpty()) {
               $tid_all[$item->target_id] = $item->target_id;
             }
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index 07deb3c..609cb70 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -340,7 +340,7 @@ function toolbar_toolbar() {
   // toolbar_subtrees route. We provide the JavaScript requesting that JSONP
   // script here with the hash parameter that is needed for that route.
   // @see toolbar_subtrees_jsonp()
-  $langcode = \Drupal::languageManager()->getCurrentLanguage()->id;
+  $langcode = \Drupal::languageManager()->getCurrentLanguage()->getId();
   $subtrees_attached['js'][] = array(
     'type' => 'setting',
     'data' => array('toolbar' => array(
diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc
index 7b71edb..ab5b979 100644
--- a/core/modules/update/update.fetch.inc
+++ b/core/modules/update/update.fetch.inc
@@ -89,7 +89,7 @@ function _update_cron_notify() {
   if (!empty($params)) {
     $notify_list = $update_config->get('notification.emails');
     if (!empty($notify_list)) {
-      $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+      $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
       foreach ($notify_list as $target) {
         if ($target_user = user_load_by_mail($target)) {
           $target_langcode = $target_user->getPreferredLangcode();
diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php
index ba11c0e..a80b591 100644
--- a/core/modules/user/src/AccountForm.php
+++ b/core/modules/user/src/AccountForm.php
@@ -239,9 +239,9 @@ public function form(array $form, FormStateInterface $form_state) {
       );
     }
 
-    $user_preferred_langcode = $register ? $language_interface->id : $account->getPreferredLangcode();
+    $user_preferred_langcode = $register ? $language_interface->getId() : $account->getPreferredLangcode();
 
-    $user_preferred_admin_langcode = $register ? $language_interface->id : $account->getPreferredAdminLangcode(FALSE);
+    $user_preferred_admin_langcode = $register ? $language_interface->getId() : $account->getPreferredAdminLangcode(FALSE);
 
     // Is the user preferred language added?
     $user_language_added = FALSE;
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index ee75930..995e124 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -174,8 +174,8 @@ public function getRoles($exclude_locked_roles = FALSE) {
     $roles = array();
 
     foreach ($this->get('roles') as $role) {
-      if (!($exclude_locked_roles && in_array($role->target_id, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID)))) {
-        $roles[] = $role->target_id;
+      if (!($exclude_locked_roles && in_array($role->value, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID)))) {
+        $roles[] = $role->value;
       }
     }
 
@@ -373,10 +373,10 @@ function getPreferredLangcode($fallback_to_default = TRUE) {
     $language_list = language_list();
     $preferred_langcode = $this->get('preferred_langcode')->value;
     if (!empty($preferred_langcode) && isset($language_list[$preferred_langcode])) {
-      return $language_list[$preferred_langcode]->id;
+      return $language_list[$preferred_langcode]->getId();
     }
     else {
-      return $fallback_to_default ? language_default()->id : '';
+      return $fallback_to_default ? language_default()->getId() : '';
     }
   }
 
@@ -387,10 +387,10 @@ function getPreferredAdminLangcode($fallback_to_default = TRUE) {
     $language_list = language_list();
     $preferred_langcode = $this->get('preferred_admin_langcode')->value;
     if (!empty($preferred_langcode) && isset($language_list[$preferred_langcode])) {
-      return $language_list[$preferred_langcode]->id;
+      return $language_list[$preferred_langcode]->getId();
     }
     else {
-      return $fallback_to_default ? language_default()->id : '';
+      return $fallback_to_default ? language_default()->getId() : '';
     }
   }
 
@@ -531,12 +531,13 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setDescription(t('The email address used for initial account creation.'))
       ->setDefaultValue('');
 
-    $fields['roles'] = BaseFieldDefinition::create('entity_reference')
+    // @todo Convert this to entity_reference_field, see
+    // https://drupal.org/node/2044859.
+    $fields['roles'] = BaseFieldDefinition::create('string')
       ->setCustomStorage(TRUE)
       ->setLabel(t('Roles'))
       ->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)
-      ->setDescription(t('The roles the user has.'))
-      ->setSetting('target_type', 'user_role');
+      ->setDescription(t('The roles the user has.'));
 
     return $fields;
   }
diff --git a/core/modules/user/src/Form/UserPasswordForm.php b/core/modules/user/src/Form/UserPasswordForm.php
index 378f8f3..f06ba29 100644
--- a/core/modules/user/src/Form/UserPasswordForm.php
+++ b/core/modules/user/src/Form/UserPasswordForm.php
@@ -129,7 +129,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $langcode = $this->languageManager->getCurrentLanguage()->id;
+    $langcode = $this->languageManager->getCurrentLanguage()->getId();
 
     $account = $form_state->getValue('account');
     // Mail one time login URL and instructions using current language.
diff --git a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php
index f2c99fe..623dac6 100644
--- a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php
+++ b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php
@@ -36,7 +36,7 @@ public function getLangcode(Request $request = NULL) {
     // User preference (only for authenticated users).
     if ($this->languageManager && $this->currentUser->isAuthenticated()) {
       $preferred_langcode = $this->currentUser->getPreferredLangcode();
-      $default_langcode = $this->languageManager->getDefaultLanguage()->id;
+      $default_langcode = $this->languageManager->getDefaultLanguage()->getId();
       $languages = $this->languageManager->getLanguages();
       if (!empty($preferred_langcode) && $preferred_langcode != $default_langcode && isset($languages[$preferred_langcode])) {
         $langcode = $preferred_langcode;
diff --git a/core/modules/user/src/Tests/UserInstallTest.php b/core/modules/user/src/Tests/UserInstallTest.php
index 6b5ddd4..33a3238 100644
--- a/core/modules/user/src/Tests/UserInstallTest.php
+++ b/core/modules/user/src/Tests/UserInstallTest.php
@@ -47,8 +47,8 @@ public function testUserInstall() {
 
     // Test that the anonymous and administrators languages are equal to the
     // site's default language.
-    $this->assertEqual($anon->langcode, \Drupal::languageManager()->getDefaultLanguage()->id);
-    $this->assertEqual($admin->langcode, \Drupal::languageManager()->getDefaultLanguage()->id);
+    $this->assertEqual($anon->langcode, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Anon user language is the default.');
+    $this->assertEqual($admin->langcode, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Admin user language is the default.');
 
     // Test that the administrator is active.
     $this->assertEqual($admin->status, 1);
diff --git a/core/modules/user/src/Tests/UserLanguageCreationTest.php b/core/modules/user/src/Tests/UserLanguageCreationTest.php
index 65e37f9..fc95906 100644
--- a/core/modules/user/src/Tests/UserLanguageCreationTest.php
+++ b/core/modules/user/src/Tests/UserLanguageCreationTest.php
@@ -63,7 +63,7 @@ function testLocalUserCreation() {
 
     $user = user_load_by_name($username);
     $this->assertEqual($user->getPreferredLangcode(), $langcode, 'New user has correct preferred language set.');
-    $this->assertEqual($user->language()->id, $langcode, 'New user has correct profile language set.');
+    $this->assertEqual($user->language()->getId(), $langcode, 'New user has correct profile language set.');
 
     // Register a new user and check if the language selector is hidden.
     $this->drupalLogout();
@@ -81,7 +81,7 @@ function testLocalUserCreation() {
 
     $user = user_load_by_name($username);
     $this->assertEqual($user->getPreferredLangcode(), $langcode, 'New user has correct preferred language set.');
-    $this->assertEqual($user->language()->id, $langcode, 'New user has correct profile language set.');
+    $this->assertEqual($user->language()->getId(), $langcode, 'New user has correct profile language set.');
 
     // Test if the admin can use the language selector and if the
     // correct language is was saved.
diff --git a/core/modules/user/src/Tests/UserRegistrationTest.php b/core/modules/user/src/Tests/UserRegistrationTest.php
index cc025c8..aa5a189 100644
--- a/core/modules/user/src/Tests/UserRegistrationTest.php
+++ b/core/modules/user/src/Tests/UserRegistrationTest.php
@@ -182,8 +182,8 @@ function testRegistrationDefaultValues() {
     $this->assertTrue(($new_user->getCreatedTime() > REQUEST_TIME - 20 ), 'Correct creation time.');
     $this->assertEqual($new_user->isActive(), $config_user_settings->get('register') == USER_REGISTER_VISITORS ? 1 : 0, 'Correct status field.');
     $this->assertEqual($new_user->getTimezone(), $config_system_date->get('timezone.default'), 'Correct time zone field.');
-    $this->assertEqual($new_user->langcode->value, \Drupal::languageManager()->getDefaultLanguage()->id, 'Correct language field.');
-    $this->assertEqual($new_user->preferred_langcode->value, \Drupal::languageManager()->getDefaultLanguage()->id, 'Correct preferred language field.');
+    $this->assertEqual($new_user->langcode->value, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Correct language field.');
+    $this->assertEqual($new_user->preferred_langcode->value, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Correct preferred language field.');
     $this->assertEqual($new_user->init->value, $mail, 'Correct init field.');
   }
 
diff --git a/core/modules/user/src/Tests/UserRoleAdminTest.php b/core/modules/user/src/Tests/UserRoleAdminTest.php
index e8e8815..391422a 100644
--- a/core/modules/user/src/Tests/UserRoleAdminTest.php
+++ b/core/modules/user/src/Tests/UserRoleAdminTest.php
@@ -26,7 +26,7 @@ protected function setUp() {
    */
   function testRoleAdministration() {
     $this->drupalLogin($this->admin_user);
-    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+    $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     // Test presence of tab.
     $this->drupalGet('admin/people/permissions');
     $tabs = $this->xpath('//ul[@class=:classes and //a[contains(., :text)]]', array(
diff --git a/core/modules/user/src/Tests/UserTokenReplaceTest.php b/core/modules/user/src/Tests/UserTokenReplaceTest.php
index 315c4ae..c6b4ed5 100644
--- a/core/modules/user/src/Tests/UserTokenReplaceTest.php
+++ b/core/modules/user/src/Tests/UserTokenReplaceTest.php
@@ -59,17 +59,17 @@ function testUserTokenReplacement() {
     $tests['[user:mail]'] = String::checkPlain($account->getEmail());
     $tests['[user:url]'] = url("user/" . $account->id(), $url_options);
     $tests['[user:edit-url]'] = url("user/" . $account->id() . "/edit", $url_options);
-    $tests['[user:last-login]'] = format_date($account->getLastLoginTime(), 'medium', '', NULL, $language_interface->id);
-    $tests['[user:last-login:short]'] = format_date($account->getLastLoginTime(), 'short', '', NULL, $language_interface->id);
-    $tests['[user:created]'] = format_date($account->getCreatedTime(), 'medium', '', NULL, $language_interface->id);
-    $tests['[user:created:short]'] = format_date($account->getCreatedTime(), 'short', '', NULL, $language_interface->id);
+    $tests['[user:last-login]'] = format_date($account->getLastLoginTime(), 'medium', '', NULL, $language_interface->getId());
+    $tests['[user:last-login:short]'] = format_date($account->getLastLoginTime(), 'short', '', NULL, $language_interface->getId());
+    $tests['[user:created]'] = format_date($account->getCreatedTime(), 'medium', '', NULL, $language_interface->getId());
+    $tests['[user:created:short]'] = format_date($account->getCreatedTime(), 'short', '', NULL, $language_interface->getId());
     $tests['[current-user:name]'] = String::checkPlain(user_format_name($global_account));
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->id));
+      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->getId()));
       $this->assertEqual($output, $expected, format_string('Sanitized user token %token replaced.', array('%token' => $input)));
     }
 
@@ -79,7 +79,7 @@ function testUserTokenReplacement() {
     $tests['[current-user:name]'] = user_format_name($global_account);
 
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
+      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->getId(), 'sanitize' => FALSE));
       $this->assertEqual($output, $expected, format_string('Unsanitized user token %token replaced.', array('%token' => $input)));
     }
 
@@ -91,7 +91,7 @@ function testUserTokenReplacement() {
     // Generate tokens with interface language.
     $link = url('user', array('absolute' => TRUE));
     foreach ($tests as $input => $expected) {
-      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->id, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE));
+      $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->getId(), 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE));
       $this->assertTrue(strpos($output, $link) === 0, 'Generated URL is in interface language.');
     }
 
diff --git a/core/modules/user/src/Tests/UserValidationTest.php b/core/modules/user/src/Tests/UserValidationTest.php
index 81a9e48..958ef59 100644
--- a/core/modules/user/src/Tests/UserValidationTest.php
+++ b/core/modules/user/src/Tests/UserValidationTest.php
@@ -11,8 +11,6 @@
 use Drupal\Core\Field\Plugin\Field\FieldType\EmailItem;
 use Drupal\Core\Render\Element\Email;
 use Drupal\simpletest\DrupalUnitTestBase;
-use Drupal\user\Entity\Role;
-use Drupal\user\Entity\User;
 
 /**
  * Verify that user validity checks behave as designed.
@@ -35,10 +33,6 @@ protected function setUp() {
     parent::setUp();
     $this->installEntitySchema('user');
     $this->installSchema('system', array('sequences'));
-
-    // Make sure that the default roles exist.
-    $this->installConfig(array('user'));
-
   }
 
   /**
@@ -74,7 +68,7 @@ function testUsernames() {
    * Runs entity validation checks.
    */
   function testValidation() {
-    $user = User::create(array('name' => 'test'));
+    $user = entity_create('user', array('name' => 'test'));
     $violations = $user->validate();
     $this->assertEqual(count($violations), 0, 'No violations when validating a default user.');
 
@@ -143,9 +137,6 @@ function testValidation() {
     $this->assertEqual($violations[0]->getPropertyPath(), 'init.0.value');
     $this->assertEqual($violations[0]->getMessage(), t('This value is not a valid email address.'));
 
-    Role::create(array('id' => 'role1'))->save();
-    Role::create(array('id' => 'role2'))->save();
-
     // Test cardinality of user roles.
     $user = entity_create('user', array(
       'name' => 'role_test',
@@ -153,12 +144,8 @@ function testValidation() {
     ));
     $violations = $user->validate();
     $this->assertEqual(count($violations), 0);
-
-    $user->roles[1]->target_id = 'unknown_role';
-    $violations = $user->validate();
-    $this->assertEqual(count($violations), 1);
-    $this->assertEqual($violations[0]->getPropertyPath(), 'roles.1');
-    $this->assertEqual($violations[0]->getMessage(), t('The referenced entity (%entity_type: %name) does not exist.', array('%entity_type' => 'user_role', '%name' => 'unknown_role')));
+    // @todo Test user role validation once https://drupal.org/node/2044859 got
+    // committed.
   }
 
   /**
diff --git a/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php b/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
index af528c7..45b490e 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
@@ -31,7 +31,7 @@ protected function createUserSession(array $rids = array()) {
     $roles = array();
     foreach ($rids as $rid) {
       $roles[] = (object) array(
-        'target_id' => $rid,
+        'value' => $rid,
       );
     }
     $user->expects($this->any())
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index eca1692..134c251 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -67,7 +67,7 @@ function user_install() {
   $storage = \Drupal::entityManager()->getStorage('user');
   // @todo Rely on the default value for langcode in
   //   https://drupal.org/node/1966436
-  $langcode = \Drupal::languageManager()->getDefaultLanguage()->id;
+  $langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
   // Insert a row for the anonymous user.
   $storage
     ->create(array(
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 9e52c20..faea133 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -1301,7 +1301,7 @@ function _user_mail_notify($op, $account, $langcode = NULL) {
     if ($op == 'register_pending_approval') {
       // If a user registered requiring admin approval, notify the admin, too.
       // We use the site default language for this.
-      drupal_mail('user', 'register_pending_approval_admin', $site_mail, \Drupal::languageManager()->getDefaultLanguage()->id, $params);
+      drupal_mail('user', 'register_pending_approval_admin', $site_mail, \Drupal::languageManager()->getDefaultLanguage()->getId(), $params);
     }
   }
   return empty($mail) ? NULL : $mail['result'];
diff --git a/core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php b/core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php
index 18875f5..2e99c12 100644
--- a/core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php
+++ b/core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php
@@ -24,7 +24,7 @@ class DefaultLanguageRenderer extends RendererBase {
    *   A language code.
    */
   protected function getLangcode(ResultRow $row) {
-    return $row->_entity->getUntranslated()->language()->id;
+    return $row->_entity->getUntranslated()->language()->getId();
   }
 
 }
diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
index a92027d..753fbda 100644
--- a/core/modules/views/src/Plugin/views/PluginBase.php
+++ b/core/modules/views/src/Plugin/views/PluginBase.php
@@ -447,14 +447,14 @@ public static function queryLanguageSubstitutions() {
     $manager = \Drupal::languageManager();
 
     // Handle default language.
-    $default = $manager->getDefaultLanguage()->id;
+    $default = $manager->getDefaultLanguage()->getId();
     $changes['***LANGUAGE_site_default***'] = $default;
 
     // Handle negotiated languages.
     $types = $manager->getDefinedLanguageTypesInfo();
     foreach ($types as $id => $type) {
       if (isset($type['name'])) {
-        $changes['***LANGUAGE_' . $id . '***'] = $manager->getCurrentLanguage($id)->id;
+        $changes['***LANGUAGE_' . $id . '***'] = $manager->getCurrentLanguage($id)->getId();
       }
     }
 
diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
index d747283..c406191 100644
--- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
@@ -306,7 +306,7 @@ public function generateResultsKey() {
         'build_info' => $build_info,
         'roles' => $user->getRoles(),
         'super-user' => $user->id() == 1, // special caching for super user.
-        'langcode' => \Drupal::languageManager()->getCurrentLanguage()->id,
+        'langcode' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
         'base_url' => $GLOBALS['base_url'],
       );
       foreach (array('exposed_info', 'page', 'sort', 'order', 'items_per_page', 'offset') as $key) {
@@ -335,7 +335,7 @@ public function generateOutputKey() {
         'roles' => $user->getRoles(),
         'super-user' => $user->id() == 1, // special caching for super user.
         'theme' => \Drupal::theme()->getActiveTheme()->getName(),
-        'langcode' => \Drupal::languageManager()->getCurrentLanguage()->id,
+        'langcode' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
         'base_url' => $GLOBALS['base_url'],
       );
 
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 22e8d16..157aecb 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -171,7 +171,7 @@ public function initDisplay(ViewExecutable $view, array &$display, array &$optio
     $skip_cache = \Drupal::config('views.settings')->get('skip_cache');
 
     if (empty($view->editing) || !$skip_cache) {
-      $cid = 'views:unpack_options:' . hash('sha256', serialize(array($this->options, $options))) . ':' . \Drupal::languageManager()->getCurrentLanguage()->id;
+      $cid = 'views:unpack_options:' . hash('sha256', serialize(array($this->options, $options))) . ':' . \Drupal::languageManager()->getCurrentLanguage()->getId();
       if (empty(static::$unpackOptions[$cid])) {
         $cache = \Drupal::cache('data')->get($cid);
         if (!empty($cache->data)) {
diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
index a989be7..f64ebdd 100644
--- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
@@ -690,7 +690,7 @@ protected function instantiateView($form, FormStateInterface $form_state) {
       'label' => $form_state->getValue('label'),
       'description' => $form_state->getValue('description'),
       'base_table' => $this->base_table,
-      'langcode' => language_default()->id,
+      'langcode' => language_default()->getId(),
     );
 
     $view = entity_create('view', $values);
diff --git a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
index f53b53e..e820532 100644
--- a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
@@ -55,7 +55,7 @@ protected function setUp() {
     // The entity.node.canonical route must exist when nodes are rendered.
     $this->container->get('router.builder')->rebuild();
 
-    $this->langcodes = array(\Drupal::languageManager()->getDefaultLanguage()->id);
+    $this->langcodes = array(\Drupal::languageManager()->getDefaultLanguage()->getId());
     for ($i = 0; $i < 2; $i++) {
       $langcode = 'l' . $i;
       $this->langcodes[] = $langcode;
diff --git a/core/modules/views/src/ViewsData.php b/core/modules/views/src/ViewsData.php
index bd65aa8..82b3c1b 100644
--- a/core/modules/views/src/ViewsData.php
+++ b/core/modules/views/src/ViewsData.php
@@ -108,7 +108,7 @@ public function __construct(CacheBackendInterface $cache_backend, ConfigFactoryI
     $this->moduleHandler = $module_handler;
     $this->languageManager = $language_manager;
 
-    $this->langcode = $this->languageManager->getCurrentLanguage()->id;
+    $this->langcode = $this->languageManager->getCurrentLanguage()->getId();
     $this->skipCache = $config->get('views.settings')->get('skip_cache');
   }
 
diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php
index 5534df6..d7bc7b5 100644
--- a/core/modules/views/views.api.php
+++ b/core/modules/views/views.api.php
@@ -578,8 +578,8 @@ function hook_views_query_substitutions(ViewExecutable $view) {
   return array(
     '***CURRENT_VERSION***' => \Drupal::VERSION,
     '***CURRENT_TIME***' => REQUEST_TIME,
-    '***LANGUAGE_language_content***' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id,
-    '***LANGUAGE_site_default***' => \Drupal::languageManager()->getDefaultLanguage()->id,
+    '***LANGUAGE_language_content***' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId(),
+    '***LANGUAGE_site_default***' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
   );
 }
 
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 81df6a1..cdcee4b 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -904,7 +904,7 @@ function template_preprocess_views_view_rss(&$variables) {
     $variables['link'] = check_url(url($path, $url_options));
   }
 
-  $variables['langcode'] = String::checkPlain(\Drupal::languageManager()->getCurrentLanguage()->id);
+  $variables['langcode'] = String::checkPlain(\Drupal::languageManager()->getCurrentLanguage()->getId());
   $variables['namespaces'] = new Attribute($style->namespaces);
   $variables['items'] = $items;
   $variables['channel_elements'] = format_xml_elements($style->channel_elements);
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
old mode 100755
new mode 100644
diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
index 60d5838..803fb01 100644
--- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
@@ -274,11 +274,11 @@ public function testIsTranslatable() {
     $this->languageManager->expects($this->any())
       ->method('isMultilingual')
       ->will($this->returnValue(TRUE));
-    $this->assertTrue($this->entity->language()->id == 'en');
+    $this->assertTrue($this->entity->language()->getId() == 'en');
     $this->assertFalse($this->entity->language()->locked);
     $this->assertTrue($this->entity->isTranslatable());
 
-    $this->assertTrue($this->entityUnd->language()->id == LanguageInterface::LANGCODE_NOT_SPECIFIED);
+    $this->assertTrue($this->entityUnd->language()->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED);
     $this->assertTrue($this->entityUnd->language()->locked);
     $this->assertFalse($this->entityUnd->isTranslatable());
   }
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index a0125c1..53d2075 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -114,11 +114,15 @@ protected function setUp() {
 
     $this->cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface');
 
+    $language = $this->getMock('Drupal\Core\Language\LanguageInterface');
+    $language->expects($this->any())
+      ->method('getId')
+      ->will($this->returnValue('en'));
     $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface');
 
     $this->languageManager->expects($this->any())
       ->method('getCurrentLanguage')
-      ->will($this->returnValue((object) array('id' => 'en')));
+      ->will($this->returnValue($language));
     $this->languageManager->expects($this->any())
       ->method('getLanguages')
       ->will($this->returnValue(array('en' => (object) array('id' => 'en'))));
@@ -946,9 +950,13 @@ public function testGetTranslationFromContext() {
     $entity->expects($this->exactly(2))
       ->method('getUntranslated')
       ->will($this->returnValue($entity));
+    $language = $this->getMock('\Drupal\Core\Language\LanguageInterface');
+    $language->expects($this->any())
+      ->method('getId')
+      ->will($this->returnValue('en'));
     $entity->expects($this->exactly(2))
       ->method('language')
-      ->will($this->returnValue((object) array('id' => 'en')));
+      ->will($this->returnValue($language));
     $entity->expects($this->exactly(2))
       ->method('hasTranslation')
       ->will($this->returnValueMap(array(
@@ -992,8 +1000,7 @@ function testgetExtraFields() {
     );
     $cache_id = 'entity_bundle_extra_fields:' . $entity_type_id . ':' . $bundle . ':' . $language_code;
 
-    $language = new Language();
-    $language->id = $language_code;
+    $language = new Language(array('id' => $language_code));
 
     $this->languageManager->expects($this->once())
       ->method('getCurrentLanguage')
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index 4913446..8ca20af 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -230,7 +230,7 @@ public function testAccess() {
    * @covers ::language
    */
   public function testLanguage() {
-    $this->assertSame('en', $this->entity->language()->id);
+    $this->assertSame('en', $this->entity->language()->getId());
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
index 3736f0b..03878cb 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -70,8 +70,10 @@ public function testGetInfo() {
       ),
     );
 
-    $language = $this->getMock('\Drupal\Core\Language\Language');
-    $language->id = $this->randomMachineName();
+    $values = array('id' => $this->randomMachineName());
+    $language = $this->getMockBuilder('\Drupal\Core\Language\Language')
+      ->setConstructorArgs(array($values))
+      ->getMock();
 
     $this->languageManager->expects($this->once())
       ->method('getCurrentLanguage')
@@ -84,7 +86,7 @@ public function testGetInfo() {
       ->method('get');
     $this->cache->expects($this->once())
       ->method('set')
-      ->with('token_info:' . $language->id, $token_info);
+      ->with('token_info:' . $language->getId(), $token_info);
 
     $this->moduleHandler->expects($this->once())
       ->method('invokeAll')
