mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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.
This commit is contained in:
parent
8d9db7f61a
commit
395580bdd6
@ -1995,7 +1995,7 @@ class i18n extends Object implements TemplateGlobalProvider {
|
|||||||
// and the next invocation of include_by_locale() doesn't cause a new reparse.
|
// and the next invocation of include_by_locale() doesn't cause a new reparse.
|
||||||
$adapter->addTranslation(
|
$adapter->addTranslation(
|
||||||
array(
|
array(
|
||||||
'content' => array('_' => '_'),
|
'content' => array($locale => $locale), // Cached by content hash, so needs to be locale dependent
|
||||||
'locale' => $locale,
|
'locale' => $locale,
|
||||||
'usetranslateadapter' => true
|
'usetranslateadapter' => true
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user