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();
}
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);