Class: locale

.PS. locale

new window.PS.locale()

source/controller/LocaleController.js, line 25
Locale controller manage translations and language-specific assets
Author:
  • viktorl

Extends

  • starsGDK.Class

Methods

staticwindow.PS.locale.getCurrency(number, showCurrencySymbol, decimalAfterSeparator){String}

source/controller/LocaleController.js, line 197
Return amount based on current locale
Name Type Description
number Number | String
showCurrencySymbol Boolean optional, default True
decimalAfterSeparator Number optional, default 2
Returns:
Type Description
String

staticwindow.PS.locale.getCurrencyISO(){String}

source/controller/LocaleController.js, line 256
Return current currency ISO
Returns:
Type Description
String

staticwindow.PS.locale.getCurrencySymbol(){String}

source/controller/LocaleController.js, line 248
Return currency symbol for current locale
Returns:
Type Description
String

staticwindow.PS.locale.getCurrencySymbolByISO(currencyISO){String}

source/controller/LocaleController.js, line 265
Return currency symbol based on ISO
Name Type Description
currencyISO String
Returns:
Type Description
String

staticwindow.PS.locale.getCurrencySymbolPlacement(){String}

source/controller/LocaleController.js, line 302
Return currency symbol placement for current locale
Returns:
Type Description
String

staticwindow.PS.locale.getCurrentLocale(){String}

source/controller/LocaleController.js, line 278
Return current locale string representation
Returns:
Type Description
String

staticwindow.PS.locale.getDecimalSeparator(){String}

source/controller/LocaleController.js, line 286
Return current locale decimal separator
Returns:
Type Description
String

staticwindow.PS.locale.getFormattedCurrencyValueNoSymbol(number){String}

source/controller/LocaleController.js, line 223
Format amount without currency symbol
Name Type Description
number Number | String
Returns:
Type Description
String

staticwindow.PS.locale.getGroupSeparator(){String}

source/controller/LocaleController.js, line 294
Return current locale group separator
Returns:
Type Description
String

staticwindow.PS.locale.getIsPlayForFun(){Boolean}

source/controller/LocaleController.js, line 310
Return flag if current mode is play for fun
Returns:
Type Description
Boolean

staticwindow.PS.locale.getMessage(tagId, params){String}

source/controller/LocaleController.js, line 167
Return message based on current locale
Name Type Description
tagId String
params Array | false
Returns:
Type Description
String

staticwindow.PS.locale.resetCurrencyObserversCallbacks()

source/controller/LocaleController.js, line 382
Reset observers callbacks

staticwindow.PS.locale.resetLocaleObserversCallbacks()

source/controller/LocaleController.js, line 367
Reset observers callbacks

staticwindow.PS.locale.unsubscribeFromLocaleUpdate(callbackId)

source/controller/LocaleController.js, line 340
Unsubscribe observer from language update
Name Type Description
callbackId String | Array either single String callback ID or an array with callbackID's to unsubscribe from