From 0ed3bdc31f6c257496fcf726aab6d8a3751679fd Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 14 Mar 2004 11:01:15 +0000 Subject: [PATCH] Adding some i18n checks git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6794 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/configtest.php | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/configtest.php b/src/configtest.php index bc0b9528..2deb8390 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -230,9 +230,49 @@ fclose($stream); echo $IND . 'IMAP server OK ('.trim($imapline).")
\n"; +echo "Checking i18n settings:
\n"; +echo "$IND gettext - "; +if (function_exists('gettext')) { + echo "Gettext functions are available. You must have appropriate system locales compiled.
\n"; +} else { + echo "Gettext functions are unavailable. SquirrelMail will use slower internal gettext functions.
\n"; +} +echo "$IND mbstring - "; +if (function_exists('mb_detect_encoding')) { + echo "Mbstring functions are available.
\n"; +} else { + echo "Mbstring functions are unavailable. Japanese translation won't work.
\n"; +} +echo "$IND recode - "; +if (function_exists('recode')) { + echo "Recode functions are available.
\n"; +} elseif ($use_php_recode) { + echo "Recode functions are unavailable.
\n"; + do_err('Your configuration requires recode support, but recode support is missing.'); +} else { + echo "Recode functions are unavailable.
\n"; +} +echo "$IND iconv - "; +if (function_exists('iconv')) { + echo "Iconv functions are available.
\n"; +} elseif ($use_php_iconv) { + echo "Iconv functions are unavailable.
\n"; + do_err('Your configuration requires iconv support, but iconv support is missing.'); +} else { + echo "Iconv functions are unavailable.
\n"; +} +// same test as in include/validate.php +echo "$IND timezone - "; +if ( (!ini_get('safe_mode')) || + !strcmp(ini_get('safe_mode_allowed_env_vars'),'') || + preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars')) ) { + echo "Webmail users can change their time zone settings."; +} else { + echo "Webmail users can't change their time zone settings."; +} + // other possible checks: // ? prefs/abook DSN -// ? locale/gettext // ? actually start a session to see if it works // ? ... ?> -- 2.25.1