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

Breadcrumb

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

function 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()

2 calls to Tasks::t()
Tasks::getFormOptions in core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php
Returns driver specific configuration options.
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);
}

API Navigation

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