- 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) { function tr($msg,$key=null) {
$val = $GLOBALS['Smarty']->get_template_vars($msg); if (is_array($msg)) {
if (!$val) echo __($msg[$key]);
$val=$msg;
if (is_array($val)) {
echo __($val[$key]);
} }
else { else {
$val = $GLOBALS['Smarty']->get_template_vars($msg);
if (!$val)
$val=$msg;
echo __($val); echo __($val);
} }
} }