Home › Forums › Calendar Products › Event Aggregator › Event Aggregator: Event country imported from Facebook in wrong language #2
- This topic has 12 replies, 3 voices, and was last updated 6 years, 4 months ago by Oliver.
-
AuthorPosts
-
November 2, 2017 at 6:27 am #1373643OliverParticipant
Hi Cliff,
since July2017 I’m waiting for a fix for the issue described here:
https://theeventscalendar.com/support/forums/topic/event-aggregator-event-country-imported-from-facebook-in-wrong-language/Every week we need to manually update the country for around 30-60 imported events.
I there a chance to give the issues a higher priority? I guess a lot of your international clients will profit from it.Best regards,
OliverNovember 2, 2017 at 9:48 pm #1374393BrendanKeymasterHi Oliver,
This issue as not been resolved as of yet. Our team is still working on a resolution. I have added this ticket to your other ticket and you will be notified as soon as its been fixed.
Thanks for you patience!
Brendan
November 7, 2017 at 3:37 am #1376751OliverParticipantThanks Brendan!
I there a (rough) timeline for solving this issue?
Regards,
OliverNovember 7, 2017 at 6:40 am #1376878CliffMemberHi, Oliver. Sorry for that errant reply. I think there was some confusion between this post and another.
However, it was correct that this post did need a reply…
After reviewing your and my notes, and referencing https://developers.facebook.com/docs/internationalization, our developers determined that there is no notion of an “event language” as there is no notion of a “post language” that we can, in some way, exploit.
It was recommended to either make a multisite and import German language events into the “German” subsite of the multisite network and import French language events into the “French” subsite of the multisite network…
…or use a multi-language plugin, possibly with one of our recently-added action hooks–before and after inserting the posts–that could be used to assign language to posts, such as using something like WPML.
Please let me know if you have any follow-up questions on this topic.
November 7, 2017 at 7:21 am #1376905OliverParticipantHi Cliff,
thanks for the fast answer!
I had a look at the Facebook documentation. It says that language can be “selected” by adding the “locale”, e.g. like described here:
https://stackoverflow.com/questions/24799608/how-to-get-localized-values-from-facebook-open-graph-api-through-koalaAssuming that e.g. a German website only imports German events and a Spanish website only imports Spanish events, you read out the “locale” of the WordPress settings and hand it over to the Facebook API:
https://codex.wordpress.org/Function_Reference/get_localeWould this make sense?
Best regards,
OliverNovember 7, 2017 at 7:01 pm #1377596CliffMemberThanks for these additional details. We’ve re-opened this internal ticket and filed it as a Feature instead of a Bug.
No ETA to share, but good news that it’s re-opened 🙂
November 9, 2017 at 9:43 am #1379191OliverParticipantWell, from my point of view it is definitely a bug, because the import via Facebook in a foreign language clearly doesn’t work…
Can you name me the file(s) where this import is done? Then I can I have a look by myself and maybe find a solution faster … It creates just to much effort for us to manually update all the imported events … we can’t wait another 6 months, sorry… :-/
Regards,
OliverNovember 9, 2017 at 2:48 pm #1379490CliffMemberIt will require code changes to both our EA server and the EA client that’s bundled into The Events Calendar… so there’s no code snippet to do this at this time. I’ve passed along your request for timeliness on this.
November 13, 2017 at 9:51 am #1381699CliffMemberHi, Oliver.
An Event Aggregator developer dug into this for a good amount of time and discovered the issue is that neither the Events API nor the Places API support the locale parameter.
You can read more about this at:
- https://stackoverflow.com/questions/16088002/facebook-graph-api-locale-parameter-broken
- https://developers.facebook.com/bugs/294623187324442
In their testing, our developer determined that it’s really the Places API that gets the event’s location/venue information. Since, in Facebook, you have to pick a spot on the map, the country is the only part that is returned in English. We even tested from a French-language Facebook profile while sitting in France using Facebook’s API console and it still returned an English-language country name. The state, post code, etc. apparently are localized, though.
They came up with this starter snippet (untested and doesn’t cover all potential countries and you may need to expand upon it if any other English text needs to be changed):
https://gist.github.com/cliffordp/9f68ab6a4753c91ff42c5ba1f0a00b81
Please let me know your thoughts on this after testing it out.
November 14, 2017 at 10:00 am #1382750OliverParticipantHi Cliff,
thanks for your big effort, I really appreciate your help!! 🙂
I integrated your snippet into our website and did a test, which worked!
We will do further more testing the coming days to ensure it works in all cases.I’ll keep you updated!
Best regards,
Oliver- This reply was modified 6 years, 5 months ago by Oliver.
November 14, 2017 at 11:29 am #1382855CliffMemberExcellent, thank you for the update!
Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current problem description and also linking back to this thread.
Thank you!
December 6, 2017 at 8:35 am #1399504Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Event Aggregator: Event country imported from Facebook in wrong language #2’ is closed to new replies.