I need for a project translated entities and an easy way to maintain the content. One "myentity" can have many "myentity_trans".
This is easy so far, but I need a dynamic form in a easy way without changing too much in symfony2 default behaviour.
When I create/edit a "myentity", I need a "myentity_trans" subform for every language. Is there a common way to handle all this?
My Entities as example:
myentity
- id
- status
myentity_trans
- id
- myentity_id
- language_id
- ...
language
- id
- name
EDIT 1: Here my form configuration that works on edit, if I got related entities:
$builder
->add('name')
->add('trans', 'collection', array(
'type' => new RetailerTransType(),
'allow_add' => true,
'allow_delete' => true
));
Now I like empty forms for every possible language, so the user can easy create the translations. I tried to use the query builder, but it obviously don't work with collection type.