You are here

protected function Tasks::t in Drupal 10

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Install/Tasks.php \Drupal\Core\Database\Install\Tasks::t()

Translates a string to the current language or to a given language.

Parameters

string $string: The string literal to translate.

array $args: Placeholder arguments to use inside the translated string (if any).

array $options: Options for the translation.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup An object representing the translatable markup for the given string.

See also

\Drupal\Core\StringTranslation\TranslatableMarkup::__construct()

1 call to Tasks::t()
Tasks::name in core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php
Returns the human-readable name of the driver.

File

core/lib/Drupal/Core/Database/Install/Tasks.php, line 370

Class

Tasks
Database installer structure.

Namespace

Drupal\Core\Database\Install

Code

protected function t($string, array $args = [], array $options = []) {
  return new TranslatableMarkup($string, $args, $options);
}