translation
translation copied to clipboard
<button> element in forms is not translated properly
When I use <button>
element instead of <input>
, it translates value parameter instead of the body of the button:
presenter:
$form->setTranslator($this->translator->createPrefixedTranslator('admin.myForm'));
$form->addSubmit('sub', 'update');
latte:
<input n:name="sub"> // generates <input type="submit" name="sub" value="Aktualizovat">
<button n:name="sub" /> // generates <button type="submit" name="sub" value="Aktualizovat">update</button>