summaryrefslogtreecommitdiff
path: root/www/wot.php
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-10-16 22:47:02 +0200
committerMichael Tänzer <neo@nhng.de>2011-10-16 22:47:02 +0200
commit883ea6270b45e2d712a71d8361fb4a4daffb12a9 (patch)
treed33236ed3dd40c3ee0df536cf6e4e9f4f3a0de97 /www/wot.php
parent147cce7acd3ce673c494dc9b30f36b3d5554abea (diff)
downloadcacert-devel-883ea6270b45e2d712a71d8361fb4a4daffb12a9.tar.gz
cacert-devel-883ea6270b45e2d712a71d8361fb4a4daffb12a9.tar.xz
cacert-devel-883ea6270b45e2d712a71d8361fb4a4daffb12a9.zip
bug 985: move binding to a gettext domain into a separate method and
update some more legacy language handling removed screenshot() as it's never used and language dependent still open: translation in PDFs Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www/wot.php')
-rw-r--r--www/wot.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/www/wot.php b/www/wot.php
index 33ce4bb..904046e 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -321,13 +321,9 @@
$_SESSION['profile']['points'] += $addpoints;
}
- if($_SESSION['_config']['notarise']['language'] != "")
- {
- $userlang = $_SESSION['_config']['notarise']['language'];
- putenv("LANG=".$userlang);
- setlocale(LC_ALL, $userlang);
- }
-
+ $my_translation = L10n::get_translation();
+ L10n::set_translation($_SESSION['_config']['notarise']['language']);
+
$body = sprintf(_("You are receiving this email because you have been assured by %s %s (%s)."), $_SESSION['profile']['fname'], $_SESSION['profile']['lname'], $_SESSION['profile']['email'])."\n\n";
if($_POST['points'] != $newpoints)
$body .= sprintf(_("You were issued %s points however the system has rounded this down to %s and you now have %s points in total."), $_POST['points'], $newpoints, ($newpoints + $drow['total']))."\n\n";
@@ -358,8 +354,7 @@
sendmail($_SESSION['_config']['notarise']['email'], "[CAcert.org] "._("You've been Assured."), $body, "support@cacert.org", "", "", "CAcert Website");
- putenv("LANG=".$_SESSION['profile']['language']);
- setlocale(LC_ALL, $_SESSION['profile']['language']);
+ L10n::set_translation($my_translation);
$body = sprintf(_("You are receiving this email because you have assured %s %s (%s)."), $_SESSION['_config']['notarise']['fname'], $_SESSION['_config']['notarise']['lname'], $_SESSION['_config']['notarise']['email'])."\n\n";
if($_POST['points'] != $newpoints)