Search…
Locale and currency
Understand how to use locale and currency.
A locale is a designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code (for example, en-US). When you set up your store in Global Commerce, you specified a default locale. Your store automatically shows the language and currency of the default locale.
A locale is a designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code (for example, en-US). When you set up your store in Global Commerce, you specified a default locale. Your store automatically shows the language and currency of the default locale.
The currency is a designatory that uses a three-letter currency code to identify the currency.
When creating a shopper through Commerce API, the default locale and currency can be specified in the request body; if the locale and currency are not provided, then it will use the default locale and currency for this shopper.
When creating a shopper through Commerce API, the default locale and currency can be specified in the request body; if the locale and currency are not provided, then it will use the default locale and currency for this shopper.
1
{
2
"shopper": {
3
"username": "[email protected]",
4
"firstName": "Automation",
5
"lastName": "Tester",
6
"emailAddress": "[email protected]",
7
"password": "qwerasdf",
8
"locale": "en_CH",
9
"currency": "CHF",
10
"sendMail": true,
11
"sendEMail": true
12
}
13
}
Copied!
After the shopper adds a product to create a shopping cart, the locale and currency of the shopping cart will be the default for the current shopper's cart.
The shopper can update their default locale and currency for their current shopping cart by using the /shoppers/me endpoint.
Last modified 5mo ago
Copy link