W3cubDocs

/Drupal 8

class Language

An object containing the information for an interface language.

Hierarchy

See also

\Drupal\Core\Language\LanguageManager::getLanguage()

File

core/lib/Drupal/Core/Language/Language.php, line 12

Namespace

Drupal\Core\Language

Members

Name Modifiers Type Description
Language::$defaultValues public static property The values to use to instantiate the default language.
Language::$direction protected property The direction, left-to-right, or right-to-left.
Language::$id protected property The ID, langcode.
Language::$locked protected property Locked indicates a language used by the system, not an actual language.
Language::$name protected property The human readable English name.
Language::$weight protected property The weight, used for ordering languages in lists, like selects or tables.
Language::getDefaultLangcode protected static function Gets the default langcode.
Language::getDirection public function Gets the text direction (left-to-right or right-to-left). Overrides LanguageInterface::getDirection
Language::getId public function Gets the ID (language code). Overrides LanguageInterface::getId
Language::getName public function Gets the name of the language. Overrides LanguageInterface::getName
Language::getWeight public function Gets the weight of the language. Overrides LanguageInterface::getWeight
Language::isDefault public function Returns whether this language is the default language. Overrides LanguageInterface::isDefault
Language::isLocked public function Returns whether this language is locked. Overrides LanguageInterface::isLocked
Language::sort public static function Sort language objects.
Language::__construct public function Constructs a new class instance.
LanguageInterface::DIRECTION_LTR constant Language written left to right. Possible value of $language->direction.
LanguageInterface::DIRECTION_RTL constant Language written right to left. Possible value of $language->direction.
LanguageInterface::LANGCODE_DEFAULT constant Language code referring to the default language of data, e.g. of an entity.
LanguageInterface::LANGCODE_NOT_APPLICABLE constant The language code used when the marked object has no linguistic content.
LanguageInterface::LANGCODE_NOT_SPECIFIED constant The language code used when no language is explicitly assigned (yet).
LanguageInterface::LANGCODE_SITE_DEFAULT constant Language code referring to site's default language.
LanguageInterface::LANGCODE_SYSTEM constant Special system language code (only applicable to UI language).
LanguageInterface::STATE_ALL constant The language state used when referring to all languages.
LanguageInterface::STATE_CONFIGURABLE constant The language state when referring to configurable languages.
LanguageInterface::STATE_LOCKED constant The language state when referring to locked languages.
LanguageInterface::STATE_SITE_DEFAULT constant The language state used when referring to the site's default language.
LanguageInterface::TYPE_CONTENT constant The type of language used to define the content language.
LanguageInterface::TYPE_INTERFACE constant The type of language used to select the user interface.
LanguageInterface::TYPE_URL constant The type of language used for URLs.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Language!Language.php/class/Language/8.1.x