nette / forms

📝 Generating, validating and processing secure forms in PHP. Handy API, fully customizable, server & client side validation and mature design.

Home Page:https://doc.nette.org/forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Translator don't translate values in selectbox

carstomas opened this issue · comments

If it's used

$form->setTranslator($translator);

and

$form->addSelect('select')
->setItems(['trans1', 'trans2'], FALSE);

trans1 --> foo
trans2 --> bar

Result HTML is:

<select name="select">
<option value="trans1">foo</option>
<option value="trans2">bar</option>
</select>

instead of

<select name="select">
<option value="foo">foo</option>
<option value="bar">bar</option>
</select>
<select name="select">
<option value="trans1">foo</option>
<option value="trans2">bar</option>
</select>

seems correct to me, values are translated.