properly enable gettext stuff when needed

This commit is contained in:
Andrew Dolgov 2007-05-19 06:13:35 +01:00
parent de5b8ebcda
commit 865220a488
1 changed files with 11 additions and 13 deletions

View File

@ -6,22 +6,11 @@
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE); 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'; require_once 'config.php';
if (ENABLE_TRANSLATIONS == true) { if (ENABLE_TRANSLATIONS == true) {
require_once "accept-to-gettext.php";
require_once "gettext/gettext.inc";
function startup_gettext() { function startup_gettext() {
@ -37,6 +26,15 @@
} }
startup_gettext(); startup_gettext();
} else {
function __($msg) {
return $msg;
}
function startup_gettext() {
// no-op
return true;
}
} }
require_once 'db-prefs.php'; require_once 'db-prefs.php';