Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where to change translationFallback to true in symfony 2 doctrine translatable

I need to switch 'translation fallback' and 'persistDefaultLocaleTranslation' on. I know how to change it: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/translatable.md#default-locale but don't know where should I access that listener.. Maybe in config.yml? how??

I am looking for something like this: (config.yml)

...
translatable-extension:
    translationFallback:true
    persistDefaultLocaleTranslation: true
like image 215
borovsky Avatar asked Dec 27 '22 12:12

borovsky


1 Answers

If you have the StofDoctrineExtensionsBundle installed (https://github.com/stof/StofDoctrineExtensionsBundle), you can configure the default values for this in config.yml

stof_doctrine_extensions:
    default_locale: "%locale%"
    translation_fallback: true
    persist_default_translation: true

Haven't found this is in any docs, but it is in the configuration for the bundle https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/DependencyInjection/Configuration.php#L30

like image 171
andy-morgan Avatar answered Dec 31 '22 13:12

andy-morgan