Configure Organization Locales
Salesforce B2C Commerce is structured as an organization containing one or more sites (storefronts). Define localization settings for both entities.
You can add new data locales and transfer, add, delete, and update regional settings using Site Import/Export.
After you configure organization locales, you must configure site locales.
-
Assign the organization's default language by selecting Administration >
Organization > Organization Profile.
- Select the default UI language.
- Select the default data language.
- Click Apply.
-
Activate and deactivate the locales available in the instance by selecting
Administration > Global Preferences > Locales.
Only activated locales can be used in the storefront and appear in language select boxes in the Business Manager. The default locale is mandatory and can't be deactivated.
The en, de, and es language-specific locales are treated the same as any other locale in B2C Commerce. They can only be recognized and related to their respective country-locales (such as en_US and en_GB) via a language code (such as en). You can activate or deactivate them and edit their regional settings. You can also select them as a site's default or allowed locale, or a Business Manager's user preferred locale.
- Select a locale and click Apply to activate it.
- Deselect a locale and click Apply to deactivate it.
- Click a Locale ID.
- On the General tab, you can select the fallback locale. This is the locale that is used if the assigned locale isn't available.
- On the General tab, you can overwrite the default numeral system defined by the CLDR data for this locale by selecting a numeral system.
-
Click the Regional Settings tab to define how currency
appears for the locale.
Regional settings provide format patterns for locale-sensitive operations such as:
- Date/time
- Number format
- Currency format
The format for numbers is the Java DecimalFormat. The format for date and time is the Java SimpleDateFormat. For information about these formats, refer to the following sites.
- https://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html
- https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
B2C Commerce is pre-defined with default regional settings for a subset of the locales. You can change regional settings for each locale. Regional settings are globally defined (not site-specific).
Use these characters to define currency number, separator, and currency symbol placement: (# , . *).
Use the * symbol to specify where the currency symbol ($, ₤, or €) is placed. For example, look at the Long Currency Positive Pattern field for en_US. The * character indicates where the dollar symbol is placed.
-
Add new locales by selecting Administration > Global Preferences >
Locales.
By default, the country locale (for example, en_US) inherits data from the respective language locale (en), and the language locale (en) inherits from the locale default. You can configure locale inheritance.
You can disable the fallback behavior for each locale.
For example:
- A product description is in the en locale
- For the en locale, the fallback is disabled and there is no description for that product
- Nothing is returned
For each locale, you can configure the fallback to a different locale. For example, en_US can be configured to fall back to default instead of to en.
If a locale is configured as the fallback for another locale, you can't delete it; an error message appears.
For example:
- You configure en_US > en > default.
- You can't delete en because it's the fallback for en_US.
- Similarly, if you attempt to import en in delete mode, an error message appears in the import log.
- Click Add.
- On the New Locale page, enter the Language Code and Country Code, for example, fr and NL respectively, for the French locale: French - Netherlands (Locale code fr_NL).
- Click Apply.
- Click <<Back to List. Because this locale has already been added to B2C Commerce, you see the name as French (Netherlands).
-
Transfer, add, delete, and update locales and their regional settings by selecting
Administration > Site Development > Site Import &
Export.
- In the Data Units to Export section, expand Global Data.
- Select Locales.
- Enter your export file name and click Export.
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.