Home › Forums › Calendar Products › Events Calendar PRO › Changing Language (WPML) on ajax calls on Calendar Widget
- This topic has 6 replies, 5 voices, and was last updated 9 years, 7 months ago by
JAVIER.
-
AuthorPosts
-
November 25, 2015 at 3:17 am #1030519
JAVIER
ParticipantHello,
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
November 25, 2015 at 7:17 am #1030814Brian
MemberHi,
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
November 25, 2015 at 7:37 am #1030828JAVIER
ParticipantHi,
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
November 25, 2015 at 9:02 am #1030863Brian
MemberHi,
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
September 23, 2016 at 9:15 am #1167958Geoff B.
MemberGood 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.
October 15, 2016 at 9:35 am #1177138Support Droid
KeymasterHey 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 ‘Changing Language (WPML) on ajax calls on Calendar Widget’ is closed to new replies.
