summaryrefslogtreecommitdiffstats
path: root/web/lib/aur.inc.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-06-22 20:57:07 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-06-22 20:57:07 +0200
commit58907e0bffb5a7d2d0bfc05cec28f366432bb3e8 (patch)
treed0567e509e8769d2b1363af45c1b48cf18563715 /web/lib/aur.inc.php
parentadbb59308024bfb6386eaa4a9d1a2eb6591b8456 (diff)
downloadaur-58907e0bffb5a7d2d0bfc05cec28f366432bb3e8.tar.gz
aur-58907e0bffb5a7d2d0bfc05cec28f366432bb3e8.tar.xz
use php's gettext modulegettext
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'web/lib/aur.inc.php')
-rw-r--r--web/lib/aur.inc.php11
1 files changed, 6 insertions, 5 deletions
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;
}