public TranslationManager::addTranslator(TranslatorInterface $translator, $priority = 0)
Appends a translation system to the translation chain.
\Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator: The translation interface to be appended to the translation chain.
int $priority: The priority of the logger being added.
$this
public function addTranslator(TranslatorInterface $translator, $priority = 0) { $this->translators[$priority][] = $translator; // Reset sorted translators property to trigger rebuild. $this->sortedTranslators = NULL; return $this; }
© 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/function/TranslationManager::addTranslator/8.1.x