PoDatabaseReader

Gettext PO reader working with the locale module database. Hierarchy class \Drupal\locale\PoDatabaseReader implements PoReaderInterface File core/modules/locale/src/PoDatabaseReader.php, line 12 Namespace Drupal\locale Members Name Modifiers Type Description PoDatabaseReader::$langcode private property Language code of the language being read from the database. PoDatabaseReader::$options private property An associative array indicating which type of strings shoul

PluralVariants::setConfig

public PluralVariants::setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL) Sets configuration based on a nested form value array. If the configuration values are the same as the source configuration, the override should be removed from the translation configuration. Parameters \Drupal\Core\Config\Config $base_config: Base configuration values, in the source language. \Drupal\language\Config\LanguageConfigOverride $config_translation: Tra

PluralVariants::getTranslationElement

protected PluralVariants::getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) Returns the translation form element for a given configuration definition. For complex data structures (such as mappings) that are translatable wholesale but contain non-translatable properties, the form element is responsible for checking access to the source value of those properties. In case of formatted text, for example, access to the source text format must be chec

PluralVariants::getSourceElement

protected PluralVariants::getSourceElement(LanguageInterface $source_language, $source_config) Returns the source element for a given configuration definition. This can be either a render array that actually outputs the source values directly or a read-only form element with the source values depending on what is considered to provide a more intuitive user interface for the translator. Parameters \Drupal\Core\Language\LanguageInterface $source_language: Thee source language of the configuratio

PluralVariants

Defines form elements for plurals in configuration translation. Hierarchy class \Drupal\config_translation\FormElement\FormElementBase implements ElementInterface uses StringTranslationTraitclass \Drupal\config_translation\FormElement\PluralVariants File core/modules/config_translation/src/FormElement/PluralVariants.php, line 13 Namespace Drupal\config_translation\FormElement Members Name Modifiers Type Description FormElementBase::$definition protected property The dat

PluralTranslation::__construct

public PluralTranslation::__construct(array $values) Constructs a new class instance. Parameters array $values: An associative array with the following keys: singular: The string for the singular case. plural: The string for the plural case. context: The context the source strings belong to. Throws \InvalidArgumentException Thrown when the keys 'singular' or 'plural' are missing from the $values array. File core/lib/Drupal/Core/Annotation/PluralTranslation.php, line 79 Class PluralTr

PluralTranslation::get

public PluralTranslation::get() Gets the value of an annotation. Overrides AnnotationInterface::get File core/lib/Drupal/Core/Annotation/PluralTranslation.php, line 97 Class PluralTranslation Defines an annotation object for strings that require plural forms. Namespace Drupal\Core\Annotation Code public function get() { return [ 'singular' => $this->singular, 'plural' => $this->plural, 'context' => $this->context, ]; }

PluralTranslation::$singular

The string for the singular case. Type: string File core/lib/Drupal/Core/Annotation/PluralTranslation.php, line 50 Class PluralTranslation Defines an annotation object for strings that require plural forms. Namespace Drupal\Core\Annotation Code protected $singular;

PluralTranslation::$plural

The string for the plural case. Type: string File core/lib/Drupal/Core/Annotation/PluralTranslation.php, line 57 Class PluralTranslation Defines an annotation object for strings that require plural forms. Namespace Drupal\Core\Annotation Code protected $plural;

PluralTranslation::$context

The context the source strings belong to. Type: string File core/lib/Drupal/Core/Annotation/PluralTranslation.php, line 64 Class PluralTranslation Defines an annotation object for strings that require plural forms. Namespace Drupal\Core\Annotation Code protected $context;