27 function smarty_function_localize(array $params, Smarty_Internal_Template $template) {
28 $language = $params[
'lang'];
29 $node = $params[
'node'];
30 $attribute = $params[
'attribute'];
32 $defaultAttr = $attribute.
'_'.$language;
33 $defaultValue = $node->getValue($defaultAttr);
38 $fallbackAttr = $attribute.
'_de';
39 return $node->getValue($fallbackAttr);