Facebook to Google Calendar

By Strawp Last update Mar 7, 2009 — Installed 9,119 times.

Multi-language support

in
Subscribe to Multi-language support 11 posts, 4 voices



Strawp Script's Author

teukkam wrote in his review: "international users should note that this only works when Facebook display language is set to English. I am thinking of branching this once again to maintain a Finnish-speaking version."

Go ahead! Although I think there are actually a couple of ways of managing international support fairly easily as the field "labels" and regexps for scraping the event data are declared in a fairly lucid way and the user-picked language on Facebook is used as a class name for the <body> element. I will look into this...</body>

 
Strawp Script's Author

OK, just uploading a new version now which will have the structure (but not yet the ability) to do multi-language. Just needs the definitions (in the "languages" array at the top of the code).

 
Erik Unger User

It doesn't work for me in Australia.

I have the following event information format:

Time and PlaceDate:
Saturday, January 17, 2009
Time:
10:00am - 7:00pm
Location:
Lecture Theatre H1.25, Building H, Monash Caulfield campus
Street:
871 Dandenong Road
City/Town:
Melbourne, Australia

 
Strawp Script's Author

I can see that it's because the date format is slightly different to what I have. Mine would look like: "17 January 2008 at 10:00".

What is the primary language you have set in your Facebook account settings? AFAIK there isn't anywhere else that a date format would be defined.

 
Hannu Leinonen User

I've been developing this to support en_US, but because of 12-hour clock, it'll need handling for that and a few additional locale properties. I already got it working for single day events but with multiday events the time will be incorrect in case of pm.

 
Strawp Script's Author

Hi sopuli, sounds good. Can you link to the code you've been working on? Pastebin or whatever? I'll merge it with the current one if it's straightforward.

 
Hannu Leinonen User

I "had" to do complete rewrite to the time and date parsing. I'm currently working on the multi-day events, but after that it should support both 12 and 24 hour clock. If you're interested in merge my changes to your script contact me by email (sopuli(at)gmx.net). :)

 
Hannu Leinonen User

Okay, now it works in all three locales (en_US, en_GB and fi_FI) with both single and multi-day events. It should now be quite easy to support any 12-hour clock locale. There are still few problems, which of the biggest is the usage of jQuery. It breaks some Facebook ajax things (ie. event commenting and language changing). Also some encoding problems when transferring the info to GCal, special characters are not appearing correctly in the event info.

 
Strawp Script's Author

Sounds good - mailed

 
Joackim Penn... User

I'd love to see a Swedish version. Tell what you need to make it happen!

 
Strawp Script's Author

Joackim, I'd need the Swedish names of all the months of the year, and the format that Facebook displays dates in. I could probably work out the format from switching the language and testing out events on FB myself. If you take a look at the source code for the script you can see how each language is defined.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel