Dmitry Bykadorov
2011-09-08 12:32:00 UTC
Is there more elegant way to translate form labels? Now I'm using this
solution:
<p>
{{ form_errors(comment_form.author) }}
{{ form_label(comment_form.author, 'token.commentFormName') |
trans | raw }}
{{ form_widget(comment_form.author) }}
</p>
Seems like 'raw' filter not good solution, but when I remove them -
'trans' filter will escaping label's html:
<label for="blogcommenttype_author" class=" required">Name</
label>
--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
solution:
<p>
{{ form_errors(comment_form.author) }}
{{ form_label(comment_form.author, 'token.commentFormName') |
trans | raw }}
{{ form_widget(comment_form.author) }}
</p>
Seems like 'raw' filter not good solution, but when I remove them -
'trans' filter will escaping label's html:
<label for="blogcommenttype_author" class=" required">Name</
label>
--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en