Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

setLocaleForRule(localeJson, localeRuleKey)

Updated on July 20, 2021

Sets the locale JSON for a rule.

Returns

Not applicable.

Parameters

NameTypeDescriptionRequired
localeJsonobjectThe locale JSON that must be set for the rule.
localeRuleKeystringThe 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"
         }
     },
     .
     .
     .
}

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us