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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

[SOLVED] Event Calendar translation of DateRange


Go to End


2 Posts   1435 Views

Avatar
Thomashv

Community Member, 35 Posts

8 May 2013 at 1:14am

Edited: 10/05/2013 9:24pm

First of all, thanks for a really nice module UC!
I have an issue regarding translation of dates with the event calendar module. When adding setlocale(LC_ALL, 'nb_NO'); in the _config.php file the $DateRange translate the dates in norwegian, but it seems like this configuration is causing the events not to load at first click in CMS. When I click on an event back end the right frame of CMS is just blank. No errors in Firebug. If I refresh the page the event appear agian.

I have removed all the norwegian translation files from the module to exclude potential errors in these files. But still the events wont load before I have refreshed the pages. Also when creating a new event page it does not appear after save. I have to do a refres first.

Is there anybody else that has experienced this or does anyone have a clue about what might be going on here?

Avatar
Thomashv

Community Member, 35 Posts

10 May 2013 at 8:59pm

I found a solution for this. If I put .utf-8 on the end of the locale code it seems to work.

nb_NO.utf8

I am not sure why, but this does the trick. The events are loading in the cms now without having to refresh all the time. It seems likely that it has something to do with the special characters of norwegian language. Has anyone else had this experience with the event_calendar or any other modules? It would be interesting to understand more exactly how this works.