Reputation: 4079
I'm working on a multi-lingual online store for customers in Ireland who speak English, Latvian and Russian.
PayPal is available in English and Russian (and others) but not Latvian.
I would like to have my form sent to PayPal setting it to show in English by default, or Russian if the customer is reading the store in Latvian or Russian.
The problem is that the API code for this, LOCALECODE, requires both the country and the language. So for example, ie_EN would be Ireland-localised English (which PayPal doesn't support), ie_LV would be Ireland-localised Latvian (again not supported) and ie_RU would be Ireland-localised Russian (again, etc).
Is there a generic way of saying "just use the language, please", without needing to hard-code a list of available languages?
Upvotes: 0
Views: 1376
Reputation: 650
I do not know whether you had figure out this issue.
You can follow these:
For Example : https://www.paypal.com/cgi-bin/webscr?locale.x=zh_HK
You can add up "locale.x=language value allowed by paypal".
I follow this and there is okay.
Upvotes: 0
Reputation: 19356
You used to be able to send LOCALECODE=EN
, but that has now been superseded by the more traditional LOCALECODE=en_US
.
If it's just two languages you're worried about, I'm not sure what's the problem in a simple if-statement to set the correct language?
Upvotes: 2