diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 87b43f7..44187cb 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -56,6 +56,13 @@ public $uuid; /** + * The language code of the language for this entity. + * + * @var string + */ + public $langcode; + + /** * Whether the config is being created, updated or deleted through the * import process. * diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index dc77b5b..d7197fb 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -255,7 +255,7 @@ public function access($operation = 'view', AccountInterface $account = NULL) { * {@inheritdoc} */ public function language() { - $langcode = $this->{$this->entityInfo()->getKey('language')}; + $langcode = $this->{$this->getEntityType()->getKey('language')}; $language = \Drupal::languageManager()->getLanguage($langcode); if (!$language) { // Make sure we return a proper language object.