diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
index 75506d9..ad4b57f 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
@@ -182,7 +182,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($this->langcodeKey => $this->languageManager->getDefaultLanguage()->id);
     $entity = new $this->entityClass($values, $this->entityTypeId);
 
     return $entity;
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
index 2b5dfd5..973f820 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
@@ -67,6 +67,7 @@ public function __construct($definition) {
     parent::__construct($definition);
     // Always add a default 'uuid' key.
     $this->entity_keys['uuid'] = 'uuid';
+    $this->entity_keys['langcode'] = 'langcode';
     $this->controllers += array(
       'storage' => 'Drupal\Core\Config\Entity\ConfigEntityStorage',
     );
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index fa2c472..4b232c0 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -75,6 +75,13 @@
   protected $languages;
 
   /**
+   * The language entity key.
+   *
+   * @var string
+   */
+  protected $langcodeKey;
+
+  /**
    * Language code identifying the entity active language.
    *
    * This is the language field accessors will use to determine which field
@@ -144,6 +151,7 @@ public function __construct(array $values, $entity_type, $bundle = FALSE, $trans
     $this->entityTypeId = $entity_type;
     $this->entityKeys['bundle'] = $bundle ? $bundle : $this->entityTypeId;
     $this->languages = $this->languageManager()->getLanguages(LanguageInterface::STATE_ALL);
+    $this->langcodeKey = $this->getEntityType()->getKey('langcode');
 
     foreach ($values as $key => $value) {
       // If the key matches an existing property set the value to the property
@@ -471,8 +479,8 @@ protected function getTranslatedField($name, $langcode) {
    * {@inheritdoc}
    */
   public function set($name, $value, $notify = TRUE) {
-    // If default language or an entity key changes we need to react to that.
-    $notify = $name == 'langcode' || in_array($name, $this->getEntityType()->getKeys());
+    // If an entity key changes we need to react to that.
+    $notify = in_array($name, $this->getEntityType()->getKeys());
     $this->get($name)->setValue($value, $notify);
   }
 
@@ -585,7 +593,12 @@ 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)) {
+    // Try to read the value directly from the list of entity keys which got
+    // initialized in __construct(). This avoids creating a field item object.
+    if (isset($this->entityKeys['langcode'])) {
+      $this->defaultLangcode = $this->entityKeys['langcode'];
+    }
+    elseif ($this->hasField($this->langcodeKey) && ($item = $this->get($this->langcodeKey)) && isset($item->language)) {
       $this->defaultLangcode = $item->language->id;
     }
     if (empty($this->defaultLangcode)) {
@@ -594,7 +607,7 @@ protected function setDefaultLangcode() {
     }
     // This needs to be initialized manually as it is skipped when instantiating
     // the language field object to avoid infinite recursion.
-    if (!empty($this->fields['langcode'])) {
+    if (!empty($this->fields[$this->langcodeKey])) {
       $this->fields['langcode'][LanguageInterface::LANGCODE_DEFAULT]->setLangcode($this->defaultLangcode);
     }
   }
@@ -614,7 +627,7 @@ protected function updateFieldLangcodes($langcode) {
    * {@inheritdoc}
    */
   public function onChange($name) {
-    if ($name == 'langcode') {
+    if ($name == $this->langcodeKey) {
       $this->setDefaultLangcode();
       if (isset($this->translations[$this->defaultLangcode])) {
         $message = String::format('A translation already exists for the specified language (@langcode).', array('@langcode' => $this->defaultLangcode));
@@ -749,7 +762,11 @@ public function addTranslation($langcode, array $values = array()) {
     // Instantiate a new empty entity so default values will be populated in the
     // specified language.
     $entity_type = $this->getEntityType();
-    $default_values = array($entity_type->getKey('bundle') => $this->bundle(), 'langcode' => $langcode);
+
+    $default_values = array(
+      $entity_type->getKey('bundle') => $this->bundle(),
+      $this->langcodeKey => $langcode,
+    );
     $entity = $this->entityManager()
       ->getStorage($this->getEntityTypeId())
       ->create($default_values);
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
index cded360..6ee8e45 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
@@ -85,6 +85,15 @@ class ContentEntityDatabaseStorage extends ContentEntityStorageBase implements S
   protected $dataTable;
 
   /**
+   * Name of entity's default language database table field.
+   *
+   * Is only set if the entity has multilingual support.
+   *
+   * @var string
+   */
+  protected $defaultLangcodeKey;
+
+  /**
    * The table that stores revision field data if the entity supports revisions.
    *
    * @var string
@@ -309,7 +318,7 @@ public function getTableMapping() {
           // Add the denormalized 'default_langcode' field to the mapping. Its
           // value is identical to the query expression
           // "base_table.langcode = data_table.langcode"
-          ->setExtraColumns($this->dataTable, array('default_langcode'));
+          ->setExtraColumns($this->dataTable, array($this->defaultLangcodeKey));
       }
       elseif ($revisionable && $translatable) {
         // The revisionable multilingual layout stores key field values in the
@@ -331,7 +340,7 @@ public function getTableMapping() {
           // value is identical to the query expression
           // "base_langcode = data_table.langcode" where "base_langcode" is
           // the language code of the default revision.
-          ->setExtraColumns($this->dataTable, array('default_langcode'));
+          ->setExtraColumns($this->dataTable, array($this->defaultLangcodeKey));
 
         $revision_base_fields = array_merge(array($this->idKey, $this->revisionKey, $this->langcodeKey), $revision_metadata_fields);
         $this->tableMapping->setFieldNames($this->revisionTable, $revision_base_fields);
@@ -343,7 +352,7 @@ public function getTableMapping() {
           // Add the denormalized 'default_langcode' field to the mapping. Its
           // value is identical to the query expression
           // "revision_table.langcode = data_table.langcode".
-          ->setExtraColumns($this->revisionDataTable, array('default_langcode'));
+          ->setExtraColumns($this->revisionDataTable, array($this->defaultLangcodeKey));
       }
     }
 
@@ -605,7 +614,7 @@ protected function attachPropertyData(array &$entities) {
 
         // Field values in default language are stored with
         // LanguageInterface::LANGCODE_DEFAULT as key.
-        $langcode = empty($values['default_langcode']) ? $values['langcode'] : LanguageInterface::LANGCODE_DEFAULT;
+        $langcode = empty($values[$this->defaultLangcodeKey]) ? $values[$this->langcodeKey] : LanguageInterface::LANGCODE_DEFAULT;
         $translations[$id][$langcode] = TRUE;
 
 
@@ -675,13 +684,13 @@ protected function buildPropertyQuery(QueryInterface $entity_query, array $value
       //   apply to the default language. See http://drupal.org/node/1866330.
       // Default to the original entity language if not explicitly specified
       // otherwise.
-      if (!array_key_exists('default_langcode', $values)) {
-        $values['default_langcode'] = 1;
+      if (!array_key_exists($this->defaultLangcodeKey, $values)) {
+        $values[$this->defaultLangcodeKey] = 1;
       }
       // If the 'default_langcode' flag is explicitly not set, we do not care
       // whether the queried values are in the original entity language or not.
-      elseif ($values['default_langcode'] === NULL) {
-        unset($values['default_langcode']);
+      elseif ($values[$this->defaultLangcodeKey] === NULL) {
+        unset($values[$this->defaultLangcodeKey]);
       }
     }
 
diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index cf18d55..a4d97f4 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -292,7 +292,8 @@ public function access($operation, AccountInterface $account = NULL) {
    * {@inheritdoc}
    */
   public function language() {
-    $language = $this->languageManager()->getLanguage($this->langcode);
+    $langcode = $this->{$this->getEntityType()->getKey('langcode')};
+    $language = $this->languageManager()->getLanguage($langcode);
     if (!$language) {
       // Make sure we return a proper language object.
       $langcode = $this->langcode ?: LanguageInterface::LANGCODE_NOT_SPECIFIED;
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 3fc38fd..75e8ada 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -409,7 +409,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
 
     // Ensure defined entity keys are there and have proper revisionable and
     // translatable values.
-    $keys = array_filter($entity_type->getKeys() + array('langcode' => 'langcode'));
+    $keys = array_filter($entity_type->getKeys());
     foreach ($keys as $key => $field_name) {
       if (isset($base_field_definitions[$field_name]) && in_array($key, array('id', 'revision', 'uuid', 'bundle')) && $base_field_definitions[$field_name]->isRevisionable()) {
         throw new \LogicException(String::format('The @field field cannot be revisionable as it is used as @key entity key.', array('@field' => $base_field_definitions[$field_name]->getLabel(), '@key' => $key)));
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index 3dc3bb6..87b8a53 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -53,6 +53,13 @@
   protected $uuidKey;
 
   /**
+   * The name of the entity langcode property.
+   *
+   * @var string
+   */
+  protected $langcodeKey;
+
+  /**
    * The UUID service.
    *
    * @var \Drupal\Component\Uuid\UuidInterface
@@ -77,6 +84,7 @@ public function __construct(EntityTypeInterface $entity_type) {
     $this->entityType = $entity_type;
     $this->idKey = $this->entityType->getKey('id');
     $this->uuidKey = $this->entityType->getKey('uuid');
+    $this->langcodeKey = $this->entityType->getKey('langcode');
     $this->entityClass = $this->entityType->getClass();
   }
 
diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php
index 5ebb0b6..cd08814 100644
--- a/core/lib/Drupal/Core/Entity/EntityType.php
+++ b/core/lib/Drupal/Core/Entity/EntityType.php
@@ -221,7 +221,8 @@ public function __construct($definition) {
     // Ensure defaults.
     $this->entity_keys += array(
       'revision' => '',
-      'bundle' => ''
+      'bundle' => '',
+      'langcode' => '',
     );
     $this->controllers += array(
       'access' => 'Drupal\Core\Entity\EntityAccessController',
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
index d92e00b..1d5e141 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
@@ -83,24 +83,27 @@ public function getClass();
    *   - id: The name of the property that contains the primary ID of the
    *     entity. Every entity object passed to the Field API must have this
    *     property and its value must be numeric.
+   *   - uuid: (optional) The name of the property that contains the universally
+   *     unique identifier of the entity, which is used to distinctly identify
+   *     an entity across different systems.
    *   - revision: (optional) The name of the property that contains the
    *     revision ID of the entity. The Field API assumes that all revision IDs
    *     are unique across all entities of a type. If this entry is omitted
    *     the entities of this type are not revisionable.
+   *   - langcode: (optional) The name of the property that contains the
+   *     language code. For instance, if the entity's language is located in
+   *     $entity->language, then 'language' should be specified here.
    *   - bundle: (optional) The name of the property that contains the bundle
    *     name for the entity. The bundle name defines which set of fields are
    *     attached to the entity (e.g. what nodes call "content type"). This
    *     entry can be omitted if this entity type exposes a single bundle (such
    *     that all entities have the same collection of fields). The name of this
    *     single bundle will be the same as the entity type.
-   *   - label: The name of the property that contains the entity label. For
-   *     example, if the entity's label is located in $entity->subject, then
-   *     'subject' should be specified here. If complex logic is required to
-   *     build the label, a 'label_callback' should be defined instead (see the
-   *     $label_callback block above for details).
-   *   - uuid (optional): The name of the property that contains the universally
-   *     unique identifier of the entity, which is used to distinctly identify
-   *     an entity across different systems.
+   *   - label: (optional) The name of the property that contains the entity
+   *     label. For example, if the entity's label is located in
+   *     $entity->subject, then 'subject' should be specified here. If complex
+   *     logic is required to build the label, a 'label_callback' should be
+   *     defined instead (see the $label_callback block above for details).
    */
   public function getKeys();
 
diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php
index 7aff3d0..2c41afa 100644
--- a/core/modules/aggregator/src/Entity/Feed.php
+++ b/core/modules/aggregator/src/Entity/Feed.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Entity\ContentEntityBase;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Field\FieldDefinition;
+use Drupal\Core\Language\Language;
 use Symfony\Component\DependencyInjection\Container;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\aggregator\FeedInterface;
@@ -40,8 +41,9 @@
  *   render_cache = FALSE,
  *   entity_keys = {
  *     "id" = "fid",
- *     "label" = "title",
  *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
+ *     "label" = "title",
  *   }
  * )
  */
diff --git a/core/modules/aggregator/src/Entity/Item.php b/core/modules/aggregator/src/Entity/Item.php
index f513501..b1a1da8 100644
--- a/core/modules/aggregator/src/Entity/Item.php
+++ b/core/modules/aggregator/src/Entity/Item.php
@@ -32,6 +32,7 @@
  *   render_cache = FALSE,
  *   entity_keys = {
  *     "id" = "iid",
+ *     "langcode" = "langcode",
  *     "label" = "title",
  *   }
  * )
diff --git a/core/modules/block_content/src/Entity/BlockContent.php b/core/modules/block_content/src/Entity/BlockContent.php
index 630fe51..161e368 100644
--- a/core/modules/block_content/src/Entity/BlockContent.php
+++ b/core/modules/block_content/src/Entity/BlockContent.php
@@ -46,10 +46,11 @@
  *   translatable = TRUE,
  *   entity_keys = {
  *     "id" = "id",
+ *     "uuid" = "uuid",
  *     "revision" = "revision_id",
+ *     "langcode" = "langcode",
  *     "bundle" = "type",
  *     "label" = "info",
- *     "uuid" = "uuid"
  *   },
  *   bundle_entity_type = "block_content_type"
  * )
diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php
index e4964bc..592edb3 100644
--- a/core/modules/comment/src/Entity/Comment.php
+++ b/core/modules/comment/src/Entity/Comment.php
@@ -41,8 +41,9 @@
  *   entity_keys = {
  *     "id" = "cid",
  *     "bundle" = "comment_type",
+ *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *     "label" = "subject",
- *     "uuid" = "uuid"
  *   },
  *   links = {
  *     "canonical" = "comment.permalink",
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 4fbd597..02cdfd5 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -250,8 +250,18 @@ function _content_translation_menu_strip_loaders($path) {
  */
 function content_translation_translate_access(EntityInterface $entity) {
   $account = \Drupal::currentUser();
-  return $entity instanceof ContentEntityInterface && empty($entity->getUntranslated()->language()->locked) && \Drupal::languageManager()->isMultilingual() && $entity->isTranslatable() &&
-    ($account->hasPermission('create content translations') || $account->hasPermission('update content translations') || $account->hasPermission('delete content translations'));
+
+  $access = $entity instanceof ContentEntityInterface;
+  $access = $access && empty($entity->getUntranslated()->language()->locked);
+  $access = $access && \Drupal::languageManager()->isMultilingual();
+  $access = $access && $entity->isTranslatable();
+  $access = $access && (
+    $account->hasPermission('create content translations') ||
+    $account->hasPermission('update content translations') ||
+    $account->hasPermission('delete content translations')
+  );
+
+  return $access;
 }
 
 /**
diff --git a/core/modules/file/src/Entity/File.php b/core/modules/file/src/Entity/File.php
index 59a5421..fb7fb3c 100644
--- a/core/modules/file/src/Entity/File.php
+++ b/core/modules/file/src/Entity/File.php
@@ -29,25 +29,15 @@
  *   base_table = "file_managed",
  *   entity_keys = {
  *     "id" = "fid",
+ *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *     "label" = "filename",
- *     "uuid" = "uuid"
  *   }
  * )
  */
 class File extends ContentEntityBase implements FileInterface {
 
   /**
-   * The plain data values of the contained properties.
-   *
-   * Define default values.
-   *
-   * @var array
-   */
-  protected $values = array(
-    'langcode' => array(LanguageInterface::LANGCODE_DEFAULT => array(0 => array('value' => LanguageInterface::LANGCODE_NOT_SPECIFIED))),
-  );
-
-  /**
    * {@inheritdoc}
    */
   public function getFilename() {
diff --git a/core/modules/menu_link/src/Entity/MenuLink.php b/core/modules/menu_link/src/Entity/MenuLink.php
index e2215fd..9a36f07 100644
--- a/core/modules/menu_link/src/Entity/MenuLink.php
+++ b/core/modules/menu_link/src/Entity/MenuLink.php
@@ -38,7 +38,8 @@
  *     "id" = "mlid",
  *     "label" = "link_title",
  *     "uuid" = "uuid",
- *     "bundle" = "bundle"
+ *     "bundle" = "bundle",
+ *     "langcode" = "langcode",
  *   },
  * )
  */
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index 19f311e..c224951 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -43,10 +43,11 @@
  *   translatable = TRUE,
  *   entity_keys = {
  *     "id" = "nid",
+ *     "uuid" = "uuid",
  *     "revision" = "vid",
+ *     "langcode" = "langcode",
  *     "bundle" = "type",
  *     "label" = "title",
- *     "uuid" = "uuid"
  *   },
  *   bundle_entity_type = "node_type",
  *   permission_granularity = "bundle",
diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php
index 463a9a0..fd427c2 100644
--- a/core/modules/shortcut/src/Entity/Shortcut.php
+++ b/core/modules/shortcut/src/Entity/Shortcut.php
@@ -37,8 +37,9 @@
  *   entity_keys = {
  *     "id" = "id",
  *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *     "bundle" = "shortcut_set",
- *     "label" = "title"
+ *     "label" = "title",
  *   },
  *   links = {
  *     "canonical" = "shortcut.link_edit",
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
index 7b7efaf..7bb067d 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
@@ -37,7 +37,8 @@
  *     "id" = "id",
  *     "uuid" = "uuid",
  *     "bundle" = "type",
- *     "label" = "name"
+ *     "langcode" = "langcode",
+ *     "label" = "name",
  *   },
  *   links = {
  *     "canonical" = "entity_test.render",
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php
index ab5fdab..6d6238e 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php
@@ -25,7 +25,7 @@
  *   entity_keys = {
  *     "id" = "id",
  *     "uuid" = "uuid",
- *     "bundle" = "type"
+ *     "bundle" = "type",
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php
index 90a56a5..00fe8d0 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php
@@ -21,7 +21,7 @@
  *   entity_keys = {
  *     "id" = "id",
  *     "label" = "name",
- *     "bundle" = "type"
+ *     "bundle" = "type",
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabelCallback.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabelCallback.php
index e15d389..07ecf0c 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabelCallback.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabelCallback.php
@@ -19,7 +19,7 @@
  *   fieldable = TRUE,
  *   entity_keys = {
  *     "id" = "id",
- *     "bundle" = "type"
+ *     "bundle" = "type",
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php
index a8abda5..d410a09 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php
@@ -33,8 +33,9 @@
  *   entity_keys = {
  *     "id" = "id",
  *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *     "bundle" = "type",
- *     "label" = "name"
+ *     "label" = "name",
  *   },
  *   links = {
  *     "canonical" = "entity_test.edit_entity_test_mul",
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
index b30cbb1..69785c2 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
@@ -35,7 +35,8 @@
  *     "id" = "id",
  *     "uuid" = "uuid",
  *     "revision" = "revision_id",
- *     "bundle" = "type"
+ *     "langcode" = "langcode",
+ *     "bundle" = "type",
  *   },
  *   links = {
  *     "canonical" = "entity_test.edit_entity_test_mulrev",
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php
index 5ad3ba7..2b48a1b 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php
@@ -17,7 +17,7 @@
  *   base_table = "entity_test",
  *   entity_keys = {
  *     "id" = "id",
- *     "bundle" = "type"
+ *     "bundle" = "type",
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php
index ea99ed0..1f58d81 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php
@@ -32,6 +32,7 @@
  *     "id" = "id",
  *     "uuid" = "uuid",
  *     "revision" = "revision_id",
+ *     "langcode" = "langcode",
  *     "bundle" = "type",
  *     "label" = "name",
  *   },
diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php
index 8796e83..07c015d 100644
--- a/core/modules/taxonomy/src/Entity/Term.php
+++ b/core/modules/taxonomy/src/Entity/Term.php
@@ -36,9 +36,10 @@
  *   translatable = TRUE,
  *   entity_keys = {
  *     "id" = "tid",
+ *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *     "bundle" = "vid",
  *     "label" = "name",
- *     "uuid" = "uuid"
  *   },
  *   bundle_entity_type = "taxonomy_vocabulary",
  *   links = {
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index 307cfc2..b0ed5bc 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -42,7 +42,8 @@
  *   translatable = TRUE,
  *   entity_keys = {
  *     "id" = "uid",
- *     "uuid" = "uuid"
+ *     "uuid" = "uuid",
+ *     "langcode" = "langcode",
  *   },
  *   links = {
  *     "canonical" = "user.view",
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
index 73c558f..bbb09cf 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@@ -118,6 +118,7 @@ protected function setUp() {
       ->will($this->returnValueMap(array(
         array('id', 'id'),
         array('uuid', 'uuid'),
+        array('langcode', 'langcode'),
       )));
     $this->entityType->expects($this->any())
       ->method('id')
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index 0a7acf4..8c35ec7 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -669,7 +669,7 @@ public function testGetFieldStorageDefinitionsWithCaching() {
    * @expectedException \LogicException
    */
   public function testGetBaseFieldDefinitionsInvalidDefinition() {
-    $langcode_definition = $this->setUpEntityWithFieldDefinition(FALSE, 'langcode');
+    $langcode_definition = $this->setUpEntityWithFieldDefinition(FALSE, 'langcode', 1, array('langcode' => 'langcode'));
     $langcode_definition->expects($this->once())
       ->method('isTranslatable')
       ->will($this->returnValue(TRUE));
@@ -721,11 +721,14 @@ public function testGetFieldDefinitionsProvider() {
    *   ModuleHandlerInterface::invokeAll() implementation. Defaults to FALSE.
    * @param string $field_definition_id
    *   (optional) The ID to use for the field definition. Defaults to 'id'.
+   * @param array $entity_keys
+   *   (optional) An array of entity keys for the mocked entity type. Defaults
+   *   to an empty array.
    *
    * @return \Drupal\Core\Field\FieldDefinition|\PHPUnit_Framework_MockObject_MockObject
    *   A field definition object.
    */
-  protected function setUpEntityWithFieldDefinition($custom_invoke_all = FALSE, $field_definition_id = 'id') {
+  protected function setUpEntityWithFieldDefinition($custom_invoke_all = FALSE, $field_definition_id = 'id', $entity_keys = array()) {
     $entity_type = $this->getMock('Drupal\Core\Entity\EntityTypeInterface');
     $entity = $this->getMockBuilder('Drupal\Tests\Core\Entity\EntityManagerTestEntity')
       ->disableOriginalConstructor()
@@ -737,7 +740,7 @@ protected function setUpEntityWithFieldDefinition($custom_invoke_all = FALSE, $f
       ->will($this->returnValue($entity_class));
     $entity_type->expects($this->any())
       ->method('getKeys')
-      ->will($this->returnValue(array()));
+      ->will($this->returnValue($entity_keys));
     $entity_type->expects($this->any())
       ->method('isSubclassOf')
       ->with($this->equalTo('\Drupal\Core\Entity\ContentEntityInterface'))
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
index 046744d..ed34465 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@@ -69,9 +69,9 @@ public function testHasKey($entity_keys, $expected) {
    */
   public function providerTestGetKeys() {
     return array(
-      array(array(), array('revision' => '', 'bundle' => '')),
-      array(array('id' => 'id'), array('id' => 'id', 'revision' => '', 'bundle' => '')),
-      array(array('bundle' => 'bundle'), array('bundle' => 'bundle', 'revision' => '')),
+      array(array(), array('revision' => '', 'bundle' => '', 'langcode' => '')),
+      array(array('id' => 'id'), array('id' => 'id', 'revision' => '', 'bundle' => '', 'langcode' => '')),
+      array(array('bundle' => 'bundle'), array('bundle' => 'bundle', 'revision' => '', 'langcode' => '')),
     );
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index 8b63f61..9e1f9d6 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -227,6 +227,11 @@ public function testAccess() {
    * @covers ::language
    */
   public function testLanguage() {
+    $this->entityType->expects($this->any())
+      ->method('getKey')
+      ->will($this->returnValueMap(array(
+        array('langcode', 'langcode'),
+      )));
     $this->assertSame('en', $this->entity->language()->id);
   }
 
