if(isset($EMAIL_REPLY))
$header .= "From: e-DoKo daemon <$EMAIL_REPLY>\r\n";
+ $header .= "Content-Type: text/plain; charset = \"UTF-8\";\r\n";
+ $header .= "Content-Transfer-Encoding: 8bit\r\n";
+ $header .= "\r\n";
+
if($debug)
{
/* display email on screen,
"<a href=\"$1\">$1</a>", $message);
echo "<br />To: $To<br />";
- if($header != "")
- echo $header."<br />";
+ echo $header."<br />";
echo "Subject: $Subject <br />$message<br />\n";
}
else
- if($header != "")
- mail($To,$Subject,$message,$header);
- else
- mail($To,$Subject,$message);
+ mail($To,$Subject,$message,$header);
+
return;
}
$stop = substr($vacation[1],0,10);
$comment = $vacation[2];
- $title = "begin: $start end: $stop $comment";
- echo " <span class=\"vacation\" title=\"$title\">$gravatar (on vacation until $stop)</span> \n";
+ $title = _("begin:")." $start "._("end:")." $stop $comment";
+ echo " <span class=\"vacation\" title=\"$title\">$gravatar "._("(on vacation until $stop)")."</span> \n";
}
else
echo " $gravatar \n";
/* truncate table if we have too many games */
$max = sizeof($score);
- if($max>6) $output.=" (table truncated to last 6 games)\n";
+ if($max>6) $output.=" "._("(table truncated to last 6 games)")."\n";
/* output header */
foreach($score[0]['players'] as $id=>$points)
case 'de':
putenv("LC_ALL=de_DE");
setlocale(LC_ALL, "de_DE");
- // Specify location of translation tables
- bindtextdomain("edoko", "./locale");
- bind_textdomain_codeset("edoko", 'UTF-8');
- // Choose domain
- textdomain("edoko");
break;
default:
- /* do nothing */
+ putenv("LC_ALL=en_US");
+ setlocale(LC_ALL, "en_US");
+ break;
}
+ // Specify location of translation tables
+ bindtextdomain("edoko", "./locale");
+ bind_textdomain_codeset("edoko", 'UTF-8');
+ // Choose domain
+ textdomain("edoko");
+
return;
}