[ How to override language translations in Silverstripe 3? ]
I want to override some language translations in a Silverstripe 3 project.
Googling returned this old post referring to Silverstripe 2.x: http://www.ssbits.com/snippets/2009/overriding-silverstripes-language-files-with-your-own/
I used the same method, updated it to the Silverstripe 3 approach, and created the following folders/ files
# zlang
+- _config.php
+-#lang
+- en.yml
After a /dev/build and a ?flush=all this has had no effect on changing the text to my translation.
How do I override language translations in Silverstripe 3 without altering the core code?
Answer 1
I worked this out, all I needed to do was add the lang folder to the "project" folder like this:
# mysite
+-# lang
+- en.yml
en.yml contains:
en:
ProductForm:
PRODUCT_ADDED: 'My translation'
PRODUCT_ADDED_LINK: 'My translation'
ADD_TO_CART: ''My translation'