From fbf77b4493f1b77c99751d8a86365c712ae3fb1b Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Fri, 18 Nov 2005 10:35:15 -0500 Subject: [PATCH] Added Japanese localization --- program/include/main.inc | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 5895807..936cad3 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -40,12 +40,16 @@ include_once('config/db.inc.php'); $CONFIG = array_merge($CONFIG, $rcmail_config); + if (empty($CONFIG['log_dir'])) + $CONFIG['log_dir'] = $INSTALL_PATH.'logs'; + else + $CONFIG['log_dir'] = ereg_replace('\/$', '', $CONFIG['log_dir']); // set PHP error logging according to config if ($CONFIG['debug_level'] & 1) { ini_set('log_errors', 1); - ini_set('error_log', $INSTALL_PATH.'logs/errors'); + ini_set('error_log', $CONFIG['log_dir'].'/errors'); } if ($CONFIG['debug_level'] & 4) ini_set('display_errors', 1); @@ -257,16 +261,22 @@ // set localization charset based on the given language function rcmail_set_locale($lang) { - global $OUTPUT, $INSTLL_PATH; + global $OUTPUT, $INSTLL_PATH, $CHARSET; static $rcube_charsets; if (!$rcube_charsets) @include($INSTLL_PATH.'program/localization/index.inc'); if (isset($rcube_charsets[$lang])) + { $OUTPUT->set_charset($rcube_charsets[$lang]); + $CHARSET = $rcube_charsets[$lang]; + } else + { $OUTPUT->set_charset('ISO-8859-1'); + $CHARSET = 'ISO-8859-1'; + } } @@ -573,6 +583,7 @@ // replace all strings ($varname) with the content of the according global variable function parse_with_globals($input) { + $GLOBALS['__comm_path'] = $GLOBALS['COMM_PATH']; $output = preg_replace('/\$(__[a-z0-9_\-]+)/e', '$GLOBALS["\\1"]', $input); return $output; } -- Gitblit v1.9.1