|
|
@ -6,25 +6,36 @@
|
|
|
|
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
|
|
|
|
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
|
|
|
|
} */
|
|
|
|
} */
|
|
|
|
|
|
|
|
|
|
|
|
require_once "accept-to-gettext.php";
|
|
|
|
if (ENABLE_TRANSLATIONS == true) {
|
|
|
|
require_once "gettext/gettext.inc";
|
|
|
|
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';
|
|
|
|
|
|
|
|
|
|
|
|
function startup_gettext() {
|
|
|
|
if (ENABLE_TRANSLATIONS == true) {
|
|
|
|
|
|
|
|
|
|
|
|
# Get locale from Accept-Language header
|
|
|
|
|
|
|
|
$lang = al2gt(array("en_US", "ru_RU"), "text/html");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($lang) {
|
|
|
|
function startup_gettext() {
|
|
|
|
_setlocale(LC_MESSAGES, $lang);
|
|
|
|
|
|
|
|
_bindtextdomain("messages", "locale");
|
|
|
|
# Get locale from Accept-Language header
|
|
|
|
_textdomain("messages");
|
|
|
|
$lang = al2gt(array("en_US", "ru_RU"), "text/html");
|
|
|
|
_bind_textdomain_codeset("messages", "UTF-8");
|
|
|
|
|
|
|
|
|
|
|
|
if ($lang) {
|
|
|
|
|
|
|
|
_setlocale(LC_MESSAGES, $lang);
|
|
|
|
|
|
|
|
_bindtextdomain("messages", "locale");
|
|
|
|
|
|
|
|
_textdomain("messages");
|
|
|
|
|
|
|
|
_bind_textdomain_codeset("messages", "UTF-8");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ENABLE_TRANSLATIONS == true) {
|
|
|
|
|
|
|
|
startup_gettext();
|
|
|
|
startup_gettext();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|