1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-21 20:01:28 +00:00

translations support for mobile version

This commit is contained in:
Andrew Dolgov
2008-12-16 08:13:09 +01:00
parent ed0551c274
commit 7c33dbd479
4 changed files with 109 additions and 3 deletions

View File

@@ -53,6 +53,12 @@
$lang = $_COOKIE["ttrss_lang"];
}
/* In login action of mobile version */
if ($_POST["language"] && defined('MOBILE_VERSION')) {
$lang = $_POST["language"];
$_COOKIE["ttrss_lang"] = $lang;
}
if ($lang) {
if (defined('LC_MESSAGES')) {
_setlocale(LC_MESSAGES, $lang);
@@ -61,7 +67,13 @@
} else {
die("can't setlocale(): please set ENABLE_TRANSLATIONS to false in config.php");
}
_bindtextdomain("messages", "locale");
if (defined('MOBILE_VERSION')) {
_bindtextdomain("messages", "../locale");
} else {
_bindtextdomain("messages", "locale");
}
_textdomain("messages");
_bind_textdomain_codeset("messages", "UTF-8");
}