From 5db18a09c4eca4560c117f0b4dcd85d75e7139f2 Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 21 Nov 2008 11:02:01 +0000 Subject: Refactoring: improve defined and imported functions git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@169 b3834d28-1941-0410-a4f8-b48e95affb8f --- header.inc.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'header.inc.php') diff --git a/header.inc.php b/header.inc.php index f94ce0d..f26cb68 100644 --- a/header.inc.php +++ b/header.inc.php @@ -3,7 +3,7 @@ if(!file_exists(dirname(__FILE__) .'/config.inc.php')) { die("Please, create the 'config.inc.php' file. You can copy the 'config.inc.php.example' file."); } -// First requirements part (before debug management) +// 1 // First requirements part (before debug management) require_once(dirname(__FILE__) .'/config.inc.php'); require_once(dirname(__FILE__) .'/constants.inc.php'); // some constants are based on variables from config file @@ -20,12 +20,25 @@ if(DEBUG_MODE) { error_reporting(0); } - -// Second requirements part which could display bugs (must come after debug management) +// 2 // Second requirements part which could display bugs (must come after debug management) require_once(dirname(__FILE__) .'/services/servicefactory.php'); require_once(dirname(__FILE__) .'/functions.inc.php'); +// 3 // Third requirements part which import functions from includes/ directory + +// UTF-8 functions +require_once(dirname(__FILE__) .'/includes/utf8.php'); + +// Translation +require_once(dirname(__FILE__) .'/includes/php-gettext/gettext.inc'); +$domain = 'messages'; +T_setlocale(LC_MESSAGES, $locale); +T_bindtextdomain($domain, dirname(__FILE__) .'/locales'); +T_bind_textdomain_codeset($domain, 'UTF-8'); +T_textdomain($domain); + + session_start(); ?> -- cgit v1.2.3