From 58907e0bffb5a7d2d0bfc05cec28f366432bb3e8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 22 Jun 2011 20:57:07 +0200 Subject: use php's gettext module Signed-off-by: Florian Pritz --- web/lib/aur.inc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'web/lib/aur.inc.php') diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index 382578c0..8b5787bd 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php @@ -7,10 +7,10 @@ header('Pragma: no-cache'); date_default_timezone_set('UTC'); -include_once('translator.inc.php'); +include_once("config.inc.php"); + set_lang(); -include_once("config.inc.php"); include_once("version.inc.php"); include_once("acctfuncs.inc.php"); include_once("cachefuncs.inc.php"); @@ -295,9 +295,10 @@ function set_lang() { setcookie("AURLANG", $LANG, $cookie_time, "/"); } - $streamer = new FileReader('../locale/' . $LANG . - '/LC_MESSAGES/aur.mo'); - $l10n = new gettext_reader($streamer, true); + var_dump(setlocale(LC_MESSAGES, $LANG.".UTF-8")); + bindtextdomain("aur", '../locale'); + textdomain("aur"); + bind_textdomain_codeset("aur", 'UTF-8'); return; } -- cgit v1.2.3-24-g4f1b