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::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::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();

Transliteration

Transliterate from Unicode to US-ASCII Transliteration is the process of translating individual non-US-ASCII characters into ASCII characters, which specifically does not transform non-printable and punctuation characters in any way. This process will always be both inexact and language-dependent. For instance, the character Ö (O with an umlaut) is commonly transliterated as O, but in German text, the convention would be to transliterate it as Oe or OE, depending on the context (beginning of a

TransliterationInterface

Defines an interface for classes providing transliteration. Hierarchy interface \Drupal\Component\Transliteration\TransliterationInterface Related topics Transliteration Transliterate from Unicode to US-ASCII File core/lib/Drupal/Component/Transliteration/TransliterationInterface.php, line 10 Namespace Drupal\Component\Transliteration Members Name Modifiers Type Description TransliterationInterface::removeDiacritics public function Removes diacritics (accents) from cer

TransliterationInterface::removeDiacritics

public TransliterationInterface::removeDiacritics($string) Removes diacritics (accents) from certain letters. This only applies to certain letters: Accented Latin characters like a-with-acute-accent, in the UTF-8 character range of 0xE0 to 0xE6 and 01CD to 024F. Replacements that would result in the string changing length are excluded, as well as characters that are not accented US-ASCII letters. Parameters string $string: The string holding diacritics. Return value string $string with accent

TransliterationInterface::transliterate

public TransliterationInterface::transliterate($string, $langcode = 'en', $unknown_character = '?', $max_length = NULL) Transliterates text from Unicode to US-ASCII. Parameters string $string: The string to transliterate. string $langcode: (optional) The language code of the language the string is in. Defaults to 'en' if not provided. Warning: this can be unfiltered user input. string $unknown_character: (optional) The character to substitute for characters in $string without transliterated eq

TraversableTypedDataInterface

An interface for typed data objects that can be traversed. Hierarchy interface \Drupal\Core\TypedData\TypedDataInterfaceinterface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Traversable File core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php, line 8 Namespace Drupal\Core\TypedData Members Name Modifiers Type Description TraversableTypedDataInterface::onChange public function React to changes to a child property or item. TypedDataInterfac

TraversableTypedDataInterface::onChange

public TraversableTypedDataInterface::onChange($name) React to changes to a child property or item. Note that this is invoked after any changes have been applied. Parameters $name: The name of the property or the delta of the list item which is changed. File core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php, line 18 Class TraversableTypedDataInterface An interface for typed data objects that can be traversed. Namespace Drupal\Core\TypedData Code public function onChange

TriggerPreviewCommand

Provides an AJAX command for triggering the views live preview. This command is implemented in Drupal.AjaxCommands.prototype.viewsTriggerPreview. Hierarchy class \Drupal\views\Ajax\TriggerPreviewCommand implements CommandInterface File core/modules/views/src/Ajax/TriggerPreviewCommand.php, line 12 Namespace Drupal\views\Ajax Members Name Modifiers Type Description TriggerPreviewCommand::render public function Return an array to be run through json_encode and sent to the