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:

Endpointlocale
POST /api/checkout/sessions/one-time-paymentSupported
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

CodeLanguageShown in the language selector as
bgBulgarianБългарски
csCzechČeština
daDanishDansk
deGermanDeutsch
elGreekΕλληνικά
enEnglish (United States)English (US)
en-GBEnglish (United Kingdom)English (UK)
esSpanish (Spain)Español (España)
es-419Spanish (Latin America)Español (Latinoamérica)
etEstonianEesti
fiFinnishSuomi
filFilipinoFilipino
frFrench (France)Français (France)
fr-CAFrench (Canada)Français (Canada)
hrCroatianHrvatski
huHungarianMagyar
idIndonesianBahasa Indonesia
itItalianItaliano
jaJapanese日本語
koKorean한국어
ltLithuanianLietuvių
lvLatvianLatviešu
msMalayBahasa Melayu
mtMalteseMalti
nbNorwegian BokmålNorsk bokmål
nlDutchNederlands
plPolishPolski
ptPortuguese (Portugal)Português (Portugal)
pt-BRPortuguese (Brazil)Português (Brasil)
roRomanianRomână
ruRussianРусский
skSlovakSlovenčina
slSlovenianSlovenščina
svSwedishSvenska
thThaiไทย
trTurkishTürkçe
viVietnameseTiếng Việt
zhChinese (Simplified)简体中文
zh-HKChinese (Traditional, Hong Kong)繁體中文(香港)
zh-TWChinese (Traditional, Taiwan)繁體中文(台灣)

How the Checkout Picks the Language

  1. The session's locale, when you set one.
  2. 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 gets pt.
  3. The buyer's country, when none of the browser languages is supported.
  4. 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


Did this page help you?