ConfigEntityBase::$langcode

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::langcode
  2. 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::langcode
  3. 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::langcode

The language code of the entity's default language.

Assumed to be English by default. ConfigEntityStorage will set an appropriate language when creating new entities. This default applies to imported default configuration where the language code is missing. Those should be assumed to be English. All configuration entities support third party settings, so even configuration entities that do not directly store settings involving text in a human language may have such third party settings attached. This means configuration entities should be in one of the configured languages or the built-in English.

Type: string

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 77

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

protected $langcode = 'en';

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.