28 function smarty_function_translate($params, Smarty_Internal_Template $template) {
30 foreach (array_keys($params) as $key) {
31 if (preg_match(
"/^r[0-9]+$/", $key)) {
32 $variables[] = $params[$key];
35 $message = ObjectFactory::getInstance(
'message');
36 $value = isset($params[
'text']) ? $message->getText($params[
'text'], $variables, isset($params[
'lang']) ? $params[
'lang'] :
null) :
"";
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...