1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-27 15:41:28 +00:00

add php-gettext, i18n stuff

This commit is contained in:
Andrew Dolgov
2007-03-05 09:37:13 +01:00
parent 439bbe63ef
commit 659468ebf0
10 changed files with 1258 additions and 2 deletions

View File

@@ -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");
}
}
?>