제 양식에 문제가 있습니다. 메신저 내 모든 필드를 사용하여 message.yml 번역 및 작동합니다. 하지만 VichUploaderBundle의 업로드 버튼도 있습니다. 라벨을 번역 할 수는 있지만, 테스트 할 때 라벨은 영어이지만 버튼은 독일어로되어 있습니다.내 양식에 UploadButton을 번역 할 수 없습니다.
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('id', TextType::class, array('disabled' => true))
->add('title',TextType::class, array('label' => 'edit.title'))
->add('body', TextareaType::class, array('label' => 'edit.body'))
->add('date', DateType::class, array('disabled' => true, 'label' => 'edit.date'))
->add('tags', EntityType::class, array(
'class' => 'AppBundle:Tag',
'choice_label' => 'getTitle',
'multiple'=> true,
'expanded'=> true))
->add(
'technology',
EntityType::class,
array(
'class' => 'AppBundle\Entity\Technology',
'choice_label' => 'getTitle',
'group_by' => 'parent.getTitle',
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('t')
->where('t.parent IS NOT NULL')
->andWhere('SIZE(t.children) <= 0');
}
))
->add('imageFile', VichImageType::class, array(
'required' => false,
'allow_delete' => true,
'download_link' => true,
'label' => 'edit.image_file',
))
;
}
버튼을 번역하는 방법을 모른다.