Changing Language (WPML) on ajax calls on Calendar Widget

Home Forums Calendar Products Events Calendar PRO Changing Language (WPML) on ajax calls on Calendar Widget

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1030519
    JAVIER
    Participant

    Hello,

    When I use Calendar widget on my homepage, when I change languaje, and I click a day on calendar, it ‘resets’ the language to the original one.

    I found a solution for this!

    On file \wp-content\plugins\events-calendar-pro\src\Tribe\Mini_Calendar.php

    where you see

    $widget_data = array( 'ajaxurl' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ) );

    we have to change it to

    global $sitepress;
    $current_language = $sitepress->get_current_language();
    $widget_data = array( 'ajaxurl' => admin_url( 'admin-ajax.php?lang='.$current_language, ( is_ssl() ? 'https' : 'http' ) ) );

    We just add the language parameter to ‘ajaxurl’
    and it works!

    The problem I´m having is that when I change month on calendar, it still fails.

    Do you thing you will have a solution for this soon?

    Thanks in advance

    #1030814
    Brian
    Member

    Hi,

    Thanks for reporting this issue.

    I will create a bug ticket for this, but I am not clear about this statement:

    “The problem I´m having is that when I change month on calendar, it still fails.”

    Is that in the regular month view.

    Also, I do have a timeline for when a bug might be fixed.

    Thanks

    #1030828
    JAVIER
    Participant

    Hi,

    My site is in Spanish and French

    while i´m on french,http://poctefa.demos2.iasoft.es/fr/, when I change month on calendar, the language changes back to spanish, which is the primary language.

    f.e. if I am on ‘Novembre 2015’ (november in french) and i click ‘next month button’ on calendar, it goes to ‘Diciembre 2015’ which is in Spanish.

    I hope I explained it properly.

    thanks a lot

    #1030863
    Brian
    Member

    Hi,

    That make senses. Thanks.

    I am going to close this ticket to new replies, but the issue is still open and we will update this ticket once we release a fix.

    If you have any new questions or issues please create a new ticket and reference this one.

    I do not have a timeline when this might be resolved as well.

    Thanks

    #1167958
    Geoff B.
    Member

    Good afternoon Javier,

    Just a quick note to let you know that this morning WPML released SitePress 3.5.3 which includes some fixes specifically meant for our plugins.
    I do believe that the issue reported here should be gone (you will probably need to remove your tweaks to test it out).

    Could you please confirm that this is the case ?

    Best regards,

    Geoff B.

    #1177138
    Support Droid
    Keymaster

    Hey 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Changing Language (WPML) on ajax calls on Calendar Widget’ is closed to new replies.