W3cubDocs

/Drupal 8

class TranslationManager

Defines a chained translation implementation combining multiple translators.

Hierarchy

File

core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 11

Namespace

Drupal\Core\StringTranslation

Members

Name Modifiers Type Description
TranslationManager::$defaultLangcode protected property The default langcode used in translations.
TranslationManager::$sortedTranslators protected property An array of translators, sorted by priority.
TranslationManager::$translators protected property An unsorted array of arrays of active translators.
TranslationManager::addTranslator public function Appends a translation system to the translation chain.
TranslationManager::doTranslate protected function Translates a string to the current language or to a given language.
TranslationManager::formatPlural public function Formats a string containing a count of items. Overrides TranslationInterface::formatPlural
TranslationManager::getStringTranslation public function Retrieves English string to given language. Overrides TranslatorInterface::getStringTranslation
TranslationManager::reset public function Resets translation cache. Overrides TranslatorInterface::reset
TranslationManager::setDefaultLangcode public function Sets the default langcode.
TranslationManager::sortTranslators protected function Sorts translators according to priority.
TranslationManager::translate public function Translates a string to the current language or to a given language. Overrides TranslationInterface::translate
TranslationManager::translateString public function Translates a TranslatableMarkup object to a string. Overrides TranslationInterface::translateString
TranslationManager::__construct public function Constructs a TranslationManager object.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!TranslationManager.php/class/TranslationManager/8.1.x