You are here

public function TranslationManager::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/StringTranslation/TranslationManager.php \Drupal\Core\StringTranslation\TranslationManager::__construct()

Constructs a TranslationManager object.

Parameters

\Drupal\Core\Language\LanguageDefault $default_language: The default language.

1 method overrides TranslationManager::__construct()
TestTranslationManager::__construct in core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
Constructs a TranslationManager object.

File

core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 53
Contains \Drupal\Core\StringTranslation\TranslationManager.

Class

TranslationManager
Defines a chained translation implementation combining multiple translators.

Namespace

Drupal\Core\StringTranslation

Code

public function __construct(LanguageDefault $default_language) {
  $this->defaultLangcode = $default_language
    ->get()
    ->getId();
}