function TranslationManager::sortTranslators
Sorts translators according to priority.
Return value
\Drupal\Core\StringTranslation\Translator\TranslatorInterface[] A sorted array of translator objects.
2 calls to TranslationManager::sortTranslators()
- TranslationManager::getStringTranslation in core/
lib/ Drupal/ Core/ StringTranslation/ TranslationManager.php  - Retrieves English string to given language.
 - TranslationManager::reset in core/
lib/ Drupal/ Core/ StringTranslation/ TranslationManager.php  - Resets translation cache.
 
File
- 
              core/
lib/ Drupal/ Core/ StringTranslation/ TranslationManager.php, line 79  
Class
- TranslationManager
 - Defines a chained translation implementation combining multiple translators.
 
Namespace
Drupal\Core\StringTranslationCode
protected function sortTranslators() {
  krsort($this->translators);
  return array_merge(...$this->translators);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.