I installed jscalendar and it works fine in english. However, when I switch to another locale (I tried both French and Italian) the calendar shows only the titlebar, the buttons and the status bar of the calendar (in the correct language), but the days of the week are replaced by "undefined" and the day numbers are not shown at all.
I noticed that in the locale file calendar-fr.js the accents were replaced with question marks (indicating a change in the file format somewhere). I tried removing them but that didn't change anything.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | calendar-sv.js__0.txt | 3.71 KB | cybertron1 |
| #8 | calendar-de.js_.txt | 3.89 KB | mphilipp |
| #7 | calendar-fr.js_.txt | 3.68 KB | boz |
Comments
Comment #1
Alex Schenkman commentedSpanish shows questions marks instead of accents and swedish doesn't show at all.
Tested on firefox on OS X, hosted both locally and my hosting provider.
Any solution in sight?
Comment #2
Alex Schenkman commentedSorry, i messed up the title of the issue.
Comment #3
Anonymous (not verified) commentedI had the same problem with french language.
It's because the french language file (lib/lang/calendar-fr.js) was written in iso-8859-1 character encoding.
I did a copy from calendar-en.js, put everything in french with UTF-8 character encoding and everything works fine.
I did not find the calendar-se.js, so I can't help you more...
Comment #4
Moxide commentedHi !
The problem seems to be a missing variable in the localization files (calendar-fr.js, for instance).
I just added the following:
Calendar._FD = 0;And it worked.
Comment #5
patchak commentedMissing variable?? where should I add this exactly in the file? Should I replace something with that or just insert it?
Thanks for the help
patchak
Comment #6
Moxide commentedCalendar._FD = 0;on a new line.For instance:
Comment #7
boz commentedHere the french language file in utf8
Comment #8
mphilipp commentedSame issues with German file in 5.x-0.3, corrected file attached.
Comment #9
nedjoray007 has kindly agreed to evaluate and apply patches to the language files.
Comment #10
ray007 commentedI have commited the french version file provided by boz to HEAD.
Would be nice if someone else could also verify that the included utf-8 cleanup is ok, so I can commit to the release-branches too.
For other languages: interested parties please provide patch files, or (if it's only about the weekday issue) indicate on which day weeks start in your country.
Comment #11
cybertron1 commentedHere comes an UTF8 encoded versionen of the swedish language file (jstools for drupal 5 if it is different) of jscalendar.
Comment #12
floretan commentedThese bugs for individual language files have also been submitted on JsCalendar's website at http://sourceforge.net/projects/jscalendar/ .
In the case of an update from the JsCalendar developers, it might be nice if we don't need to patch all the language files again, so after patching the files that we know to be wrong, it might be worth it to submit those patches directly to JsCalendar as well.
Thank you ray007 for making those patches.
Comment #13
ray007 commentedThere are lot's of bugreports there, but the project hasn't seen any activity for a whole year, and most files are unchanged for 2 years and longer.
So: if you find a language file or patch for your favorite language there, test it out, and if it all works post it somewhere over here. Since the authors of the upstream project have some contract for a commercial calendar project, they don't seem interested in doing much here anymore.
@nedjo: if you don't object, I'll insert a sentence into the project description for all to see, so maybe more people are motivated to post updated and checked language files here.
@cybertron1: I have also just committed the swedish language file to HEAD. I don't care a lot, but maybe you could also try to use \uXXXX notation inside the string instead of String.fromCharCode(), makes things imho look a bit nicer if it works.
Comment #14
ray007 commentedI have checked in some new js-files, swedish and french should be fine now.
If your other favorite language still doesn't work ... complain and/or send a new js-file.
Comment #15
(not verified) commentedComment #16
ricflomag commentedReopening the bug. Drupal 5.7, Jstools 0.8, spanish localization: Accents are displayed as question marks.
Its sounds very strange to me that the solution posted before was to change the value of "Calendar._FD", as this variable is used to specify which day of the week should be the first. It does not have anything to do with encoding... I don't understand.
The solution for me was to change the encoding of the jstools/jscalendar/lib/lang/calendar-es.js file from ISO-8859-15 to UTF8. The solution for everyone could be to use plain ASCII in the language files and replace all special characters by their codes, like "\xE1" for "á".
Comment #17
ricflomag commentedStill present in 1.0