Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active April 29, 2016 17:39
Show Gist options
  • Save joshfeck/6c37bc00ae0b301a53148444f3326817 to your computer and use it in GitHub Desktop.
Save joshfeck/6c37bc00ae0b301a53148444f3326817 to your computer and use it in GitHub Desktop.
Set the language of the PayPal payment page from Event Espresso 4
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter( 'FHEE__EEG_Paypal_Standard__set_redirection_info__arguments', 'jf_ee_add_paypal_language_code' );
function jf_ee_add_paypal_language_code( $redirect_args ) {
$redirect_args[ 'lc' ] = 'GB';
return $redirect_args;
}

The following two-character country codes are supported by PayPal:

  • 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

The following 5-character codes are also supported for languages in specific countries:

  • da_DK — Danish (for Denmark only)
  • he_IL — Hebrew (all)
  • id_ID — Indonesian (for Indonesia only)
  • ja_JP — Japanese (for Japan only)
  • no_NO — Norwegian (for Norway only)
  • pt_BR — Brazilian Portuguese (for Portugal and Brazil only)
  • ru_RU — Russian (for Lithuania, Latvia, and Ukraine only)
  • sv_SE — Swedish (for Sweden only)
  • th_TH — Thai (for Thailand only)
  • tr_TR — Turkish (for Turkey only)
  • zh_CN — Simplified Chinese (for China only)
  • zh_HK — Traditional Chinese (for Hong Kong only)
  • zh_TW — Traditional Chinese (for Taiwan only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment