protected function TranslationManager::sortTranslators in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/StringTranslation/TranslationManager.php \Drupal\Core\StringTranslation\TranslationManager::sortTranslators()
Sorts translators according to priority.
Return value
array A sorted array of translators 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 81 - Contains \Drupal\Core\StringTranslation\TranslationManager.
Class
- TranslationManager
- Defines a chained translation implementation combining multiple translators.
Namespace
Drupal\Core\StringTranslationCode
protected function sortTranslators() {
$sorted = array();
krsort($this->translators);
foreach ($this->translators as $translators) {
$sorted = array_merge($sorted, $translators);
}
return $sorted;
}