- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. Client side, is there a way to setup the language (french, english, etc.) to be used? Maybe with some "lang" attribute...
my code is like:
<script src="https://www.paypal.com/sdk/js?client-id={{ ppClientId }}¤cy=EUR"></script>
paypal.Buttons({
style: {
shape: 'pill',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
currency_code: "EUR",
value: "{{ price }}",
},
invoice_id: "{{ invoice.ppInvoiceId }}",
custom_id: "{{ invoice.ppCustomId }}",
}],
{# application_context: {
shipping_preference: "SET_PROVIDED_ADDRESS",
}, #}
payer: {
email_address: "{{ email }}",
name: {
given_name: "{{ firstname }}",
surname: "{{ lastname }}",
},
{# phone: {
phone_number: "{{ phone }}"
}, #}
address: {
address_line_1: "{{ streetAddress1 }}",
address_line_2: "{{ streetAddress2 }}",
postal_code: "{{ postalCode }}",
country_code: "{{ countryCode | upper}}",
admin_area_2: "{{ city | upper}}",
}
}
});
},
...
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @thierryler,
Thank you for posting to the PayPal community.
Yes, you can achieve by passing "locale" attribute.
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&locale=fr_FR"></script>
Locale: The locale renders components. By default PayPal smartly detects the correct locale for the buyer based on their geolocation and browser preferences. It is recommended to pass this parameter only if you need the PayPal buttons to render in the same languages the rest of your site.
https://developer.paypal.com/sdk/js/configuration/#link-locale
https://developer.paypal.com/api/rest/reference/locale-codes/
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @thierryler,
Thank you for posting to the PayPal community.
Yes, you can achieve by passing "locale" attribute.
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&locale=fr_FR"></script>
Locale: The locale renders components. By default PayPal smartly detects the correct locale for the buyer based on their geolocation and browser preferences. It is recommended to pass this parameter only if you need the PayPal buttons to render in the same languages the rest of your site.
https://developer.paypal.com/sdk/js/configuration/#link-locale
https://developer.paypal.com/api/rest/reference/locale-codes/
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have added "&locale=en_GB" to my script, but the language will not change to english and remains in German
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Couldn't receive International payment in PayPal Payments Standard
- Assistance Needed: Passing and Retrieving Custom Data in PayPal Webhook Payload in PayPal Payments Standard
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- Why does PayPal redirect to different pages (login vs credit card form) depending on browser mode? in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- Paypal via Adyen Permission Denied in REST APIs