diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 5ec368442b..1611ef90ef 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -1875,9 +1875,11 @@ class etemplate extends boetemplate $on = str_replace($matches[0],$matches[1],$on); } // we need to search ungready (shortest possible match), to avoid catching to much - if (preg_match('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) { - $str = lang($matches[1]); - $on = str_replace($matches[0],'\''.addslashes($str).'\'',$on); + if (preg_match_all('/egw::lang\(["\']{1}(.*)["\']{1}\)/U',$on,$matches)) { + foreach($matches[1] as $n => $string) { + $str = lang($string); + $on = str_replace($matches[0][$n],'\''.addslashes($str).'\'',$on); + } } // inserts the styles of a named template