[Feature] Allow additional translations dynamically
Subject
In one of my current project, I had to allow additional translations directly from user interface.
This feature doesn't exist in this bundle, so I create a TranslationsTypeExtension (and few other code) to add this behavior.
I would like to know if you could be interested to add this behavior inside this bundle ?
The work is done via a new EventSubscriber, a little modification in widget and a short js class.
Example
$form->add('translations', TranslationsType::class, [
'allow_additional_translations' => true,
'fields' => [
//...
],
]);
Screenshot

@webda2l WDYT?
@Phenix789 I would be interrested in getting your solution, would you mind share it? I have the exact same need: let people to add their own translation at runtime.
I've tried to basically duplicate english field and tab, but their submission to the form is not taken into account.
@Thibibi Thanks for your interrest, but I'm not anymore on this projet from few years.
But, the code wasn't so difficult if you understand the Form extension.
Have a look to Form CollectionType too.
Basically, if I remember, I had a TranslationsTypeExtension to add property allow_additional_translations.
An event listener to handle the dynamic translations.
And finally, a short js class to manage the + button and the html template.
Sorry, I can't help you more ...
And, I think with latest Symfony version, some part should be easier.