Skip to content

Commit

Permalink
MINOR Don't set locale on adapter in i18n::_t() for performance reaso…
Browse files Browse the repository at this point in the history
…ns, we're passing it with each individual translate() call anyway
  • Loading branch information
chillu committed Apr 15, 2012
1 parent 190c758 commit 796975f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion i18n/i18n.php
Expand Up @@ -1467,7 +1467,6 @@ static function _t($entity, $string = "", $priority = 40, $context = "") {
foreach(self::get_translators() as $priority => $translators) {
foreach($translators as $name => $translator) {
$adapter = $translator->getAdapter();
$adapter->setLocale($locale);

// if language table isn't loaded for this locale, get it for each of the modules
if(!$adapter->isAvailable($locale) && !$adapter->isAvailable($lang)) {
Expand Down

0 comments on commit 796975f

Please sign in to comment.