check whether LC_MESSAGES or LC_ALL are defined before enabling translations
This commit is contained in:
parent
372481cc39
commit
86e2e1b9fa
|
@ -46,7 +46,13 @@
|
|||
}
|
||||
|
||||
if ($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");
|
||||
|
|
Loading…
Reference in New Issue