From: Andrew Dolgov Date: Sat, 19 May 2007 05:13:35 +0000 (+0100) Subject: properly enable gettext stuff when needed X-Git-Tag: 1.2.11~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=865220a488b853f25f15f5516c848ee540fa7361;p=tt-rss.git properly enable gettext stuff when needed --- diff --git a/functions.php b/functions.php index d3245ce5..0336602e 100644 --- a/functions.php +++ b/functions.php @@ -6,22 +6,11 @@ define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE); } */ - if (ENABLE_TRANSLATIONS == true) { - require_once "accept-to-gettext.php"; - require_once "gettext/gettext.inc"; - } else { - function __($msg) { - return $msg; - } - function startup_gettext() { - // no-op - return true; - } - } - require_once 'config.php'; if (ENABLE_TRANSLATIONS == true) { + require_once "accept-to-gettext.php"; + require_once "gettext/gettext.inc"; function startup_gettext() { @@ -37,6 +26,15 @@ } startup_gettext(); + + } else { + function __($msg) { + return $msg; + } + function startup_gettext() { + // no-op + return true; + } } require_once 'db-prefs.php';