Closed
Description
Description
There is a label_translation_parameters
option (cf https://symfony.com/doc/current/reference/forms/types/choice.html#label-translation-parameters). In the same way, there is a attr_translation_parameters
and help_translation_parameters
.
IMHO, a choice_translation_parameters
option could be great.
Example
# translations/messages.en.yaml
form.order.ok: 'I want to confirm the order made to %company%'
form.order.ko: 'I want to cancel the order made to %company%'
$builder->add('order', null, [
'choices' => [
'form.order.ok' => true,
'form.order.ko' => false,
],
'choice_translation_parameters' => [
'%company%' => 'ACME Inc.',
],
]);