• Resolved Schoelje

    (@schoelje)


    Our users complained that after the Give donation form was submitted the Paypal payment page was shown in the Dutch language. Although for some that is not a problem, for most it resulted in not donating at all to our project. Our site runs completely in English and I don’t have any other language configured. I temporarily switched to Seamless donation which shows the Paypal payment page in English but I’d prefer to use Give.

    How can I force en_US as the default locale for the Paypal payment page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Hey @schoelje – This seems strange, according the paypal:

    The locale of the checkout login or sign-up page. PayPal provides localized checkout pages for some countries and languages.

    https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

    As well, “The default is US.” Meaning, US is the default country and PayPal will do it’s best effort to pass the preferred language elsewhere. So, I’m not sure WHY this would be happening on your end. I also have not heard reports from other Give users of this functionality. Perhaps, and this is completely possible, PayPal is having issues with their system’s localization targeting.

    The one solution I can think of is to pass directly the US via the lc parameter. Like so:

    /**
     * Customize the PayPal Standard language.
     *
     * @param $paypal_args
     * @param $donation_data
     *
     * @return mixed
     */
    function give_customize_paypal_locale( $paypal_args, $donation_data ) {
    
    	if ( isset( $paypal_args['lc'] ) ) {
    		$paypal_args['lc'] = 'US';
    	}
    
    	return $paypal_args;
    
    }
    
    add_filter( 'give_paypal_redirect_args', 'give_customize_paypal_locale', 10, 2 );

    Add that function to your site, it should ensure English is the standard language. Here’s an article on how to add the function if you’re unsure how: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Thanks!

    Thread Starter Schoelje

    (@schoelje)

    Thanks for your fast reply. Unfortunately, that didn’t change the language of the payment page.

    Thread Starter Schoelje

    (@schoelje)

    The only thing I can think of is that Paypal knows our business is based in the Netherlands. It seems that I’m not the only one when I found this help page of another company instructing their users to change the language manually which is something I’d like to prevent.

    Plugin Author Devin Walker

    (@dlocc)

    Hi @schoelje – Sorry to hear that didn’t work. I don’t have another solution for you other than to suggest you call them and inquire directly with the gateway or switch payment gateways. Thanks for using Give though ??

    Please let me know if I can help any further.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paypal payment page language’ is closed to new replies.