use data dir for locales

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@513 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2009-11-04 21:33:03 +00:00
parent c63d8de4d7
commit 1b11e826fb

View file

@ -52,7 +52,7 @@ require_once 'SemanticScuttle/utf8.php';
require_once 'php-gettext/gettext.inc'; require_once 'php-gettext/gettext.inc';
$domain = 'messages'; $domain = 'messages';
T_setlocale(LC_MESSAGES, $locale); T_setlocale(LC_MESSAGES, $locale);
T_bindtextdomain($domain, dirname(__FILE__) . '/locales'); T_bindtextdomain($domain, realpath($datadir . 'locales/'));
T_bind_textdomain_codeset($domain, 'UTF-8'); T_bind_textdomain_codeset($domain, 'UTF-8');
T_textdomain($domain); T_textdomain($domain);
@ -83,7 +83,7 @@ $tplVars = array();
$tplVars['currentUser'] = $currentUser; $tplVars['currentUser'] = $currentUser;
$tplVars['userservice'] = $userservice; $tplVars['userservice'] = $userservice;
// 6 // Force UTF-8 behaviour for server (cannot be move into top.inc.php which is not included into every file) // 6 // Force UTF-8 behaviour for server (cannot be moved into top.inc.php which is not included into every file)
if (!defined('UNIT_TEST_MODE')) { if (!defined('UNIT_TEST_MODE')) {
header('Content-Type: text/html; charset=utf-8'); header('Content-Type: text/html; charset=utf-8');
} }