From ac8a05f18863731044a21f42b2fcc663ceeba3c8 Mon Sep 17 00:00:00 2001 From: Simon Elvery Date: Wed, 21 Mar 2012 12:47:22 +1000 Subject: [PATCH] BUG FIX: Make sure the translation function doesn't try to include missing locale files over and over again. --- i18n/i18n.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i18n/i18n.php b/i18n/i18n.php index 4834e8271..c309a3695 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -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(); } /**