Permalink
Browse files

BUG FIX: Make sure the translation function doesn't try to include mi…

…ssing locale files over and over again.
  • Loading branch information...
drzax committed Mar 21, 2012
1 parent 4ec208c commit ac8a05f18863731044a21f42b2fcc663ceeba3c8
Showing with 4 additions and 1 deletion.
  1. +4 −1 i18n/i18n.php
View
@@ -1833,8 +1833,11 @@ static function include_by_locale($locale, $load_plugins = true, $force_load = f
}
}
- // 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();
}
/**

0 comments on commit ac8a05f

Please sign in to comment.