setLocaleForRule(localeJson, localeRuleKey)
Sets the locale JSON for a rule.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
localeJson | object | The locale JSON that must be set for the rule. | ✅ |
localeRuleKey | string | The key to the rule whose locale JSON must be set. | ✅ |
Usage example
In this example, the API sets the locale JSON for the
WORK-HOME!VIEW!PERSONALINFO
key.
PCore.getLocaleUtils().setLocaleForRule({ "fields" : {"First Name" : "Primeiro nome","Last Name" : "Último nome"}}, "WORK-HOME!VIEW!PERSONALINFO");
//After the API is called, the localization store has the following structure
{
"WORK-HOME!VIEW!PERSONALINFO" : {
"fields" : {
"First Name" : "Primeiro nome",
"Last Name" : "Último nome"
}
},
.
.
.
}
Previous topic resetLocaleStore() Next topic setTimezone(timezone)