-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.CultureInfo.load
rescocrm edited this page May 15, 2023
·
9 revisions
[v10.2] Asynchronously gets the CultureInfo object for specified language/country.
Argument | Type | Description |
---|---|---|
culture | String | The name of culture that has to be loaded. The culture name is in the format language code-country where language code is a lowercase two-letter code derived from ISO 639-1. country is derived from ISO 3166 and usually consists of two uppercase letters |
callback | function(cultureInfo) | The callback function that is called asynchronously with initialized CultureInfo object as argument. |
errorCallback | function(errorMsg) | The errorCallback which is to be called in case of error. |
scope | Object | The scope for callbacks. |
This example demonstrates how to get specific culture information.
MobileCRM.CultureInfo.load("en-GB", function (info) {
///<param name='info' type='MobileCRM.CultureInfo' />
var cultureInfo = "Display name: " + info.displayName + "\n" +
"ISO name: " + info.ISOName + "\n" +
"Native name: " + info.nativeName + "\n\n" +
"Number format: " + JSON.stringify(info.numberFormat) + "\n\n" +
"DateTime format: " + JSON.stringify(info.dateTimeFormat) + "\n" +
"Right to left: " + info.isRightToLeft + "\n";
// for further details about date, time and number format,
// see MobileCRM.DateTimeFormat and MobileCRM.NumberFormat
MobileCRM.bridge.alert(cultureInfo);
}, MobileCRM.bridge.alert, null);