finished tweaking language selection

This commit is contained in:
eric 2004-06-19 14:36:22 +00:00
parent 74594e516d
commit 22e8556691
17 changed files with 303 additions and 20 deletions

View file

@ -25,23 +25,8 @@ include_once("common_po.inc");
function __($tag, $args=array()) {
global $_t;
global $_REQUEST;
global $LANG;
$supported_langs = array(
"en" => 1, # English
"es" => 1, # Español
"de" => 1, # Deutsch
"fr" => 1, # Français
);
# default to English if the lang hasn't been provided or isn't supported
#
$LANG = $_REQUEST['LANG'];
if (!$LANG || !array_key_exists($LANG, $supported_langs)) {
$LANG = "en";
}
# create the translation, if it doesn't exist, highlight it
#
$translated = $_t[$LANG][$tag];