Home › Forums › Calendar Products › Events Calendar PRO › Problem in Calendar grid when switching languages
- This topic has 7 replies, 3 voices, and was last updated 8 years, 7 months ago by Leah.
-
AuthorPosts
-
April 16, 2014 at 8:30 am #133952cananParticipant
I have a trilingual site and three different Calendar widgets in the left sidebar, depending on the language. On of them does not read the translation correctly when switching the calendar with AJAX.
http://www.ceangalg.net/ – English works as it should
http://www.ceangalg.net/?lang=gd – Gaelic works as it should
http://www.ceangalg.net/?lang=ga – Irish generates the initial calendar view correctly (through the l18n capabilities of WP core) but when clicking back/forward a month, the English version of the calendar comes up. This is the problem.Do you have any ideas as to what could be causing this?
I’ve checked the PHP that outputs the calendar grid and it seems that everything is fine because it ultimately uses $wp_locale->get_weekday_abbrev($day). How is the AJAX refresh different? It seems like it is not recognizing the language code entirely (I think it might be related to wp_localize_script?), but why would it work for Gaelic then?April 16, 2014 at 5:12 pm #134300BarryMemberI’m sorry you’re facing difficulties here 🙁
Are you using a plugin for the trilingual aspect at all (and which plugin if so)?
My suspicion is that, when the ajax request is sent it doesn’t include the URL query used to indicate the chosen language, so the request comes back in the default language instead.
April 22, 2014 at 8:50 am #139590cananParticipantI’m using WPML which seems to be a fairly standard setup.
From what I can see, the problem does not seem to be the request not featuring the language code. There is a request to ajax-admin.php with “action=tribe-mini-cal&eventDate=2014-05-01&count=5&tax_query=&nonce=[edited]” which is identical in both the second language that switches to the localised calendar (Gaelic) and the third language that does not (Irish). Does this mean that it is the calendar returning the default language internally somehow? I am not sure how it knows which language to display based on just the data in that request, a cookie somewhere perhaps?
April 23, 2014 at 6:29 am #140323BarryMemberI’m using WPML which seems to be a fairly standard setup.
It’s definitely a popular plugin. We do know however that integration isn’t always smooth and can’t offer a great deal of support at this time for problems that surface when using it.
Does this mean that it is the calendar returning the default language internally somehow? I am not sure how it knows which language to display based on just the data in that request, a cookie somewhere perhaps?
The Events Calendar and Events Calendar PRO make full use of WordPress’s suite of translation functions and if your site is configured to use a certain language then our plugin will try to accommodate that (even if the language changes dynamically with each incoming request).
However, whatever mechanism handles this dynamic switching of languages (WPML in this case) is not something we control and we can’t really suggest why the behaviour is as you have described.
Realizing WPML is a popular tool we do wish to sit down at some point and see what we might be able to do to smooth things out here – but right at this time I’m afraid there is no further help we can offer when integrating with WPML.
April 23, 2014 at 8:49 am #140484cananParticipantRight, thanks – I’ll speak to WPML support to see if they can help.
April 24, 2014 at 5:22 am #141215BarryMemberThat’s probably a good idea – they might be able to offer some insights here 🙂
August 20, 2014 at 7:06 am #686271BarryMemberHi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!
September 3, 2015 at 4:32 pm #1001929LeahMemberHello,
We are excited to report that our upcoming release, The Events Calendar 3.12, includes changes that greatly improve the compatibility between The Events Calendar and WPML. We’ve been working hard on this integration for some time and we want to specifically thank all of our users who requested and waited for this feature. We appreciate all of the support and patience!
Version 3.12 of The Events Calendar will greatly improve compatibility with WPML, but we still have work to do. If you run into any problems integrating the two plugins, please post in our forums so that we can look into the issues. We’ll be on the look out for tweaks and fixes that will improve things further.
Thank you again to everyone who has been waiting for this! The Events Calendar 3.12 is coming soon- watch your WordPress Updates page!
Best,
Leah
and The Events Calendar team -
AuthorPosts
- The topic ‘Problem in Calendar grid when switching languages’ is closed to new replies.