在Symfony生成的表单中,我想翻译子选项,这怎么办?如何在formtype中翻译symfony dropbox选择
->add('business', 'choice', array(
'choices' => array('Zakelijk' => true, 'Prive' => false),
'expanded' => true,
'multiple' => false,
'choices_as_values' => true,
))
我试图在上面的代码中直接包含标准的symfony翻译代码,但后来我得到一个php错误。
$this->get('translator')->trans('business');