StofDoctrineExtensionsBundle icon indicating copy to clipboard operation
StofDoctrineExtensionsBundle copied to clipboard

the LocaleListener forces the translation of default locale

Open skonsoft opened this issue 13 years ago • 0 comments

the issue is:

I have a dictionnary entity called Keyword has label as attribute. this attribute (label) is translatable. It is just a keyword and a really word. so when i try to translate it to french language i got:

 An exception occurred while executing 'INSERT INTO keyword_translation (locale, field, content, object_id) VALUES (?, ?, ?, ?)' with params {"1":"fr","2":"label","3":"orsaa","4":43}:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'fr-43-label' for key 'keyword_lookup_unique_idx'
500 Internal Server Error - DBALException 

This was happend because, the LocaleListener forces the use of my default locale which is french. So, Please can you remove this listener or add a configuration in config.yml to enable/disable the translation of default locale.

it is explained in: official blog of gedemo

skonsoft avatar Aug 28 '12 22:08 skonsoft