Where to change translationFallback to true in symfony 2 doctrine translatable

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

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

... translatable-extension: translationFallback:true persistDefaultLocaleTranslation: true 
+4
source share
2 answers

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

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

They did not find this in any documents, but it is in the configuration for the package https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/DependencyInjection/Configuration.php#L30

+10
source

I'm not sure I fully understand what you are asking for, but in a typical setup you will have a translation reserve specified in your config.yml like this.

 framework: translator: { fallback: %locale% } 

In this example, the placeholder locator refers to the locale parameter in the parameters.ini / parameters.yml file.

I believe this comment is specified by default in your config.yml, but uncommenting this line effectively resolves translations.

Here you can see the full list of configuration options along with your default values: http://symfony.com/doc/current/reference/configuration/framework.html#full-default-configuration

0
source

All Articles