From 9c6391e1071d97eab00ebddeb2c83572932fe7c7 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 18 Aug 2006 01:55:27 +0000 Subject: [PATCH] r1061: Gettext should work now. --- includes/init.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/init.php b/includes/init.php index 28b77d3..1484599 100755 --- a/includes/init.php +++ b/includes/init.php @@ -128,11 +128,19 @@ $bugsys->load('localize', 'lang', true); require_once('./includes/language.php'); -$LANGDATA = fetch_user_language(); +$language = fetch_user_language(); -$stylevar['lang'] = $LANGDATA['code']; -$stylevar['lang_dir'] = $LANGDATA['direction']; -$stylevar['charset'] = $LANGDATA['charset']; +$stylevar['lang_domain'] = $language['domain']; +$stylevar['lang_dir'] = $language['direction']; +$stylevar['charset'] = $language['charset']; + +// start gettext engine +setlocale(LC_ALL, $language['domain']); + +bindtextdomain('Bugdar', $bugsys->sourcepath . 'locale'); +textdomain('Bugdar'); + +bind_textdomain_codeset('Bugdar', $language['charset']); // ################################################################### // initialize the date system -- 2.43.5