summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorVinicius Coque <vcoque@gmail.com>2012-02-27 20:58:53 -0300
committerVinicius Coque <vcoque@gmail.com>2012-02-27 20:58:53 -0300
commit3e139f90ad11100f24772d5d4ae1427469a8c7aa (patch)
treeeb9c6230e9f98f53dd118cc0a13872a74083d9b9 /etc/inc
parentd54353aea7e956c6edae9cf4a91036f71079d924 (diff)
downloadpfsense-3e139f90ad11100f24772d5d4ae1427469a8c7aa.zip
pfsense-3e139f90ad11100f24772d5d4ae1427469a8c7aa.tar.gz
Adding multi-language support to WebGUI
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index b0a93a2..a65db13 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2291,4 +2291,19 @@ function pfSense_handle_custom_code($src_dir) {
}
}
+function set_language($lang = 'en_US', $encoding = "ISO8859-1") {
+ putenv("LANG={$lang}.{$encoding}");
+ setlocale(LC_ALL, "{$lang}.{$encoding}");
+ textdomain("pfSense");
+ bindtextdomain("pfSense","/usr/share/locale");
+ bind_textdomain_codeset("pfSense","{$lang}.{$encoding}");
+}
+
+function get_locale_list() {
+ $locales = array(
+ "en_US" => gettext("English"),
+ );
+ asort($locales);
+ return $locales;
+}
?>
OpenPOWER on IntegriCloud