Culture Formats Override#
There is the possibility to override the current culture formatter configs by adding a specific set of key/value pairs to the config.json file. The new configs are under "general" and have the following basic structure:
- currency - Specific overrides to format the currency numeric values.
- symbol (string) - Currency symbol to use (note: since this could be also defined in
/Cmf/Guis/Configuration/CurrencyFormat/Symbolthat config has precedence over the one in config.json; if non defined, defaults to the current culture symbol) - decimalPlaces (number) - Currency fixed number of decimal places to use (note: since this could be also defined in
/Cmf/Guis/Configuration/CurrencyFormat/DecimalPlaces/that config has precedence over the one in config.json; if non defined, defaults to the current culture currency decimal places)
- symbol (string) - Currency symbol to use (note: since this could be also defined in
- number - Overrides to format any numeric values.
- decimalPlaces (number) - Maximum number of decimal places that a number can display (currency numeric values not affected) (defaults to current culture decimal places if not defined)
- thousandSeparator (string) - String to separate thousand groupings. (defaults to current culture separator if not defined)
- decimalSeparator (string) - String to separate the decimal part in a number (defaults to current culture separator if not defined)
- dateTime - Overrides to format any date values.
- date (string) - Date format (defaults to current culture). Supported formats:
DD/MM/YYYYMM/DD/YYYYDD/MMMM/DDDD.MM.YYYYYYYY/MM/DD
- time (string) - Time format (defaults to current culture). Supported formats:
HH:mmhh:mm AHH:mm:sshh:mm:ss A
- firstDayOfWeek (string) - First day of week (defaults to current culture). Supported formats:
SundayMondayTuesdayWednesdayThursdayFridaySaturday
- date (string) - Date format (defaults to current culture). Supported formats:
Example config.json:
"general": {
"supportedCultures": [
"en-US",
"pt-PT",
"de-DE",
"vi-VN",
"zh-CN",
"zh-TW",
"es-ES",
"pl-PL"
],
"formatter": {
"currency": {
"symbol": "@",
"decimalPlaces": 2
},
"number": {
"decimalPlaces": 5,
"thousandSeparator": " ",
"decimalSeparator": ","
},
"datetime": {
"date": "YYYY/DD/MM",
"time": "HH:mm:ss",
"firstDayOfWeek": "Monday"
}
},
"supportedThemes": [
"cmf.style.blue",
...
]
}