Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony form choice disable translator

Tags:

php

symfony

I having issues with choice fields which are translated while they shouldn't have to be translated. Since Symfony 2.7 the toolbar notifies you when there are untranslatable values on the current page. Now I'm actually getting confronted with the fact that this happens. Prior to 2.7 this just got logged, but nothing actually happened with it. In the case of Form field 'date' all the digits are attempted to be translated.

What I'm looking for is a way to disable the translator on a choice field, so that the options are not translated. It could be as simple as setting the translation_domain = null or translate = false or something like that.

Any thoughts?

like image 237
Rico Humme Avatar asked Dec 09 '22 02:12

Rico Humme


1 Answers

Starting from Symfony 2.7, you can use choice_translation_domain option (see Pull Request #13651)

like image 116
Yassine Guedidi Avatar answered Dec 10 '22 22:12

Yassine Guedidi