Checkout Language
Overview
The Inflow checkout is translated into 40 languages. When you create a checkout session through the API, you can set the language it opens in with locale. When you don't, the checkout picks a language from the buyer's browser.
The language applies to the checkout's own text: labels, buttons, payment method names, form validation messages, the reasons a payment is declined, and the confirmation screen. Amounts and dates are written the way that language writes them, for example 12,34 € in French and €12.34 in English. Product names and descriptions are shown as you send them.
Setting the Language
Send locale when you create the checkout session:
| Endpoint | locale |
|---|---|
POST /api/checkout/sessions/one-time-payment | Supported |
POST /api/checkout/sessions/subscription/{subscriptionOfferId} | Supported |
locale takes one of the codes below, or auto. Send the code exactly as written: any other value, such as en-US, FR or french, is refused with a validation error.
Leaving locale out and sending auto do the same thing: the checkout picks the language from the buyer's browser.
Checkouts opened from a payment link or a subscription offer's link always pick the language from the buyer's browser.
curl -X POST https://api.inflowpay.com/api/checkout/sessions/one-time-payment \
-H "X-Inflow-Api-Key: inflow_prod_your_key" \
-H "Content-Type: application/json" \
-d '{
"currency": "EUR",
"products": [{ "name": "Product", "price": 4999, "quantity": 1 }],
"locale": "fr"
}'Supported Languages
| Code | Language | Shown in the language selector as |
|---|---|---|
bg | Bulgarian | Български |
cs | Czech | Čeština |
da | Danish | Dansk |
de | German | Deutsch |
el | Greek | Ελληνικά |
en | English (United States) | English (US) |
en-GB | English (United Kingdom) | English (UK) |
es | Spanish (Spain) | Español (España) |
es-419 | Spanish (Latin America) | Español (Latinoamérica) |
et | Estonian | Eesti |
fi | Finnish | Suomi |
fil | Filipino | Filipino |
fr | French (France) | Français (France) |
fr-CA | French (Canada) | Français (Canada) |
hr | Croatian | Hrvatski |
hu | Hungarian | Magyar |
id | Indonesian | Bahasa Indonesia |
it | Italian | Italiano |
ja | Japanese | 日本語 |
ko | Korean | 한국어 |
lt | Lithuanian | Lietuvių |
lv | Latvian | Latviešu |
ms | Malay | Bahasa Melayu |
mt | Maltese | Malti |
nb | Norwegian Bokmål | Norsk bokmål |
nl | Dutch | Nederlands |
pl | Polish | Polski |
pt | Portuguese (Portugal) | Português (Portugal) |
pt-BR | Portuguese (Brazil) | Português (Brasil) |
ro | Romanian | Română |
ru | Russian | Русский |
sk | Slovak | Slovenčina |
sl | Slovenian | Slovenščina |
sv | Swedish | Svenska |
th | Thai | ไทย |
tr | Turkish | Türkçe |
vi | Vietnamese | Tiếng Việt |
zh | Chinese (Simplified) | 简体中文 |
zh-HK | Chinese (Traditional, Hong Kong) | 繁體中文(香港) |
zh-TW | Chinese (Traditional, Taiwan) | 繁體中文(台灣) |
How the Checkout Picks the Language
- The session's
locale, when you set one. - The buyer's browser languages, in the buyer's order of preference, using the first one the checkout supports. A browser set to Brazilian Portuguese gets
pt-BR; one set to Portuguese from Portugal getspt. - The buyer's country, when none of the browser languages is supported.
- English (
en), when neither gives a supported language.
On the hosted checkout, the buyer can change the language at any time from the language selector, including when you set locale.
Embedded Checkout
The embedded checkout follows the same rules, without the language selector: it opens in the session's locale, or in the language picked from the buyer's browser. Set locale on the session to choose the language of an embedded checkout. The SDK's locale option doesn't change it.
Notes
- To set the checkout's colours, font and corner style, see Session Customization.
Updated about 5 hours ago
