At the moment the calendar is untranslatable.
After playing with the google calendar I think I might have find a clean solution.

To translate my calendar I had to add following code (dutch)

    buttonText: { 
      today: 'vandaag',
      day: 'dag',
      week:'week',
      month:'maand'
    },
    monthNames:['januari','februari','maart','april','mei','juni','juli','augustus','september','okotber','november','december'],
    monthNamesShort: ['jan','feb','maa','apr','mei','jun','jul','aug','sep','okt','nov','dec'],
    dayNames: ['zondag','maandag','dinsdag','woensdag','donderdag','vrijdag','zaterdag'],
    dayNamesShort: ['zon','ma','di','woe','don','vrij','zat'],

I don't know a lot about t('') functions, but could we generate these strings in the module with a t(' ') function and pass that string to javascript setting.

Something like this

function template_preprocess_views_view_fullcalendar(&$vars) {
...
$settings = array(
    ....
    'monthsString'=> getMonthsString(),
);
...
}

function getMonthsString() {
return t('January) . ',' . t('February) . ',' t('March) . ',' t('April) . ',' ....
}

monthNames:[Drupal.settings.fullcalendar.monthsString],

Comments

aspilicious’s picture

StatusFileSize
new2.9 KB

I'm so smart... lol XD
This actually works :p

Patch attached, I think we can reuse some functions from other modules to get the array of translated months and days.
But besides of that I like my work.

aspilicious’s picture

Status: Active » Needs review
aspilicious’s picture

Whoops, some left overs from the gcal things I was doing...

EDIT:
screenshot: http://awesomescreenshot.com/01967jfe9

aspilicious’s picture

And while we are on it, we should add one more:

'allDayString' => t('all-day'),

allDayText: Drupal.settings.fullcalendar.allDayString,
aspilicious’s picture

StatusFileSize
new1.79 KB

Final patch?

aspilicious’s picture

StatusFileSize
new1.75 KB

Ok lets try again :( hate windows endings

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Awesome! Thanks for this. About to commit, but do you feel like rolling it for D6 too? :)

tim.plunkett’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

http://drupal.org/cvs?commit=485798
I'm okay with putting this in 6.x-1.x.

aspilicious’s picture

StatusFileSize
new1.79 KB

for both branches

tim.plunkett’s picture

yoran scholiers’s picture

Thank you for this patch, only one small error I think. (altough I'm not sure if it is in the patch or somewhere else)

After installing the patch, 'Sunday' was translated as ''!day-abbrevation Zon. The problem was that the translation said '!day-abbrevation instead of '!day-abbrevIation'
I don't know if it has anything to do with the patch, or if I made a mistake on my end.

either way, Thank you!

tim.plunkett’s picture

I don't know very much about how localization works, but I know that we're just calling Date module's functions.
Looking at http://api.lullabot.com/date_t_strings, it is "!day-abbreviation".

That being said, the 6.x-2.x and 7.x-2.x branches are getting string overhauls, because the current strings are outrageously complicated to translate. See #1036444: Cleanup the views UI + remove autodiscovery mega issue. for progress on that.

aspilicious’s picture

I think its
---------
1) A manual mistake on your side
2) A bad translated date string (from date module)

Not our fault :)

yoran scholiers’s picture

Its indeed a bad translated string from the date module ;)
Thanks again, this small update made the module (for me) 100x better!

aspilicious’s picture

Belgians help each other ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.