TranslatableInterface::language

public TranslatableInterface::language() Returns the translation language. Return value \Drupal\Core\Language\LanguageInterface The language object. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 16 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function language();

TranslatableInterface::isTranslatable

public TranslatableInterface::isTranslatable() Returns the translation support status. Return value bool TRUE if the object has translation support enabled. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 114 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function isTranslatable();

TranslatableInterface::isNewTranslation

public TranslatableInterface::isNewTranslation() Checks whether the translation is new. Return value bool TRUE if the translation is new, FALSE otherwise. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 32 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function isNewTranslation();

TranslatableInterface::isDefaultTranslation

public TranslatableInterface::isDefaultTranslation() Checks whether the translation is the default one. Return value bool TRUE if the translation is the default one, FALSE otherwise. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 24 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function isDefaultTranslation();

TranslatableInterface::hasTranslation

public TranslatableInterface::hasTranslation($langcode) Returns TRUE there is a translation for the given language code. Parameters string $langcode: The language code identifying the translation. Return value bool TRUE if the translation exists, FALSE otherwise. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 82 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function hasTranslation($langcode);

TranslatableInterface::getUntranslated

public TranslatableInterface::getUntranslated() Returns the translatable object referring to the original language. Return value $this The translation object referring to the original language. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 71 Class TranslatableInterface Interface for translatable data. Namespace Drupal\Core\TypedData Code public function getUntranslated();

TranslatableInterface::getTranslationLanguages

public TranslatableInterface::getTranslationLanguages($include_default = TRUE) Returns the languages the data is translated to. Parameters bool $include_default: (optional) Whether the default language should be included. Defaults to TRUE. Return value \Drupal\Core\Language\LanguageInterface[] An associative array of language objects, keyed by language codes. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 44 Class TranslatableInterface Interface for translatable data

TranslatableInterface::getTranslation

public TranslatableInterface::getTranslation($langcode) Gets a translation of the data. The returned translation has to be of the same type than this typed data object. Parameters $langcode: The language code of the translation to get or LanguageInterface::LANGCODE_DEFAULT to get the data in default language. Return value $this A typed data object for the translated data. Throws \InvalidArgumentException If an invalid or non-existing translation language is specified. File core/lib/Drupal/Co

TranslatableInterface::addTranslation

public TranslatableInterface::addTranslation($langcode, array $values = array()) Adds a new translation to the translatable object. Parameters string $langcode: The language code identifying the translation. array $values: (optional) An array of initial values to be assigned to the translatable fields. Defaults to none. Return value $this Throws \InvalidArgumentException If an invalid or existing translation language is specified. File core/lib/Drupal/Core/TypedData/TranslatableInterface.php

TranslatableInterface

Interface for translatable data. Hierarchy interface \Drupal\Core\TypedData\TranslatableInterface File core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 8 Namespace Drupal\Core\TypedData Members Name Modifiers Type Description TranslatableInterface::addTranslation public function Adds a new translation to the translatable object. TranslatableInterface::getTranslation public function Gets a translation of the data. TranslatableInterface::getTranslat