php - Translate empty value in Symfony form -


i have form select box, , field has empty value property. want have translated adding translation_domain doesn't change anything.

<?php  namespace devell\howfolderbundle\form;  use symfony\component\form\abstracttype; use symfony\component\form\formbuilderinterface;  class notetype extends abstracttype { public function buildform(formbuilderinterface $builder, array $options)     {     $builder         ->add('name', 'text')         ->add('body', 'textarea');       $categorychoices = array();      $builder->add('category', 'entity', array(         'class'         => 'howfolderbundle:category',         'empty_value'   => 'note.form.category.choose',         'translation_domain' => 'howfolderbundle'     ));     }  public function getname() {     return "note"; } } 

this should perfectely work it's natively supported since > [form] made possible translate empty value of choice fields.

then problem related translation configuration, check if translation component enabled , configured.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -