diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-07 03:53:31 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-10 15:40:50 +0200 |
commit | 22a718ea89bb78e25532d5256dc212cd0bcba94e (patch) | |
tree | 16013085e5bcde79f8dfa06325806febc659f683 /web/lib/aur.inc | |
parent | 779ecc8c3a36f3981453ec81f4c84e42a000f23f (diff) | |
download | aur-22a718ea89bb78e25532d5256dc212cd0bcba94e.tar.gz aur-22a718ea89bb78e25532d5256dc212cd0bcba94e.tar.xz |
Replace translation engine with php-gettext.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/aur.inc')
-rw-r--r-- | web/lib/aur.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 0e494a2d..744b31e6 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -248,10 +248,10 @@ function db_query($query="", $db_handle="") { # set up the visitor's language # function set_lang() { - global $_t; global $LANG; global $SUPPORTED_LANGS; global $PERSISTENT_COOKIE_TIMEOUT; + global $streamer, $l10n; $update_cookie = 0; if (isset($_REQUEST['setlang'])) { @@ -292,9 +292,9 @@ function set_lang() { setcookie("AURLANG", $LANG, $cookie_time, "/"); } - if ($LANG != "en" ) { - include_once("$LANG.po"); - } + $streamer = new FileReader('../locale/' . $LANG . + '/LC_MESSAGES/aur.mo'); + $l10n = new gettext_reader($streamer, true); return; } |