From aba609e088f311093d329d4d96f38673e6a9540c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 6 Mar 2007 11:33:06 +0100 Subject: move function startup_gettext --- functions.php | 26 +++++++++++++------------- update_daemon.php | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/functions.php b/functions.php index ba92b2ee4..f05151369 100644 --- a/functions.php +++ b/functions.php @@ -11,6 +11,19 @@ require_once 'config.php'; + function startup_gettext() { + + # Get locale from Accept-Language header + $lang = al2gt(array("en_US", "ru_RU"), "text/html"); + + if ($lang) { + _setlocale(LC_MESSAGES, $lang); + _bindtextdomain("messages", "locale"); + _textdomain("messages"); + _bind_textdomain_codeset("messages", "UTF-8"); + } + } + if (ENABLE_TRANSLATIONS == true) { startup_gettext(); } @@ -3203,19 +3216,6 @@ return print format_warning($msg); } - function startup_gettext() { - - # Get locale from Accept-Language header - $lang = al2gt(array("en_US", "ru_RU"), "text/html"); - - if ($lang) { - _setlocale(LC_MESSAGES, $lang); - _bindtextdomain("messages", "locale"); - _textdomain("messages"); - _bind_textdomain_codeset("messages", "UTF-8"); - } - } - function T_sprintf() { $args = func_get_args(); return vsprintf(__(array_shift($args)), $args); diff --git a/update_daemon.php b/update_daemon.php index 312001a17..77660f09d 100644 --- a/update_daemon.php +++ b/update_daemon.php @@ -4,6 +4,7 @@ // continuously define('DEFAULT_ERROR_LEVEL', E_ALL); + error_reporting(E_ALL); declare(ticks = 1); -- cgit v1.2.3