diff options
author | Andrew Dolgov <[email protected]> | 2008-12-16 08:13:09 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-12-16 08:13:09 +0100 |
commit | 7c33dbd479df8b95c0ec05dcacad0666d9550194 (patch) | |
tree | 1cf76c816f49dba8cf555c2d217f9480db23f55b /functions.php | |
parent | ed0551c27442c87442c4e6ada790eabc8fc34f77 (diff) |
translations support for mobile version
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/functions.php b/functions.php index bb8586719..38b11c665 100644 --- a/functions.php +++ b/functions.php @@ -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"); } |