/** * Constructor (ZE2) * @ignore */ function __construct($language = null, $encoding = null) { if (!$this->setLanguage($language)) { if (class_exists('I18Nv2')) { $l = I18Nv2::lastLocale(0, true); if (!isset($l) || !$this->setLanguage($l['language'])) { $this->setLanguage('en'); } } else { $this->setLanguage('en'); } } if (!$this->setEncoding($encoding)) { $this->setEncoding('UTF-8'); } }
/** * Loads corresponding locale extension * * @access public * @return void */ function loadExtension() { $locale = I18Nv2::lastLocale(0, true); if (isset($locale)) { $dir = dirname(__FILE__); foreach (array($locale['language'], $locale['locale']) as $lc) { if (is_file($dir . '/Locale/' . $lc . '.php')) { include $dir . '/Locale/' . $lc . '.php'; } } } }