SystemOptionsServicesCreateCustomLocale Method
|
Creates a custom Locale entry. Custom locales are language defined for very specific region, that are not covered by the built-in list of locales.
Examples
We could create a custom locale "en-us-tx", named "Texas English", but a site that is targetted to audiences in Texas.
Namespace:
IngeniuxCMService
Assembly:
IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.3.169
Syntax public XHRServiceResponseGeneric<IgxLocale> CreateCustomLocale(
string locale,
string baseLocale,
string englishName
)
Public Function CreateCustomLocale (
locale As String,
baseLocale As String,
englishName As String
) As XHRServiceResponseGeneric(Of IgxLocale)
public:
virtual XHRServiceResponseGeneric<IgxLocale>^ CreateCustomLocale(
String^ locale,
String^ baseLocale,
String^ englishName
) sealed
abstract CreateCustomLocale :
locale : string *
baseLocale : string *
englishName : string -> XHRServiceResponseGeneric<IgxLocale>
override CreateCustomLocale :
locale : string *
baseLocale : string *
englishName : string -> XHRServiceResponseGeneric<IgxLocale>
Parameters
- locale
- Type: SystemString
Name of the custom locale, cannot be a duplicate of a built-in locale or another custom locale - baseLocale
- Type: SystemString
The built-in locale this custom locale is based on
Examples
"Texas English (en-us-tx)" is created based on "English United States (en-us)";
Remarks Custom locales must be on a built-in locale, or returns error status
- englishName
- Type: SystemString
The descriptive name of the custom locale in English
Return Value
Type:
XHRServiceResponseGenericIgxLocaleThe information for created custom locale
Examples
Sample JSON return
{
"code": 0,
"error": null,
"message": {
"BaseLocale": "en-US",
"EnglishName": "Texas English",
"Locale": "en-us-tx",
"Name": "en-US"
}
}
Remarks If base locale doesn't exist as a built-in locale, returns error status
If locale name or English name is not provided, returns error status
If another built-in for custom locale already using the same locale name (not English name), returns error status
See Also