Multi-language support
|
|
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> |
|
|
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). |
|
|
It doesn't work for me in Australia. I have the following event information format: Time and PlaceDate:
|
|
|
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. |
|
|
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. |
|
|
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. |
|
|
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). :) |
|
|
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. |
|
|
Sounds good - mailed |
|
|
I'd love to see a Swedish version. Tell what you need to make it happen! |
|
|
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. |