public function TranslationManager::__construct in Drupal 8
Same name and namespace in other branches
- 9 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 52
Class
- TranslationManager
- Defines a chained translation implementation combining multiple translators.
Namespace
Drupal\Core\StringTranslationCode
public function __construct(LanguageDefault $default_language) {
$this->defaultLangcode = $default_language
->get()
->getId();
}