Merge pull request #255 from drzax/i18n

BUGFIX: Improve translation efficiency for missing locales
This commit is contained in:
Sean Harvey 2012-03-21 02:50:22 -07:00
commit db9a3f4eb9

View File

@ -1833,8 +1833,11 @@ class i18n extends Object implements TemplateGlobalProvider {
}
}
// Finally, load any translations from registered plugins
// Load any translations from registered plugins
if ($load_plugins) self::plugins_load($locale);
// Make sure this is only done once. We don't want to attempt it hundreds of times for missing locals
if(!isset($lang[$locale])) $lang[$locale] = array();
}
/**