• I am using Events Calendar in a multilingual site (Finnish and Russian). Although I manage to find the strings that need to be translated, there are a few things that are not behaving as they should:

    If I start by browsing the events in a monthly view in Finnish, everything looks (almost) fine:
    https://musikantit.fi/tapahtumat/

    But when I go to the previous month using the link for the previous month, language changes into English and I can also see the russian events that should only be seen in the russian pages. This is very confusing for the users as not only the language changes, also the events’ language changes.

    Same thing applies to the Russian calendar:
    https://musikantit.fi/ru/tapahtumat/

    How do I set the calendar correctly so that the Finnish events can be seen only in the Finnish calendar and the russian events in the Russian calendar? Also, how to hide the English that keeps popping up everywhere although the strings have been translated?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Riitta Korpip??

    (@korpiri)

    Please, anyone?

    Hi @korpiri,

    I apologize for the delay in our reply and am sorry that you are having issues with your site. Thanks for reaching out!

    Unfortunately, the support for Polylang actually comes from it’s developer. Since we didn’t create the plugin or it’s integration abilities, it would be best to reach out to it’s developer.

    With that said, I do notice that The Events Calendar does not recognize when the page being viewed is an alternate language. When on the Russian version of the page, note how the link for the calendar pagination does not use a link to the Russian version of the page only for the base website URL.

    We take internationalization very seriously and have spent more time testing WPML with our products. Managing multiple translations can get tricky and complicated, but we’ve had customers who have had good luck with WPML though that’s not to say that it doesn’t have compatibility issues as well.

    I’m sorry that I don’t have more to offer you! ??

    Best of luck,
    Ed

    Hey there,

    Since this thread has been inactive for a while, I’m going to mark it as resolved.

    Please feel free to create a new thread if you need help with anything else!

    Ed ??

    Hi @korpiri, I’m using Polylang & Event Calendar on an Italian web project and I have the same issue.
    I checked your web and I can see the Finnish version of the Calendar working as you wanted.
    Can I ask you how did you solve the problem.?

    Thanks in advance!
    Elieser Pantoja

    Thread Starter Riitta Korpip??

    (@korpiri)

    Sorry to say, but it did not get fixed completely. Finnish and Russian are still getting mixed when browsing the events. Trying to find another calendar solution to solve this.

    Korpiri,
    How did you make two separates calendars for Russian and Finnish pages?
    What version of polylang do you have?

    Looking forward to your answer:)
    Thank you
    Sophie

    Korpiri,
    How did you make two separates calendars for Russian and Finnish pages? How did you translate whole content ?
    Did you use Loco translate?

    What version of polylang do you have?

    Looking forward to your answer:)
    Thank you
    Sophie

    Hi all! As I understood from Polylang information it works only if you have Polylang Pro version (99€). You can check it here:

    Polylang PRO

    Thread Starter Riitta Korpip??

    (@korpiri)

    Hi,

    as said, it does NOT work optimally in my site. No automatic translations, all contents is made by native speakers. I cannot recommend as I have heaps of problems with the calendar.

    I am having problems with Polylang. Since I’m not a Pro user can’t contact support. Any suggestions?

    I change this function in
    \wp-content\plugins\unyson\framework\extensions\events\extensions\events-tags\class-fw-extension-events-tags.php
    Its works for me

    rivate function _fw_prepare_data( $items, $format = null ) {
    
    		$result = array();
    
    		foreach ( $items as $key => $item ) {
    
    			//start datetime
    			{
    				$timestamp_start_date                          = get_post_meta( $item->ID, $this->from_date, true );
    				$timestamp_start_time                          = get_post_meta( $item->ID, $this->from_time, true );
    				$result[ $item->post_parent ][ $key ]['start'] = ( $timestamp_start_date + $timestamp_start_time );
    			}
    
    			//end datetime
    			{
    				$timestamp_end_date = get_post_meta( $item->ID, $this->to_date, true );
    				$timestamp_end_time = ( strtolower( get_post_meta( $item->ID, $this->all_day,
    					true ) ) === 'yes' ? 86399 : get_post_meta( $item->ID,
    					$this->to_time, true ) );  // 23:59:59 86399 //86400 24:00:00
    
    				$result[ $item->post_parent ][ $key ]['end'] = ( $timestamp_end_date + $timestamp_end_time );
    			}
    
    		}
    
    		$result = $this->_fw_grouped_calendar_dates( $result, $format );
    
    		$return_value = array();
    		$i            = 0;
    		//fill return value with shrortcode Calendar supported data structure
    		foreach ( $result as $event_id => $intervals ) {
    
    			if ( is_null( get_post( $event_id ) ) ) {
    				continue;
    			}
                if (function_exists('pll_current_language')) {
    			    if (pll_get_post_language($event_id) !== pll_current_language()) continue;
                }
    			$title = get_the_title( $event_id );
    			$url   = get_permalink( $event_id );
    			foreach ( $intervals as $interval ) {
    				$return_value[ $i ]['start'] = $interval['start'];
    				$return_value[ $i ]['end']   = $interval['end'];
    				$return_value[ $i ]['id']    = $event_id;
    				$return_value[ $i ]['title'] = htmlspecialchars_decode( $title );
    				$return_value[ $i ]['url']   = $url;
    				$i ++;
    			}
    		}
    
    		return $return_value;
    	}
    • This reply was modified 5 years, 8 months ago by poti.
    • This reply was modified 5 years, 8 months ago by poti.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Polylang & Events Calendar’ is closed to new replies.