protected function TranslationManager::sortTranslators

Sorts translators according to priority.

Return value

array A sorted array of translators objects.

2 calls to TranslationManager::sortTranslators()
TranslationManager::getStringTranslation in drupal/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
Retrieves English string to given language.
TranslationManager::reset in drupal/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
Resets translation cache.

File

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

Class

TranslationManager
Defines a chained translation implementation combining multiple translators.

Namespace

Drupal\Core\StringTranslation

Code

protected function sortTranslators() {
  $sorted = array();
  krsort($this->translators);
  foreach ($this->translators as $translators) {
    $sorted = array_merge($sorted, $translators);
  }
  return $sorted;
}