| 181 |
} |
} |
| 182 |
|
|
| 183 |
function fixLanguage () { |
function fixLanguage () { |
|
|
|
|
|
|
|
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/error.php'); |
|
| 184 |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
require_once($this->mosConfig_absolute_path.'/includes/phpgettext/phpgettext.class.php'); |
| 185 |
|
|
|
|
|
| 186 |
########## DEPRECATED ############ |
########## DEPRECATED ############ |
| 187 |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
if (isset($this->mosConfig_lang) AND $this->mosConfig_lang); |
| 188 |
else $this->set('mosConfig_lang', 'english'); |
else $this->set('mosConfig_lang', 'english'); |
| 190 |
if (file_exists($language_file)) require_once ($language_file); |
if (file_exists($language_file)) require_once ($language_file); |
| 191 |
################################### |
################################### |
| 192 |
|
|
|
#set_error_handler('error_handler'); |
|
| 193 |
$lang = $this->mosConfig_lang; |
$lang = $this->mosConfig_lang; |
|
|
|
|
|
|
| 194 |
$langfile = $this->rootPath.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR.$lang.'.xml'; |
$langfile = $this->rootPath.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR.$lang.'.xml'; |
|
/*$this->language[$this->mosConfig_language] = array( |
|
|
'locale' => 'pt, pt.utf-8', |
|
|
'encoding' => 'utf-8', |
|
|
'direction' => 'rtl', |
|
|
'dateformat' => '%A, %d %B %Y', |
|
|
'offset' => '+00:00' |
|
|
); |
|
|
*/ |
|
| 195 |
$p = xml_parser_create(); |
$p = xml_parser_create(); |
| 196 |
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); |
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); |
| 197 |
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); |
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); |
| 204 |
$this->language[$name] = $value['attributes']['default']; |
$this->language[$name] = $value['attributes']['default']; |
| 205 |
} |
} |
| 206 |
} |
} |
|
|
|
|
|
|
| 207 |
if (!defined('_ISO')) DEFINE('_ISO','charset='.$this->language['encoding']); |
if (!defined('_ISO')) DEFINE('_ISO','charset='.$this->language['encoding']); |
| 208 |
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $this->language['dateformat']); //Uses PHP's strftime Command Format |
if (!defined('_DATE_FORMAT_LC')) DEFINE('_DATE_FORMAT_LC', $this->language['dateformat']); //Uses PHP's strftime Command Format |
| 209 |
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $this->language['dateformat']." %H:%M"); |
if (!defined('_DATE_FORMAT_LC2')) DEFINE('_DATE_FORMAT_LC2', $this->language['dateformat']." %H:%M"); |
| 210 |
|
|
|
//header('Content-Type: text/html; charset=utf-8'); |
|
| 211 |
$gettext =& phpgettext(); |
$gettext =& phpgettext(); |
| 212 |
$gettext->debug = 0; |
$gettext->debug = $this->mosConfig_locale_debug; |
| 213 |
$gettext->has_gettext = 0; |
$gettext->has_gettext = $this->mosConfig_locale_use_gettext; |
| 214 |
$gettext->setlocale($this->mosConfig_lang, $this->mosConfig_locale); |
$gettext->setlocale($this->mosConfig_lang, $this->mosConfig_locale); |
|
/*dump($gettext->getlocale()); |
|
|
$gettext->bindtextdomain('administrator', $lang_path);/*dump($gettext->getlocale()); |
|
|
dump(setlocale(LC_CTYPE, ''));; |
|
|
|
|
|
|
|
|
dump(array($gettext, $this));*/ |
|
|
|
|
| 215 |
} |
} |
| 216 |
|
|
| 217 |
function handleGlobals () { |
function handleGlobals () { |
| 2473 |
$configuration->doGzip(); |
$configuration->doGzip(); |
| 2474 |
} |
} |
| 2475 |
else { |
else { |
| 2476 |
if (!$popup) { |
if (!isset($popup)) { |
| 2477 |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
$pop = mosGetParam($_REQUEST, 'pop', ''); |
| 2478 |
if ($pop) require_once($configuration->rootPath()."/administrator/popups/$pop"); |
if ($pop) require_once($configuration->rootPath()."/administrator/popups/$pop"); |
| 2479 |
else require_once($configuration->rootPath()."/administrator/popups/index3pop.php"); |
else require_once($configuration->rootPath()."/administrator/popups/index3pop.php"); |