The text displayed on the Checkout page can be rendered in multiple languages. It is possible to allow the customer to select a language on the page and to set a preferred language to be used by default. The list of available languages and default values can be found in the Checkout documentation. It is also possible to only display a single language and remove the option for the cardholder to select a different language.
Additionally, the amount
of the transaction is displayed on the page based the regional formatting corresponding to the locale of the browser.
Example: The $ sign would be in front of an amount for France, but after the amount in Germany. The separator might change from "," to "." etc.
The i18n
field in the create Checkout API call is used to configure the localisation settings. In the i18n
object the defaultLanguage
and showLanguageOptions
fields can be used for the following scenarios:
Setting a language and not allowing the user to change the language
{
...
"i18n":{
"defaultLanguage": "en",
"showLanguageOptions": false,
}
...
}
Setting a language and allowing the user to change the language
{
...
"i18n":{
"defaultLanguage": "en",
"showLanguageOptions": true,
}
...
}
As an example, French language with an option to change the language would be configured like this:
{
...
"i18n":{
"defaultLanguage": "fr",
"showLanguageOptions": true,
}
...
}