Class: Locales

Locales

Class for fetching locales based static text used in any widget

Constructor

new Locales()

Source:

Methods

(static) getStrings(widgetName, locale, function, function) → {jQueryPromise}

fetch static strings based on locale from widget's Locale json url. Runs
Parameters:
Name Type Description
widgetName string Required. Widget name for which locale strings needs to be fetched
locale string Optional.
function success Optional. function to call with response object from successful call. If not present, just returns the repsonse object value.
function failure Optional. function to call with the error object from a failed call. If not present, logs the error and returns the error object value.
Source:
Returns:
A promise that either returns the response/error or calls the passed callbacks.
Type
jQueryPromise