getLocaleValue(localeKey [, localePath] [, localeRuleKey])
Obtains the localized value of a string from the localization store.
Returns
The localized value as a string.
Parameters
Name | Type | Description | Required |
localeKey | string | The string to be localized. | ✅ |
localePath | string | The locale category in the locale JSON. | ❌ |
localeRuleKey | string | The key in the localization store. | ❌ |
Usage example
In this example, the API returns Primeiro nome
as the localized
value.
PCore.getLocaleUtils().getLocaleValue("First Name", "", "WORK-HOME!VIEW!PERSONALINFO");
//The localization store has the following structure
{
"WORK-HOME!VIEW!PERSONALINFO" : {
"fields" : {
"First Name" : "Primeiro nome",
"Last Name" : "Último nome"
}
}
}
Previous topic getLocaleForRule([localeRuleKey]) Next topic getTimeZoneInUse()