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.
PayPal's sdk/js
does not use 'locale' as an object key parameter. That syntax is from the old 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/sdk/js/configuration/#locale