I have entity with title, description and image. Title and description are translatable and want to have this in three languages: en, de and sl. Default locale is sl.
Now I configure a2lix, SonataAdmin and StofDoctrineExtension.
What is the best practice (and of course correct) for using translatable in sonata Admin.
version 1:
$formMapper
->add("title") //default language
->add('description') //default language
->add('image', 'sonata_type_model_list', array(), array('link_parameters' => array('context' => 'default')))
->add('translations', 'a2lix_translations_gedmo', array( // Use the old gedmo strategy
'translatable_class' => 'My\CoreBundle\Entity\SliderTranslation',
));
title and description are separated for default language. Other locales (en, de) are in translatable tabs.
version 2:
$formMapper
->add('image', 'sonata_type_model_list', array(), array('link_parameters' => array('context' => 'default')))
->add('translations', 'a2lix_translations_gedmo', array( // Use the old gedmo strategy
'translatable_class' => 'My\CoreBundle\Entity\SliderTranslation',
));
title and description are not separated and are included in translation tabs. Translation tabs are sl, en and de.