Support » Plugin: All-in-One Event Calendar » [Plugin: All-in-One Event Calendar] Qtranslate and All in one event calendar issues.

  • Resolved apuestokid


    I’m using Qtranslate (Spanish as main lang, and english as second one) and All in one event calendar together in a website, and i’m having some issues.
    In the main languaje (spanish) everything works ok, but un the second languaje, seems it’s OK, but when you navigate inside the calendar, the ajax loader, doesn’t recognize the languaje, aun turns everything into spanish.
    For example, if you vissit the calendar in english the name of the mounth and the days is in english, but when you browse between mounths the whole text turns to spanish.

    any idea?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I found half of the fix for this. admin-ajax.php needs to have the ‘lang’ variable sent as part of the GET request, so update the ajaxurl variable in the load_js_translations function of app/controller/class-ai1ec-calendar-controller.php to:

    'ajaxurl' => site_url( 'wp-admin/admin-ajax.php?lang='.qtrans_getLanguage() ),

    The second part of the solution, so that the links point to the correct language pages, is to change the way the permalink is fetched in your ai1ec theme templates. For example, in my month.php file, I have changed

    <a href="<?php echo esc_attr( get_permalink( $event->post_id ) ) . $event->instance_id ?>"


    <a href="<?php echo esc_html( qtrans_convertURL(get_permalink( $event->post_id ), NULL, TRUE ) ) . $event->instance_id ?>"

    The 3rd variable to qtrans_convertURL is $forceadmin. The function seems to want to bail if WP_ADMIN is defined, which apparently admin-ajax.php does, so it must be “forced” to parse the URL. Found this article about it.



    Hi MarcGuay,

    We really appreciate your time spent to help other users. @apuestokid if this solution does not work then please do not hesitate to contact us.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Qtranslate and All in one event calendar issues.’ is closed to new replies.