08.06.2009, 21:03
Code:
{php} $var = ((is_array($_tmp=$this->_tpl_vars['array']['end_time'])) ? $this->_run_mod_handler('format_date', true, $_tmp) : format_date($_tmp));
$var2 = preg_replace("/morgen um/","Mañana a las",$var);
$var3 = preg_replace("/heute um/","Hoy a las",$var);
$var4 = preg_replace("/am/","El",$var);
$var4b = preg_replace("/um/","a las",$var4);
if (substr($var2, 0, 2) == Ma)
{
echo substr($var2, 0, -3);
}
else
{
if (substr($var3, 0, 2) == Ho)
{
echo substr($var3, 0, -3);
}
else
{
echo substr($var4b, 0, -3);
}
} {/php}