Using stof DoctrineExtension and a2lix TranslationFormBundle with one ext_translations table?

414 views Asked by At

I know from this thread a2lix TranslationFormBundle AND Gedmo Doctrine Extension Translatable with just one Translation table that it's not possible with Gedmo (to have online one ext_translations table).

Maybe there is another option like using Knp's Doctrine extension or a2lix to make it possible?

Thanks for help,

1

There are 1 answers

1
julie On

I am currently using knplabs/doctrine-behaviors and a2lix/translation-form-bundle to translate the website I am currently working on, and I am 99% sure it is not possible to have only one translation table - at least with the 1.4 version of knplabs/doctrine-behaviors.

When using knplabs/doctrine-behaviors, you need to create your own entity called xxxTranslation (where xxx is the name of the table you want to translate) and use the translatable traits. It automatically creates a column to store foreign keys referencing the original table in the translation table, and I am pretty sure you cannot have foreign keys referencing different tables in the same column.

I do not use a2lix/i18n-doctrine-bundle or prezent/doctrine-translatable but from what I read from the documentation, it seems like they are working like knplabs/doctrine-behaviors so I do not have a solution for you...