Hello!
I have installed latest version of SilverStripe (3.1.12) on my server and added Translatable module. I have problems with _t() function on template.
Ok here's my code:
mysite/_config.php
..
i18n::set_locale('sl_SI');
i18n::set_locale('en_US');
Translatable::set_default_locale('sl_SI');
Translatable::set_allowed_locales(array(
'sl_SI', // Slovenian
'en_US' // English
)
);
..
.. so sl_SI is my default locale, en_US is secondary.
mysite/lang/en.yml
en:
Categories:
Cat1: Producent EN
mysite/lang/sl.yml
sl:
Categories:
Cat1: Producent
mytemplate.ss file
..
<%t Categories.Cat1 'Producent' %>
..
I'm always getting translation from English file (en.yml). What am I doing wrong?
I've done same thing (same configuration) on SS version 3.1.6 and works like a charm there.
Maybe some bug on new version or I forgot something?
Thank you for your help.