1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-09 05:19:15 +00:00

check whether LC_MESSAGES or LC_ALL are defined before enabling translations

This commit is contained in:
Andrew Dolgov
2008-04-03 11:19:16 +01:00
parent 372481cc39
commit 86e2e1b9fa

View File

@@ -46,7 +46,13 @@
}
if ($lang) {
_setlocale(LC_MESSAGES, $lang);
if (defined('LC_MESSAGES')) {
_setlocale(LC_MESSAGES, $lang);
} else if (defined('LC_ALL')) {
_setlocale(LC_ALL, $lang);
} else {
die("can't setlocale(): please set ENABLE_TRANSLATIONS to false in config.php");
}
_bindtextdomain("messages", "locale");
_textdomain("messages");
_bind_textdomain_codeset("messages", "UTF-8");