I am having problems with changing the language displated on the PayPal Button:
When I add the following code, the language does not change (according to the documentation, it should change):
paypal.Buttons({
locale: 'de_DE',
style: {
layout: 'vertical',
color: 'gold',
shape: 'pill',
label: 'pay',
tagline: false,
},
...
})
But when I change it in the script, it does change:
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD&locale=de_DE"></script>
How can I set the language by using Button configuration object and why it is not working as expected?
according to the documentation, it should change
Which documentation are you reading? Archived documentation for the older checkout.js?
The current PayPal Checkout documentation clearly states that if you need to set the button language to match your website language, locale should be specified on the script/SDK line.
But only do this if your website is in a specific language and you need it to match. Otherwise, the best language can be detected automatically.