diff options
author | Renato Botelho <renato@netgate.com> | 2015-12-14 08:55:28 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-12-14 08:55:28 -0200 |
commit | 9ba351c17e4c85e01832e38b6ba7b6a7898a290d (patch) | |
tree | 799c02a092c3d28482fde8d919018f9e31c093c7 /src | |
parent | b74e44592328f9d1770aa395a841c05c7d0960b1 (diff) | |
download | pfsense-9ba351c17e4c85e01832e38b6ba7b6a7898a290d.zip pfsense-9ba351c17e4c85e01832e38b6ba7b6a7898a290d.tar.gz |
Set language early on a common place included everywhere. This fix some tar warnings 'Failed to set locale'
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/config.inc | 12 | ||||
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 9 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/etc/inc/config.inc b/src/etc/inc/config.inc index b3395c8..4c07213 100644 --- a/src/etc/inc/config.inc +++ b/src/etc/inc/config.inc @@ -217,6 +217,18 @@ if (isset($config['system']['timezone']) && } date_default_timezone_set("$timezone"); +/* Set the default interface language */ +if ($config['system']['language'] <> "") { + $g['language'] = $config['system']['language']; +} elseif ($g['language'] == "") { + $g['language'] = 'en_US'; +} + +if (!function_exists('set_language')) { + require_once("pfsense-utils.inc"); +} +set_language($g['language']); + if ($config_parsed == true) { /* process packager manager custom rules */ if (is_dir("/usr/local/pkg/parse_config")) { diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index d9d3def..7c9c7d8 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -87,15 +87,6 @@ require_once("functions.inc"); /* Include the autoloader for all the GUI display classes */ require_once("classes/autoload.inc.php"); -/* Set the default interface language */ -if ($config['system']['language'] <> "") { - $g['language'] = $config['system']['language']; -} elseif ($g['language'] == "") { - $g['language'] = 'en_US'; -} - -set_language($g['language']); - /* used by progress bar */ $lastseen = "-1"; |