// receiving input from HTTP forms
header ("Content-Type: text/html; charset=iso-8859-1");
- // Setting the language to use for gettext if it is not English
- // (the default language) or empty.
- $squirrelmail_language = getPref ($data_dir, $username, "language");
- if ($squirrelmail_language != "en" && $squirrelmail_language != "") {
- putenv("LANG=$squirrelmail_language");
- bindtextdomain("squirrelmail", "../locale/");
- textdomain("squirrelmail");
-
- // Setting cookie to use on the login screen the next time the
- // same user logs in.
- setcookie("squirrelmail_language", $squirrelmail_language,
- time()+2592000);
+ // Check to see if gettext is installed
+ if (function_exists("_")) {
+ // Setting the language to use for gettext if it is not English
+ // (the default language) or empty.
+ $squirrelmail_language = getPref ($data_dir, $username, "language");
+ if ($squirrelmail_language != "en" && $squirrelmail_language != "") {
+ putenv("LANG=$squirrelmail_language");
+ bindtextdomain("squirrelmail", "../locale/");
+ textdomain("squirrelmail");
+
+ // Setting cookie to use on the login screen the next time the
+ // same user logs in.
+ setcookie("squirrelmail_language", $squirrelmail_language,
+ time()+2592000);
+ }
+ } else {
+ function _($string) {
+ return $string;
+ }
}
function displayPageHeader($color, $mailbox) {
if (!isset($strings_php))
include("../functions/strings.php");
- // $squirrelmail_language is set by a cookie when the user selects
- // language
- if (isset($squirrelmail_language)) {
- if ($squirrelmail_language != "en") {
- putenv("LANG=".$squirrelmail_language);
- bindtextdomain("squirrelmail", "../locale/");
- textdomain("squirrelmail");
+ // let's check to see if they compiled with gettext support
+ if (!function_exists("_")) {
+ function _($string) {
+ return $string;
+ }
+ } else {
+ // $squirrelmail_language is set by a cookie when the user selects
+ // language
+ if (isset($squirrelmail_language)) {
+ if ($squirrelmail_language != "en") {
+ putenv("LANG=".$squirrelmail_language);
+ bindtextdomain("squirrelmail", "../locale/");
+ textdomain("squirrelmail");
+ }
}
}
echo "</TITLE></HEAD>\n";
echo "<BODY TEXT=000000 BGCOLOR=FFFFFF LINK=0000CC VLINK=0000CC ALINK=0000CC>\n";
- // let's check to see if they compiled with gettext support
- if (!function_exists("_")) {
- echo "<CENTER>PHP was not configured --with-gettext. Reconfigure and try again.</CENTER></BODY></HTML>";
- exit;
- }
-
echo "<FORM ACTION=webmail.php METHOD=\"POST\" NAME=f>\n";
echo "<CENTER><IMG SRC=\"$org_logo\"</CENTER>\n";
echo "<CENTER><SMALL>";