- Function tr() : Correction de la manière de faire.

This commit is contained in:
Benjamin Renard 2009-03-31 12:49:01 +00:00
parent 065ee771d8
commit a6e66a3a69

View file

@ -430,13 +430,13 @@ function LSdebugDefined() {
}
function tr($msg,$key=null) {
if (is_array($msg)) {
echo __($msg[$key]);
}
else {
$val = $GLOBALS['Smarty']->get_template_vars($msg);
if (!$val)
$val=$msg;
if (is_array($val)) {
echo __($val[$key]);
}
else {
echo __($val);
}
}