summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/I18N/TGlobalization.php9
-rw-r--r--framework/TApplication.php8
2 files changed, 14 insertions, 3 deletions
diff --git a/framework/I18N/TGlobalization.php b/framework/I18N/TGlobalization.php
index 769b7eaa..0e664378 100644
--- a/framework/I18N/TGlobalization.php
+++ b/framework/I18N/TGlobalization.php
@@ -68,9 +68,12 @@ class TGlobalization extends TModule
$this->_defaultCharset = $this->getCharset();
$this->_defaultCulture = $this->getCulture();
- $translation = $xml->getElementByTagName('translation');
- if($translation)
- $this->setTranslationConfiguration($translation->getAttributes());
+ if($xml!==null)
+ {
+ $translation = $xml->getElementByTagName('translation');
+ if($translation)
+ $this->setTranslationConfiguration($translation->getAttributes());
+ }
$this->getApplication()->setGlobalization($this);
}
diff --git a/framework/TApplication.php b/framework/TApplication.php
index fd341b43..1b7e4cd1 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -757,8 +757,16 @@ class TApplication extends TComponent
$this->_user=$user;
}
+ /**
+ * @return TGlobalization globalization module
+ */
public function getGlobalization()
{
+ if($this->_globalization===null)
+ {
+ $this->_globalization=Prado::createComponent('System.I18N.TGlobalization');
+ $this->_globalization->init(null);
+ }
return $this->_globalization;
}