summaryrefslogtreecommitdiff
path: root/www/index.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/index.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/index.php')
-rw-r--r--www/index.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/www/index.php b/www/index.php
index a139c4a..b8cfbf3 100644
--- a/www/index.php
+++ b/www/index.php
@@ -14,8 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/ ?>
-<?
+*/
+
+require_once('../includes/lib/l10n.php');
$id = 0; if(array_key_exists("id",$_REQUEST)) $id=intval($_REQUEST['id']);
$oldid = 0; if(array_key_exists("oldid",$_REQUEST)) $oldid=intval($_REQUEST['oldid']);
@@ -310,18 +311,12 @@
if($_SESSION['profile']['language'] == "")
{
- $query = "update `users` set `language`='".$_SESSION['_config']['language']."'
+ $query = "update `users` set `language`='".L10n::get_translation()."'
where `id`='".$_SESSION['profile']['id']."'";
mysql_query($query);
} else {
- $_SESSION['_config']['language'] = $_SESSION['profile']['language'];
-
- putenv("LANG=".$_SESSION['_config']['language']);
- setlocale(LC_ALL, $_SESSION['_config']['language']);
-
- $domain = 'messages';
- bindtextdomain("$domain", $_SESSION['_config']['filepath']."/locale");
- textdomain("$domain");
+ L10n::set_translation($_SESSION['profile']['language']);
+ L10n::init_gettext();
}
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
$res = mysql_query($query);
@@ -551,7 +546,7 @@
mysql_query($query);
$body = _("Thanks for signing up with CAcert.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!")."\n\n";
- $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; //."&"."lang=".$_SESSION['_config']['language']."\n\n";
+ $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
sendmail($_SESSION['signup']['email'], "[CAcert.org] "._("Mail Probe"), $body, "support@cacert.org", "", "", "CAcert Support");