You are here

public function ConfigurableLanguage::isDefault in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::isDefault()
  2. 9 core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::isDefault()

Returns whether this language is the default language.

Return value

bool Whether the language is the default language.

Overrides LanguageInterface::isDefault

File

core/modules/language/src/Entity/ConfigurableLanguage.php, line 109

Class

ConfigurableLanguage
Defines the ConfigurableLanguage entity.

Namespace

Drupal\language\Entity

Code

public function isDefault() {
  return static::getDefaultLangcode() == $this
    ->id();
}