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   742 Views

Avatar
borriej

Community Member, 267 Posts

14 December 2012 at 1:39am

Edited: 14/12/2012 1:42am

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

Community Member, 267 Posts

14 December 2012 at 2:19am

Edited: 14/12/2012 2:52am

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

Community Member, 27 Posts

14 December 2012 at 3:06am

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