Support » Plugin: All-in-One Event Calendar » [Plugin: All-in-One Event Calendar] ai1ec problems in multilanguage websites

  • Hi folks,
    I really like All-in-one Event Calendar, kudos and many thanks to The Seed for keeping it free.
    I am testing ai1ec in my two dev multilingual websites (one uses the excellent Polylang plugin while the other is multisite and uses the excellent Multisite Language Switcher plugin). In both of them I have the same problem: if untouched by the user the calendar view is alright in all the languages that I use, but as soon as the user changes view (weekly, agenda…) or clicks on previous/next buttons the language of the view becomes inconsistent and many terms (if not all) fall back to english.
    I thought that it might depend on the .po files, wether they are complete or not, therefore I created from scratch an italian it_IT.po file (I am sure that I have translated all the terms that are in the .pot file) but the problem persist.
    In the website with Polylang I have also another problem: the calendar views can’t keep separated the events by language, no matter what language the user choose the calendar shows the events in all the languages.

    Thanks a lot!!!

    P.S. The Seed: let me know if you are interested in the italian translation, I could email you the .po .mo files.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Yani Iliev


    Multilanguage websites don’t work well with ai1ec and I suspect with other plugins too. We are looking at WPML for now and will soon try to support more ML plugins.
    I think the community will benefit from having the italian translation in the plugin so please send it to me: yani at the-seed dot ca


    Multilanguage websites don’t work well with ai1ec and I suspect with other plugins too.

    I downloaded latest AI1EC and I admire the amount of work put in development of the plugin. However, it’s really complicate and IMHO part of it has been made too complicate.
    AI1EC does not use standard WordPress functions to query posts and you’ll have to do a lot of work to make it compatible with any other plugin that modifies query vars by using standard WordPress approach.

    The compexity of AI1EC and fact that it tries to do everything is the main reason why I created an events handling system by using custom post types and few meta fields. No additional tables in database and no complex SQL queries needed, plus everything works in line with WordPress queries, rewrites and multilingual plugins.

    I also noted that screenshots double the size of AI1EC. Do you really need all of them in distribution zip file?

    Plugin Contributor Yani Iliev


    Thanks for the feedback. Glad you found something that works for you. The idea behind ai1ec is to provide as much flexibility to the end user and most of all, support ics import/export.

    I also noted that screenshots double the size of AI1EC. Do you really need all of them in distribution zip file?

    That’s a good suggestion, I will try to “smush” the screenshots as much as possible.

    Hi guys, thanks for your replies.
    I found out that in the multisite installation the problem was caused by an unexpected (at least for me) interaction between front-end and back-end languages. As long as front-end and back-end languages are the same ai1ec works well, otherwise the problem arises and the front-end calendar picks up some foreign terms, as to speak. I have no idea why ai1ec on the front-end is partially biased by the back-end language, but this unfortunate combination happened to me because I use the WP Native Dashboard plugin to keep all the dashboards in english, and I would experience the problem visiting the calendar page of non-english websites while logged in.
    I still have to look deeper into the multilingual website with Polylang, but I suspect that it’s going to be much more complicate and beyond my capability. The fact alone that events are not separated by language scares me. It is a pity because I really think that Polylang and ai1ec are both great plugins.

    @yany.iliev – I will email you the translations. Following what I just said above, I hope that you will consider Polylang as well, it’s free, easy to use and well supported by its creator. Unfortunately WPML is not and will not be on my radar.

    @andydegroo – I am not a programmer by any extent, some of what you said just flew above my head, and this is a big problem for sure, but it would be really nice to see a deeper compatibility among plugins because sometimes it gets just crazy. Have you made a plugin out of your event managment system?

    Plugin Contributor Yani Iliev


    It makes me think that the issue with Polylang is the same as with WPML – ajax calls are missing language parameter.
    I’ll check polylang too when working on WPML. Thank you for the translations!

    Hi guys, take regards from me.

    I translated all-in-one-event-calendar.po into Slovenian language. I created all-in-one-event-calendar-sl_SI.po file. But doesn’t change anyhting. If I’m understand correctly correction should be done in files like class-ai1ec-importer-helper.php and others mentioned in comments above a translated words.

    Should I do that?

    Actually i’m asking for instruction/directive how to change language. Thank you for help

    Hi IztokKlanecek,
    I am afraid that you should give us more info about your WordPress setup and your goals (slovenian website, multilingual website, multilingual multisite) in order to get support.
    Keep in mind that you need .mo files to actually see anything translated therefore, if you have not already done it, you have to create the .mo file from your .po file.
    Also have a look at these links, they might help you: Installing WordPress in your Language and Multilingual WordPress
    Best regards

    No problem for the .po and .mo, it is nothing compared to what you give to the Community.
    I am very happy to hear that you are going to consider Polylang. The WordPress Community would be extremely happy if Ai1ec and Polylang could work together without a glitch.
    Have a good day!

    In Polylang multiple languages are accomplished as custom taxonomies and it modifies queries in pre_get_posts action hook. The plugin will set language to default language defined in plugin settings or to browser settings of site visitor if that option is activated. It also sets a cookie depending on visitors language choice.

    If AI1EC was using WP_Query::get_posts() method instead of directly calling wpdb methods it would be much easier to filter events by language. I can see why it is done this way, but maybe AI1EC can be modified to include WP_Query class. It is possible to include fields of joined tables by using posts_fields filter which is applied before post select queries. Another option is posts_request filter in which plugins can modify complete SQL query.

    As a proof of – here is how I use posts_fields filter to get event_date meta field in results from wp_postmeta table:

    add_filter('posts_fields', 'event_posts_fields', 100, 2);
    function event_posts_fields($fields, $wp_query){
    	global $wpdb;
    	$qv = $wp_query->query_vars;
    	if( isset($qv['meta_key']) && $qv['meta_key']=='_event_startdate' )
    	$fields .= ", {$wpdb->postmeta}.meta_value AS event_startdate";
    	return $fields;

    After this I can use $post->event_startdate without using get_post_meta(). Note: wp_postmeta is already JOINed by adding custom meta_query or specifying 'orderby'=>'meta_value' and 'meta_key'=>'_event_startdate' in query_vars array.

    There are few other filters where Polylang modifies queries used in WP_Query class:

    getarchives_join, getarchives_where;
    get_previous_post_join, get_previous_post_where;
    get_next_post_join, get_next_post_where;

    I hope this explains the basic working principle of Polylang and will help make AI1EC compatible.


    Have you made a plugin out of your event managment system?

    Yes, I have, but I created it for a project and it was created to do just what is needed. There are no recurrent events, RSVP or location functionality. Although ICS export and event microformats are implemented. I’m not willing to create another events plugin just because I don’t like how other plugins work. There are already too many out there.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] ai1ec problems in multilanguage websites’ is closed to new replies.