How can I change the language of a PayPal Smart Payment Button?
My current code looks like this:
paypal.Buttons({
locale: 'en_US',
style: {
size: 'small',
color: 'gold',
shape: 'pill',
label: 'pay',
layout: 'horizontal',
fundingicons: 'false',
height: 46
}
}).render('#paypal-button-container');
Locale is not changing the language to English.
Smart Payment Buttons by PayPal are designed to improve the checkout experience and improve checkout conversions. With this integration, you can give customers the option to pay with PayPal, Venmo, and major credit cards and debit cards - on almost any device - when they checkout with PayPal.
Unfortunately, there is no way to remove the PayPal button from the smart buttons checkout as that is a core requirement of the smart buttons checkout.
PayPal's sdk/js
does not use a 'locale' option parameter. That syntax is from the older checkout.js
By default the language of the buttons will be according to the browser language setting. If you need to override this auto detection and force a particular language to match the rest of the site, for the current SDK you add the locale to the <script>
query string, as documented here: https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#locale
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With