summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-11 14:22:35 +0100
committerAndrew Dolgov <[email protected]>2007-08-11 14:22:35 +0100
commit0e214bce674e6ad9a51c40abd5f1cbc14752f2ce (patch)
tree38c1992b1382d1f6ef5fffe4f4cca93689b1bc38 /functions.php
parent1d5e9fb908790f43eef5d383604c6285bb6614b9 (diff)
add lang dropbox on login form
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index cd30b4560..a1ec8fa4b 100644
--- a/functions.php
+++ b/functions.php
@@ -8,6 +8,16 @@
require_once 'config.php';
+ function get_translations() {
+ $translations = array(
+ "en_US" => __("English"),
+ "ru_RU" => __("Russian"),
+ "zh_CN" => __("Chinese"),
+ "fr_FR" => __("French"));
+
+ return $translations;
+ }
+
if (ENABLE_TRANSLATIONS == true) {
require_once "accept-to-gettext.php";
require_once "gettext/gettext.inc";
@@ -15,7 +25,7 @@
function startup_gettext() {
# Get locale from Accept-Language header
- $lang = al2gt(array("en_US", "ru_RU", "zh_CN", "fr_FR"), "text/html");
+ $lang = al2gt(array(array_keys(get_translations())), "text/html");
if (defined('_TRANSLATION_OVERRIDE_DEFAULT')) {
$lang = _TRANSLATION_OVERRIDE_DEFAULT;