public function init($config)
{
if ($this->_charset === null) {
$this->_charset = $this->getDefaultCharset();
}
if ($this->_culture === null) {
$this->_culture = $this->getDefaultCulture();
}
if ($config !== null) {
if ($this->getApplication()->getConfigurationType() == TApplication::CONFIG_TYPE_PHP) {
$translation = isset($config['translate']) ? $config['translate'] : null;
} else {
$t = $config->getElementByTagName('translation');
$translation = $t ? $t->getAttributes() : null;
}
if ($translation) {
$this->setTranslationConfiguration($translation);
}
}
$this->getApplication()->setGlobalization($this);
}