Bug #3250

Translation of form.submit

Added by Sebastian Fischer over 12 years ago. Updated about 11 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Start date:
2009-05-08
Due date:
% Done:

0%

Estimated time:

Description

Currently its impossible to translate form.submit

<f:form.submit><f:translate key="lang_submit"/></f:form.submit>

This construct doesn't work. And in viewhelpertest is no matching example given. And no $this->renderChildren(); is given in SubmitViewHelper.php

#1

Updated by Sebastian Fischer over 12 years ago

public function render($name = '', $value = '') {
$this->tag->addAttribute('type', 'submit');
if ($name !== '') {
$this->tag->addAttribute('name', $name);
}
$content = $this->renderChildren();
if ($content != '') {
$value = $content;
}

if ($value !== '') {
$this->tag->addAttribute('value', $value);
}

return $this->tag->render();
}

Here the $value is set with result of renderChildren and now translation works. If renderChildren is empty the default value that is still possible isn't overwritten.

Also available in: Atom PDF