{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/232","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-translatable","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/232/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/232/events","html_url":"https://github.com/silverstripe/silverstripe-translatable/issues/232","id":138906125,"number":232,"title":"Can´t set $translate_excluded_fields from config.yml","user":{"login":"sebastiand","id":974056,"avatar_url":"https://avatars.githubusercontent.com/u/974056?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastiand","html_url":"https://github.com/sebastiand","followers_url":"https://api.github.com/users/sebastiand/followers","following_url":"https://api.github.com/users/sebastiand/following{/other_user}","gists_url":"https://api.github.com/users/sebastiand/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastiand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastiand/subscriptions","organizations_url":"https://api.github.com/users/sebastiand/orgs","repos_url":"https://api.github.com/users/sebastiand/repos","events_url":"https://api.github.com/users/sebastiand/events{/privacy}","received_events_url":"https://api.github.com/users/sebastiand/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-07T07:19:10Z","updated_at":"2016-03-13T19:40:28Z","closed_at":"2016-03-13T19:40:28Z","body":"There is a private static variable in `Translatable.php` called [`$translate_excluded_fields`](https://github.com/silverstripe/silverstripe-translatable/blob/master/code/model/Translatable.php#L215-L228).\r\nThis variable is marked with `@config`, so I guess it can be set by YAML config.\r\n\r\nI added the following lines to my `mysite/_config/config.yml` (`ChildPages` being the field that should be excluded from translation):\r\n```yml\r\nTranslatable:\r\n  translate_excluded_fields:\r\n    - ChildPages\r\n```\r\n\r\nAfter running a /dev/build?flush=1 and accessing the CMS the field still gets translated. So obviously Translatable isn´t picking up the config.\r\nWhen adding `ChildPages` directly to the `$translate_excluded_fields` variable in class `Translatable.php` everything works as expected, and `ChildPages` won´t get translated in the CMS:\r\n```php\r\n\t/**\r\n\t * Exclude these fields from translation\r\n\t *\r\n\t * @var array\r\n\t * @config\r\n\t */\r\n\tprivate static $translate_excluded_fields = array(\r\n\t\t'ViewerGroups',\r\n\t\t'EditorGroups',\r\n\t\t'CanViewType',\r\n\t\t'CanEditType',\r\n\t\t'NewTransLang',\r\n\t\t'createtranslation',\r\n\t\t'ChildPages'\r\n\t);\r\n```"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/comments/196032264","html_url":"https://github.com/silverstripe/silverstripe-translatable/issues/232#issuecomment-196032264","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-translatable/issues/232","id":196032264,"user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T19:40:28Z","updated_at":"2016-03-13T19:40:28Z","body":"Fixed with #233. Closing this issue too since the problem is solved. ;D"}}