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

Breadcrumb

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

function Drupal::translation

Returns the string translation service.

Return value

\Drupal\Core\StringTranslation\TranslationManager The string translation manager.

File

core/lib/Drupal.php, line 595

Class

Drupal
Static Service Container wrapper.

Code

public static function translation() {
    return static::getContainer()->get('string_translation');
}
RSS feed
Powered by Drupal