TranslationInterface

Interface for the translation.manager translation service. Hierarchy interface \Drupal\Core\StringTranslation\TranslationInterface Related topics Internationalization Internationalization and translation File core/lib/Drupal/Core/StringTranslation/TranslationInterface.php, line 10 Namespace Drupal\Core\StringTranslation Members Name Modifiers Type Description TranslationInterface::formatPlural public function Formats a string containing a count of items. TranslationI

Translation::__construct

public Translation::__construct(array $values) Constructs a new class instance. Parses values passed into this class through the t() function in Drupal and handles an optional context for the string. Parameters array $values: Possible array keys: value (required): the string that is to be translated. arguments (optional): an array with placeholder replacements, keyed by placeholder. context (optional): a string that describes the context of "value"; File core/lib/Drupal/Core/Annotation/Tr

Translation::get

public Translation::get() Gets the value of an annotation. Overrides AnnotationInterface::get File core/lib/Drupal/Core/Annotation/Translation.php, line 90 Class Translation Defines a translatable annotation object. Namespace Drupal\Core\Annotation Code public function get() { return $this->translation; }

Translation::$translation

The string translation object. Type: \Drupal\Core\StringTranslation\TranslatableMarkup File core/lib/Drupal/Core/Annotation/Translation.php, line 60 Class Translation Defines a translatable annotation object. Namespace Drupal\Core\Annotation Code protected $translation;

Translation

Defines a translatable annotation object. Some metadata within an annotation needs to be translatable. This class supports that need by allowing both the translatable string and, if specified, a context for that string. The string (with optional context) is passed into t(). Hierarchy class \Drupal\Component\Annotation\AnnotationBase implements AnnotationInterfaceclass \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI tex

TranslateFormBase::__construct

public TranslateFormBase::__construct(StringStorageInterface $locale_storage, StateInterface $state, LanguageManagerInterface $language_manager) Constructs a new TranslationFormBase object. Parameters \Drupal\locale\StringStorageInterface $locale_storage: The locale storage. \Drupal\Core\State\StateInterface $state: The state service. \Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager. File core/modules/locale/src/Form/TranslateFormBase.php, line 56 Class

TranslateFormBase::translateFilterValues

protected TranslateFormBase::translateFilterValues($reset = FALSE) Builds an array out of search criteria specified in request variables. Parameters bool $reset: If the list of values should be reset. Return value array The filter values. File core/modules/locale/src/Form/TranslateFormBase.php, line 121 Class TranslateFormBase Defines the locale user interface translation form base. Namespace Drupal\locale\Form Code protected function translateFilterValues($reset = FALSE) { if (!$r

TranslateFormBase::translateFilters

protected TranslateFormBase::translateFilters() Lists locale translation filters that can be applied. File core/modules/locale/src/Form/TranslateFormBase.php, line 154 Class TranslateFormBase Defines the locale user interface translation form base. Namespace Drupal\locale\Form Code protected function translateFilters() { $filters = array(); // Get all languages, except English. $this->languageManager->reset(); $languages = $this->languageManager->getLanguages();

TranslateFormBase::translateFilterLoadStrings

protected TranslateFormBase::translateFilterLoadStrings() Builds a string search query and returns an array of string objects. Return value \Drupal\locale\TranslationString[] Array of \Drupal\locale\TranslationString objects. File core/modules/locale/src/Form/TranslateFormBase.php, line 79 Class TranslateFormBase Defines the locale user interface translation form base. Namespace Drupal\locale\Form Code protected function translateFilterLoadStrings() { $filter_values = $this->tran

TranslateFormBase::create

public static TranslateFormBase::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The servic