diff options
Diffstat (limited to 'framework/I18N')
-rw-r--r-- | framework/I18N/TGlobalization.php | 7 | ||||
-rw-r--r-- | framework/I18N/Translation.php | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/framework/I18N/TGlobalization.php b/framework/I18N/TGlobalization.php index 41c89c19..2965ad1b 100644 --- a/framework/I18N/TGlobalization.php +++ b/framework/I18N/TGlobalization.php @@ -214,7 +214,7 @@ class TGlobalization extends TModule throw new TConfigurationException("invalid source dir '{$config['source']}'"); } } - if($config['cache']) + if(isset($config['cache']) && TPropertyValue::ensureBoolean($config['cache'])) { $config['cache'] = $this->getApplication()->getRunTimePath().'/i18n'; if(!is_dir($config['cache'])) @@ -225,6 +225,10 @@ class TGlobalization extends TModule chmod($config['cache'], PRADO_CHMOD); //make it deletable } } + else + { + unset($config['cache']); + } $this->_translation = $config; } @@ -294,4 +298,3 @@ class TGlobalization extends TModule } } - diff --git a/framework/I18N/Translation.php b/framework/I18N/Translation.php index 4e244a49..f22a68f0 100644 --- a/framework/I18N/Translation.php +++ b/framework/I18N/Translation.php @@ -51,7 +51,7 @@ class Translation extends TComponent $source->setCulture($app->getCulture()); - if(TPropertyValue::ensureBoolean($config['cache'])) + if(isset($config['cache'])) $source->setCache(new MessageCache($config['cache'])); self::$formatters[$catalogue] = new MessageFormat($source, $app->getCharset()); |