[Disclaimer: I am not sure if PayPal supports this]
Hello,
I am trying to get the response to PayPal REST API calls in a specific language. For instance, https://developer.paypal.com/docs/api/orders/v2/#orders_capture always returns a response in English. What if I'd like to have a response in Spanish?
ChatGPT suggested to use the "Accept-Language" header with codes like "it_IT", but no luck!
I also tried to set the payment_source
and the locale
option within it, but no luck!
There is no option to change the response language of API calls. They will always be in English (US).
To show site messages in a different language, have your code look at the error
+ issue
of the responses only (all capital letters with underscores) and, based on these identifiers, show the message/description of your choice for the situation, in the desired language.
Orders API errors are documented here.