TYPO3 Flow Base DistributionPackagesApplications

Bug #3250

Translation of form.submit

Added by Sebastian Fischer about 6 years ago. Updated almost 5 years ago.

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

0%

Category:-
Target version:-

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

History

#1 Updated by Sebastian Fischer about 6 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