I want to exclude a field from being translated ('ChildPage' from lumberjack module).
I saw that there is a private static variable in Translatable.php called $translate_excluded_fields.
This variable is marked with @config, so I guess it can be set by YAML config.
I added the following lines to my mysite/_config/config.yml:
Translatable:
translate_excluded_fields:
- ChildPages
After running a /dev/build?flush=1 and accessing the CMS the field still gets translated. So obviously Translatable isn´t picking up my config.
When adding 'ChildPages' directly to the variable in class Translatable.php everything works as expected, and 'ChildPages' won´t get translated in the CMS:
/**
* Exclude these fields from translation
*
* @var array
* @config
*/
private static $translate_excluded_fields = array(
'ViewerGroups',
'EditorGroups',
'CanViewType',
'CanEditType',
'NewTransLang',
'createtranslation',
'ChildPages'
);
I am using Silverstripe v3.3.1 and Translatable v2.1.1
What am I doing wrong? Is this a bug or do I need to set the config variables differently?