summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
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");
}