TranslatorInterface::reset

public TranslatorInterface::reset() Resets translation cache. Since most translation systems implement some form of caching, this provides a way to delete that cache. File core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php, line 31 Class TranslatorInterface Interface for objects capable of string translation. Namespace Drupal\Core\StringTranslation\Translator Code public function reset();

TranslatorInterface::getStringTranslation

public TranslatorInterface::getStringTranslation($langcode, $string, $context) Retrieves English string to given language. Parameters string $langcode: Language code to translate to. string $string: The source string. string $context: The string context. Return value string|false Translated string if there is a translation, FALSE if not. File core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php, line 23 Class TranslatorInterface Interface for objects capable of strin

TranslatorInterface

Defines an interface used in validation. This extends the interface used by the Symfony validator in order to indicate that the Drupal code is actually independent from the Symfony translation component. Hierarchy interface \Symfony\Component\Translation\TranslatorInterfaceinterface \Drupal\Core\Validation\TranslatorInterface See also https://github.com/symfony/symfony/pull/6189 https://github.com/symfony/symfony/issues/15714 File core/lib/Drupal/Core/Validation/TranslatorInterface.php, li

TranslatorInterface

Interface for objects capable of string translation. Hierarchy interface \Drupal\Core\StringTranslation\Translator\TranslatorInterface File core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php, line 8 Namespace Drupal\Core\StringTranslation\Translator Members Name Modifiers Type Description TranslatorInterface::getStringTranslation public function Retrieves English string to given language. TranslatorInterface::reset public function Resets tr

TranslationString::__construct

public TranslationString::__construct($values = array()) Constructs a new locale string object. Parameters object|array $values: Object or array with initial values. Overrides StringBase::__construct File core/modules/locale/src/TranslationString.php, line 45 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function __construct($values = array()) { parent::__construct($values); if (!isset($this->isNew)) { // We mark t

TranslationString::setString

public TranslationString::setString($string) Sets the string contained in this object. Parameters string $string: String to set as value. Return value $this Overrides StringInterface::setString File core/modules/locale/src/TranslationString.php, line 93 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function setString($string) { $this->translation = $string; return $this; }

TranslationString::setCustomized

public TranslationString::setCustomized($customized = TRUE) Sets the string as customized / not customized. Parameters bool $customized: (optional) Whether the string is customized or not. Defaults to TRUE. Return value \Drupal\locale\TranslationString The called object. File core/modules/locale/src/TranslationString.php, line 64 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function setCustomized($customized = TRUE) { $th

TranslationString::save

public TranslationString::save() Saves string object to storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. Overrides StringBase::save File core/modules/locale/src/TranslationString.php, line 108 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function save() { parent::save(); $this->isNew = FALSE; return $this; }

TranslationString::isTranslation

public TranslationString::isTranslation() Checks whether the object is a translation string. Return value bool TRUE if the object is a translation string, FALSE otherwise. Overrides StringInterface::isTranslation File core/modules/locale/src/TranslationString.php, line 79 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function isTranslation() { return !empty($this->lid) && !empty($this->language) && iss

TranslationString::isSource

public TranslationString::isSource() Checks whether the object is a source string. Return value bool TRUE if the object is a source string, FALSE otherwise. Overrides StringInterface::isSource File core/modules/locale/src/TranslationString.php, line 72 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function isSource() { return FALSE; }