", ""); include_once('config.inc'); global $_t; function __() { global $_t; global $LANG; # Create the translation. $args = func_get_args(); # First argument is always string to be translated $tag = $args[0]; # If there is no translation, just print the given string. if (empty($_t[$tag])) { $translated = $tag; } else { $translated = $_t[$tag]; } $translated = htmlspecialchars($translated, ENT_QUOTES); $num_args = sizeof($args); # Subsequent arguments are strings to be formatted # # TODO: make this more robust. # '%%' should translate to a literal '%' if ( $num_args > 1 ) { for ($i = 1; $i < $num_args; $i++) { $translated = preg_replace("/\%[sh]/", $args[$i], $translated, 1); } } return $translated; }