mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
system: fix legacy language handing
gettext 0.22.5 broke legacy translation but MVC kept working so digging through the code this is the additional env vars and setting that Phalcon does.
This commit is contained in:
parent
faf6ab7f21
commit
22e6befe7c
@ -53,9 +53,14 @@ function set_language()
|
||||
}
|
||||
|
||||
$lang_encoding = $lang . '.UTF-8';
|
||||
$textdomain = 'OPNsense';
|
||||
|
||||
putenv('LANG=' . $lang_encoding);
|
||||
putenv('LANGUAGE=' . $lang_encoding);
|
||||
putenv('LC_ALL=' . $lang_encoding);
|
||||
setlocale(LC_ALL, $lang_encoding);
|
||||
|
||||
$textdomain = 'OPNsense';
|
||||
|
||||
textdomain($textdomain);
|
||||
bindtextdomain($textdomain, '/usr/local/share/locale');
|
||||
bind_textdomain_codeset($textdomain, $lang_encoding);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user