From 0e055cd6319374f9b7df5cc4b762aded7c5b52d2 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Fri, 15 Aug 2008 16:10:35 +0000 Subject: T() now accepts values like ET() but uses Q() to quote them --- auto_prepend.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'auto_prepend.php') diff --git a/auto_prepend.php b/auto_prepend.php index d026017..6bcd03c 100644 --- a/auto_prepend.php +++ b/auto_prepend.php @@ -92,13 +92,18 @@ function EDX() /** * Return a text in the selected language * @param $label Label of text to return - * @param $language Optional language to return text in + * @param $language Optional value array or language string + * @param $values Optional value array or language string * @return Localized text string */ -function T($label, $language = null, $dummy = null) +function T($label, $language = null, $values = null) { it_text::init(); - return $GLOBALS['it_text']->text($label, $language, $dummy); + + if (is_array($language)) # Need to swap params? + list($language, $values) = array($values, $language); + + return is_array($values) ? $GLOBALS['it_text']->etext($label, array_map(array("it_html", "Q"), $values), $language) : $GLOBALS['it_text']->text($label, $language); } /** -- cgit v1.2.3