There is a parameter that can be used to pick a language (localize) the payment page that registrants/attendees see when they go to pay with PayPal Standard. This can be setup by relocating a copy of the PayPal Standard payment gateway for Event Espresso 3 to a safe location and then making an edit. This ensures that this customization is not lost on a software update.
Using Event Espresso 4 for your project? Check out this tutorial instead: https://gist.github.com/joshfeck/6c37bc00ae0b301a53148444f3326817
- Ensure that you are running a current version of Event Espresso 3. You can see the changelog for Event Espresso 3 here:
https://eventespresso.com/wiki/change-log/
-
Login to your WordPress site with an SFTP / FTP client. Cyberduck and FileZilla are free options. If you are on a Mac, then try Transmit.
-
Browse to this location:
/wp-content/plugins/event-espresso/gateways/paypal
-
Download a copy of the paypal folder to your computer
-
Using your SFTP / FTP client, browse to this location:
/wp-content/uploads/espresso/gateways
-
Now upload the paypal folder there
-
Browse into the paypal folder that you just uploaded here:
/wp-content/uploads/espresso/gateways/paypal
-
Look for the paypal_vars.php file and open it for editing.
-
Around line 122, you'll see the following:
$myPaypal->addField('currency_code', $paypal_cur);
$myPaypal->addField('image_url', empty($paypal_settings['image_url']) ? '' : $paypal_settings['image_url']);
$myPaypal->addField('no_shipping ', $no_shipping);
$myPaypal->addField('first_name', $fname);
$myPaypal->addField('last_name', $lname);
$myPaypal->addField('email', $attendee_email);
$myPaypal->addField('address1', $address);
$myPaypal->addField('city', $city);
$myPaypal->addField('state', $state);
$myPaypal->addField('zip', $zip);
- Change it to this:
$myPaypal->addField('currency_code', $paypal_cur);
$myPaypal->addField('lc', 'GB');
$myPaypal->addField('image_url', empty($paypal_settings['image_url']) ? '' : $paypal_settings['image_url']);
$myPaypal->addField('no_shipping ', $no_shipping);
$myPaypal->addField('first_name', $fname);
$myPaypal->addField('last_name', $lname);
$myPaypal->addField('email', $attendee_email);
$myPaypal->addField('address1', $address);
$myPaypal->addField('city', $city);
$myPaypal->addField('state', $state);
$myPaypal->addField('zip', $zip);
- Now you'll need to change GB (towards top of the sample code) which is the language code for United Kingdom (Great Britain) to your choice. These are available:
AU — Australia
AT — Austria
BE — Belgium
BR — Brazil
CA — Canada
CH — Switzerland
CN — China
DE — Germany
ES — Spain
GB — United Kingdom
FR — France
IT — Italy
NL — Netherlands
PL — Poland
PT — Portugal
RU — Russia
US — United States
For example, if you wanted to change the language to Spanish, then you could change GB in to ES.
- Save changes to the file
You can then try it out for yourself by registering for an event in a different web browser than what you are currently using. This will simulate a public registration similar to if a registrant/attendee registered for an event.
References:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
https://eventespresso.com/topic/paypal-is-loading-in-dutch-language-should-be-english/