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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user