summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index f714abc4a..2e97ddb2c 100644
--- a/functions.php
+++ b/functions.php
@@ -18,6 +18,9 @@
require_once "magpierss/rss_fetch.inc";
require_once 'magpierss/rss_utils.inc';
+ require_once "accept-to-gettext.php";
+ require_once "gettext/gettext.inc";
+
function purge_feed($link, $feed_id, $purge_interval, $debug = false) {
$rows = -1;
@@ -3184,4 +3187,17 @@
<img src=\"images/sign_info.png\">$msg</div>";
}
+ 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");
+ }
+ }
+
?>