From 395580bdd6b9469433501102d0b91c05089e78d4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 12 Aug 2012 22:11:55 +0200 Subject: [PATCH] BUG Locale-isolated i18n/Zend cache In certain cases (e.g. with the mi_NZ locale), the i18n system would regard a langage as already loaded if it was restored from a cached, but empty translation list (through Zend_Translate). This was due to the cache key being generated based solely on the content, rather than taking other options like the locale into account. --- i18n/i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/i18n.php b/i18n/i18n.php index 7a518d3bb..12424b369 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -1995,7 +1995,7 @@ class i18n extends Object implements TemplateGlobalProvider { // and the next invocation of include_by_locale() doesn't cause a new reparse. $adapter->addTranslation( array( - 'content' => array('_' => '_'), + 'content' => array($locale => $locale), // Cached by content hash, so needs to be locale dependent 'locale' => $locale, 'usetranslateadapter' => true )