Skip to main content


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

getSvcLocale(locale, key)

Updated on July 20, 2021

Obtains the localization instance from the Constellation service for a given user locale and an instance key. This call is authenticated by the Constellation service, using the issued B2S JWT token.

Returns

A promise that resolves to a locale JSON.

Parameters

NameTypeDescriptionRequired
localestringThe name of the locale for which the localization instance must be obtained.
keystringThe name of the localization instance that must be obtained.

Usage example

In this example, the API obtains the locale JSON for the en_US locale and for the PyCaseSummary view in the Work- class. This API call returns a promise which when resolved gives the locale JSON.

const localeJson = await AssetLoader.getSvcLocale('en_US', 'WORK-!VIEW!PYCASESUMMARY.json')
      .then((data) => {
         // data is the response from the constellation service which is the locale JSON
      });

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