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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Event Calendar – Fully localised

Go to End

12 Posts   3123 Views


Community Member, 323 Posts

24 October 2009 at 3:34am

Edited: 24/10/2009 4:03am


Now that it is known that UncleCheese likes the French language, I think we could try and get a fully localised event_calendar module. My little contribution is the attached fr_FR.php file (not fully tested).

Hélas, this file does not contain all translatable and localisable information: for example, jquery.datePicker.js contains some text in an array called dpText (where the texts Show entire month and Show week were forgotten).

I can translate those strings for a monolingual site, but can we modify those JS files and add _t() functions for multilingual sites? If somebody explains me how to properly do it I’ll be happy to complete the task.

Also, the CalendarWidget shows dates in the 'yyyy-mm-dd' format in the hover tooltip (associated to the title attribute) and I’ve not been able to change it. It’d be nice if it followed the _config.php parameters.
EDIT: I’ve found it, I’m attaching the JS file for French users, while waiting for some assistance before providing it fully localised.
NOTE: Please discard the first php and js files, replacing files in this SS forum does not work.


Attached Files

Community Member, 323 Posts

24 October 2009 at 4:27am

Well, I think I did not research enough on the matter… since there is a LiveCalendarWidget that seems more adapted to localisation… :(


Forum Moderator, 4102 Posts

24 October 2009 at 4:59am

Yeah, that was one of the major goals with the LiveCalendarWidget was to get more control over i18n and give users a template they can customize. Thanks for your efforts, here. EventCalendar is in dire need of some i18n work. You can never have too much localization with something like date display. :)


Community Member, 323 Posts

24 October 2009 at 10:08am

Edited: 24/10/2009 10:34am

Talking about localization of LiveCalendarWidget, after much trial and error, I’ve been able to change the first day of the week from Sunday to Monday, as Europeans prefer.

Also, I’ve changed the format of week days from 3 letters to 1 and removed the trailing zero in numbers, as in CalendarWidget.

These are ugly hacks, but if someone needs it…

Now, if I only managed to find in the forum the solution to:

uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost/iac/event_calendar/javascript/jquery-1.2.6.min.js?m=1237479890 :: anonymous :: line 22" data: no]

…when changing months in a LiveCalendarWidget located in my home page…

EDIT: This error only appears in Firefox!!! In IE7 I can cycle through the months… Any ideas?

Best regards,


Community Member, 323 Posts

24 October 2009 at 10:56am

Removing <?xml version="1.0" encoding="UTF-8"?> at the top of my solves the problem. Somebody knows why and how to solve in a better way?


Community Member, 323 Posts

24 October 2009 at 12:00pm

Edited: 24/10/2009 12:03pm

My hack for getting weeks starting on Mondays works… as long as the month does not start on Sunday!, for example next November. In this cases, the rendered month starts in the following day: Monday the 2nd.

I’ve been playing around these lines (182-192) of CalendarUI.class.php:

  private function getWeeks()
    $weeks = new DataObjectSet();
    $today = new sfDate();
    // addDay() in following line for starting weeks on Monday, but it does not show the first day of the month if it’s Sunday. There are other places to do it.
	$view_start = new sfDate($this->date_counter->addDay()->get());
    $view_end = new sfDate($view_start->addDay($this->rows*7)->subtractDay()->get());

And tried also changing the constants in sfTime.class.php, with no avail. Could some European good soul help me, please?

Thanks in advance,

Attached Files

Community Member, 3 Posts

30 October 2009 at 5:17am

Edited: 30/10/2009 5:27am

Thank you for this contribution of translation and help.
I fully appreciate this work that i needed.


Community Member, 323 Posts

3 November 2009 at 5:23am

Edited: 03/11/2009 6:03am

Hi ataxel!

Thanks, but don’t expect too much of my work: ugly hacks and ugly results:
– I’ve not been able to resolve the problem with months starting on sundays.
– I can’t use LiveCalendarWidget in Firefox without changing the main template (the xml declaration).
– I can’t customise Content with LiveCalendarWidget (
– I can’t fully use LiveCalendarWidget for specific events (

Any ideas?


Go to Top