getLocalizedValue(rawString, localePath, localeRuleKey)
Obtains the localized value of a string.
Returns
The localized value as a string.
Parameters
Name | Type | Description | Required |
rawString | string | The raw string whose localized value must be obtained. | ✅ |
localePath | string | The lookup path of the raw string. | ❌ |
localeRuleKey | string | The rule key in the localization store. | ❌ |
Usage example
In this example, the API returns Primeiro nome
for the
WORK-!VIEW!CANDIDATEINFO
rule.
const localizedString = getPConnect().getLocalizedValue("First Name", "fields", "WORK-!VIEW!CANDIDATEINFO");
//The localization store has the following structure
{
"WORK-!VIEW!CANDIDATEINFO.json" : {
"fields" : {
"First Name" : "Primeiro nome",
"Last Name" : "Último nome"
}
}
}
Previous topic getLocaleRuleName() Next topic getPageReference()