Sonata issue admin + a2lix + gedmo translatable

I am trying to use sonata admin + a2lix + gedmo translatable to translate my objects.

Unfortunately, this will not work, because I expect to see my translatable fields in the form, while in my backend I see this “content field”:

field content http://i44.tinypic.com/291golk.jpg

I followed these tutorials:

http://a2lix.fr/bundles/translation-form/

http://www.elao.com/blog/symfony-2/doctrine-2/how-to-manage-translations-for-your-object-using-sonataadminbundle.html

and package documentation.

Here you can find all the code that I wrote: https://gist.github.com/itxavia/8416920

I am sure that the translated annotation used is good, because I tried to use these entities with PugX (another “admin generator”), and everything works fine ... but I need a sonata administrator, because he got some functions that PugX didn't has, so I want this code to work.

Do you have experience with sonata admin, a2lix and gedmo to get translatable objects?

Could you give me some advice?

thanks a lot

Regards

+4
source share
1 answer

, , , . , v2 a2lix/translation-form-bundle gedmo, wip 2.4.0 , stofDoctrineIntegration. , 1. * a2lix/translation-form-bundle, composer.json:

"a2lix/translation-form-bundle": "1.*@dev"

Sonata, :

$formMapper
    ->add('translations', 'a2lix_translations_gedmo', array(   // Use the old gedmo strategy
        'translatable_class' => 'Your\Translatable\Entity\Class', 
));

, !

+5

All Articles