Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Blog Module

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[solved] SS 3.02 - Blog Module, Ignoring i18n nl_NL ?!


Reply

3 Posts   673 Views

Avatar
borriej

14 December 2012 at 1:39am (Last edited: 14 December 2012 1:42am), Community Member, 267 Posts

Hi,

Using:
SS 3.02
blog module (latest from gitHub 2 months ago)
silverstripe-widgets module (latest from gutHub 2 months ago)

_config:
i18n::set_locale('nl_NL');

Translation files nl_NL.php exist in blog/lang folder...

Problem:
on the website (not logged-in) the 'posted by' <% _t('POSTEDBY', 'Posted by') %> titles are still in en_US! ..

Why? how?
Is i18n not working on blog module or ss 3.02?

In addition:
adding to config:
i18n::set_locale('nl_NL');
setlocale(LC_ALL, 'nl_NL')
i18n::set_date_format('dd-MM-YYYY');

has no effect..

Any idea's?

Avatar
borriej

14 December 2012 at 2:19am (Last edited: 14 December 2012 2:52am), Community Member, 267 Posts

Installed SS 3.03
Installed latest translatable module,

added to config:

Translatable::set_default_locale('nl_NL');
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');

i18n::set_locale('nl_NL');
setlocale(LC_ALL, 'nl_NL');
i18n::set_date_format('dd-MM-YYYY');
setlocale(LC_TIME, 'nl_NL');

No effect.. still seeing the english translations.. want to see the Dutch.. how?

Avatar
UndefinedOffset

14 December 2012 at 3:06am Community Member, 27 Posts

Looks like the translation files never got migrated to yaml for SilverStripe 3.0, I've submitted a pull here https://github.com/silverstripe/silverstripe-blog/pull/67