Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to translate registration form URL from Espresso Event plugin.

Solution:
You need go to \wp-content\plugins\event-espresso-core-reg\core\EE_Config.core.php line number 1810
and replace the below code:

public function reg_page_url() {
        if ( ! $this->reg_page_url ) {
            $this->reg_page_url = add_query_arg(
                array( 'uts' => time() ),
                get_permalink( $this->reg_page_id )
            ) . '#checkout';
        }
        return $this->reg_page_url;
    }

with

public function reg_page_url() {
        if ( ! $this->reg_page_url ) {
            $this->reg_page_url = add_query_arg(
                array( 'uts' => time() ),
                get_permalink(  apply_filters( 'wpml_object_id', $this->reg_page_id, 'page', true ) )
            ) . '#checkout';
        }
        return $this->reg_page_url;
    }

NOTE: We are working to to make this plugin compatible with WPML. Meanwhile you can use the above workaround. If you have any other issue please open a new ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 35 replies, has 5 voices.

Last updated by Sumit 5 years, 1 month ago.

Assigned support staff: Sumit.

Author Posts
October 31, 2016 at 9:31 am #1126251

Dat Hoang

This time Shekhar is off. I'm happy to assist you again.
Sorry for switching supporters like this.

I can use your new user info as well. I will check more and get back to you later.

Again, I still can not use FTP. Can you please check one more time?
I may need to get a copy of your site? Is that fine if we use Duplicator for this purpose http://wordpress.org/plugins/duplicator/ ?

October 31, 2016 at 1:52 pm #1126529

danielA-29

Hello ! yes you can clone my site:
I hope this is still in private: My FTP info are:

[removed, moved to https://wpml.org/forums/topic/i-cant-translate-the-event-espresso-registration-form-in-english/page/2/#post-1124048 ]

thanks

November 1, 2016 at 7:46 am #1127044

Dat Hoang

Your recent reply is NOT private. Please be careful. I removed it and moved the credential to the latest private reply.

I can see the issue when following your steps:

 Try to use this course: <em><u>hidden link</u></em> and click on Register Button, Proceed to the Registration form and look the behaviour of the system... the frame turn in french.

#1,
Actually, I landed on this page hidden link => This is a French page.
The button "Proceed to the registration" should be changed to this link hidden link

#2,
Even so, this page hidden link is still displaying the form in French.

This form is created by the shortcode [ESPRESSO_CHECKOUT]. Can you please let me know where you configure this form?

---
I need to take this note as well: The plugin "Event Espresso" is currently not in our WPML Plugin Compatibility list: https://wpml.org/documentation/plugins-compatibility/

November 7, 2016 at 4:00 pm #1131624

danielA-29

Hello ! Do I need to provide you more information ? We are still wondering why the WPML behave like this. thanks a lots for all your time again 🙂

November 8, 2016 at 4:40 am #1131983

Dat Hoang

I have 2 questions above. Can you please help me to answer them?

We are still wondering why the WPML behave like this.

Well, I don't have the exact answer at the moment because it depends on how this plugin works.

November 8, 2016 at 3:11 pm #1132529

danielA-29

Hello Dat, I just noticed that there is 2 pages on this threads... sorry.. i didn't see your question.
1) You are totally right for the button Proceed to registration. The link must be changed but I'm not sure how to repair this
2) The form [ESPRESSO_CHECKOUT] is set at: 1 click on General setting under event espresso tab - click on critical page tab at the top of the page and the Espresso checkout form is the first item.

2016-11-08_10-07-35.png
November 9, 2016 at 8:43 am #1132984

Dat Hoang

hidden link

I need to know where these strings are saved.

If they're saved in wp_options, you or your plugin/theme author need to create a wpml-config.xml to let WPML knows which settings need to have the translations.

After that, you can translate these options under WPML > String Translation
Reference:
+ https://wpml.org/faq/translating-entries-in-wp_options/
+ https://wpml.org/documentation/support/language-configuration-files/ , section "4. Admin texts / wp_options"

If not, I am afraid of that I can not help you at the moment. The plugin author needs to co-operate with our compatibility team.

I'm trying to install Adminer plugin hidden link to check your database. However, your FTP is still wrong. Can you please update your credentials in your last response?

November 15, 2016 at 9:56 pm #1137290

danielA-29

[removed_private_details]

November 16, 2016 at 1:54 pm #1137722

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

Dat is off today, so I will take care of this ticket, hope that is Ok.

Please don't post details on public as this may cause security issue If you want to give details please let us know we will open a private reply for you.

I have found the FTP details but it's not working for me, so could you please provide me the FTP details again. I have enabled the private reply for you.

I look forward to your reply.

Thanks

November 17, 2016 at 10:30 am #1138328

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

The ftp details are still not working, it seems like there is IP restrictions, could you please check this?

Further to debug this issue, would you mind sending me wp-content folder and database backup?? You can download those file and share it using google drive.

I look forward to your reply.

November 18, 2016 at 4:53 pm #1139585

Andrey
Supporter

Timezone: Europe/Kiev (GMT+03:00)

Sorry for the delay!

This is Andrey here from the WPML support team. Shekhar has passed your ticket to me. I hope this is OK. I will try to assists you further.

I've got the access details and they are working for me. I'll take a look at the issue and let you know as soon as I know more.

Thanks.

November 18, 2016 at 6:11 pm #1139625

danielA-29

Thanks a lots Andrey. I appreciate it a lots ! I'm available if you have any question! 🙂

November 21, 2016 at 2:46 pm #1140769

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

I am Sumit. Andrey is not available right now so I will handle this issue. I hope it is okay.

Right now as Andrey passed the information to me that URL of form is incorrect. It should be English URL but it is same for both languages.
I checked by correcting URL but form still stay the same. The form have labels in both language so this not the issue I guess ? Please correct me if I am wrong.

I found the registeration page is set in form setting that's why we are getting same page in both language. We need to register this string and have to translate it to have different form URLs. Please allow me some time I am checking the code of this plugin I will get back to you once I find the complete information.

Thanks

November 21, 2016 at 7:52 pm #1141033

danielA-29

Thanks you Sumit, I appreciate your help. If there is something I can do for you let me know.

November 22, 2016 at 10:34 am #1141440

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Registration page ID is saved in WP option table and they are using get_post function thus WPML can not translate the page permalink.
I've adjusted the code to translate the permalink. Can you please go to \wp-content\plugins\event-espresso-core-reg\core\EE_Config.core.php line number 1810
and replace the below code

public function reg_page_url() {
		if ( ! $this->reg_page_url ) {
			$this->reg_page_url = add_query_arg(
				array( 'uts' => time() ),
				get_permalink( $this->reg_page_id )
			) . '#checkout';
		}
		return $this->reg_page_url;
	}

with

public function reg_page_url() {
		if ( ! $this->reg_page_url ) {
			$this->reg_page_url = add_query_arg(
				array( 'uts' => time() ),
				get_permalink(  apply_filters( 'wpml_object_id', $this->reg_page_id, 'page', true ) )
			) . '#checkout';
		}
		return $this->reg_page_url;
	}

Then check you will see translated page link with /en/ OR please let me know if you want me to do this?
Please make full backup of site files.

Thanks