Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. YamlDiscovery.php

function YamlDiscovery::addTranslatableProperty

Set one of the YAML values as being translatable.

Parameters

string $value_key: The key corresponding to the value in the YAML that contains a translatable string.

string $context_key: (Optional) the translation context for the value specified by the $value_key.

Return value

$this

File

core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php, line 66

Class

YamlDiscovery
Allows YAML files to define plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function addTranslatableProperty($value_key, $context_key = '') {
    $this->translatableProperties[$value_key] = $context_key;
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal