From 6a214f923d789437cda609964d33066338a246e6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 11 Aug 2007 16:40:27 +0100 Subject: update translations --- functions.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index f9d91e86e..416cf3332 100644 --- a/functions.php +++ b/functions.php @@ -9,10 +9,12 @@ require_once 'config.php'; function get_translations() { - $tr = array("en_US" => "English", - "ru_RU" => "Russian", - "fr_FR" => "French", - "zh_CN" => "Chinese"); + $tr = array( + "" => "Detect automatically", + "en_US" => "English", + "fr_FR" => "Français", + "ru_RU" => "Русский", + "zh_CN" => "Simplified Chinese"); return $tr; } @@ -24,7 +26,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_keys(get_translations()), "text/html"); if (defined('_TRANSLATION_OVERRIDE_DEFAULT')) { $lang = _TRANSLATION_OVERRIDE_DEFAULT; -- cgit v1.2.3