For elements of the Commerce portal that is not managed from the Commerce Administration where localisation options are available, localisation is maintained from the Digital Sales Platform.
There are differences when maintaining locale files between the CPQ/CRM and Commerce application. This section is only applicable for the maintenance of localisation support in the Commerce portal.
In Commerce, 3 languages are pre-delivered as follows:
Note: To update the locales (e.g. to change the description of an attribute), please contact your customer success manager for the most updated 'translation.json' file and follow the steps in the next section.
Maintaining Custom Locale Files
Note: Maintenance according to the exact directory structure is important as it is mapped to how the system retrieves files to be implemented in the Commerce application.
In the Digital Sales Platform, navigate to ‘Administration’ > 'Content Management' > ‘userdata’ > ‘attachment’ > ‘PortalSettings’:
Click on the ‘locales’ folder. (If this is a new system, please create it.) All locale files are maintained within, in subfolders for each language:
For this example, the system is overwritten to be delivered in an updated German locale. Within 'locales' > 'de', the file 'translation.json' containing the German translations is updated:
The structure must be /locales/<localeKey>/translation.json where in this example, <localeKey> is 'de'.
Note: Please contact your customer success manager for the most updated 'translation.json' file; always be sure to validate if there is any markup error. An online tool such as https://jsonlint.com/ may be used to validate.
Load Order and Logic
When a user logs into Commerce, the system will first check the locale value of the user. Once the locale value is obtained, the application will try to ping and fetch the translation file from the Digital Sales Platform content system. If a valid translation file is maintained, it will be used as the final translation source. Otherwise, the system-delivered language English file will be used.