","major","")); 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]; if (!$translated) { # if it's a supported language, but there isn't a translation, # alert the visitor to the missing translation. # $translated = "_" . $tag . "_"; } # replace escape substitutions # if (!empty($args)) { while (list($k, $v) = each($args)) { $translated = preg_replace("/\%[sh]/", $v, $translated, 1); } } return $translated; } # vim: ts=2 sw=2 noet ft=php ?>