Problem in Calendar grid when switching languages

Home Forums Calendar Products Events Calendar PRO Problem in Calendar grid when switching languages

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #133952
    canan
    Participant

    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?

    #134300
    Barry
    Member

    I’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.

    #139590
    canan
    Participant

    I’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?

    #140323
    Barry
    Member

    I’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.

     

    #140484
    canan
    Participant

    Right, thanks – I’ll speak to WPML support to see if they can help.

    #141215
    Barry
    Member

    That’s probably a good idea – they might be able to offer some insights here 🙂

    #686271
    Barry
    Member

    Hi! 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!

    #1001929
    Leah
    Member

    Hello,

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Problem in Calendar grid when switching languages’ is closed to new replies.