Skip to content

Functions

Adds the locale.

▸ addLocale(localeId: string,localeInfo: LocaleInfo): void

  • localeId: string - The locale ID (like ‘en’, ‘de’, ‘uk’, etc). If the locale does exist yet - it will be created
  • localeInfo: LocaleInfo - a LocaleInfo object that contains the locale settings and textual resources

Returns void


▸ addMapper(mapper: LocaleMapper): void

  • mapper: LocaleMapper

Returns void


▸ booleanToStr(bool: boolean,format?: string): string

  • bool: boolean
  • format: string, Optional

Returns string


▸ dateTimeToStr(dateTime: Date,dataType: DataType,format?: string): string

  • dateTime: Date
  • dataType: DataType
  • format: string, Optional

Returns string


Gets the current locale ID.

▸ getCurrentLocale(): string

Returns string - The locale.


▸ getLocaleSettings(): LocaleSettings

Returns LocaleSettings


Gets added locales with their names.

▸ getLocales(): LocaleInfoItem[]

Returns LocaleInfoItem[] - The locales.


▸ getLongMonthName(monthNum: number): string

  • monthNum: number

Returns string


▸ getLongWeekDayName(dayNum: number): string

  • dayNum: number

Returns string


▸ getOneLocaleSetting(key: string): any

  • key: string

Returns any


▸ getShortMonthName(monthNum: number): string

  • monthNum: number

Returns string


▸ getShortWeekDayName(dayNum: number): string

  • dayNum: number

Returns string


Returns localized text by the key defined in parameter. Here we get the text of the resource string assigned to CmdClickToAddCondition key:

▸ getText(args: string[]): string

  • args: string[] - The keys of the resource string.

Returns string - Text of the resource defined by key or null if the key is not found


▸ numberToStr(number: number,format?: string): string

  • number: number
  • format: string, Optional

Returns string


▸ resetLocales(): void

Returns void


Sets the curent locale.

▸ setCurrentLocale(localeId: string): void

  • localeId: string - The locale.

Returns void


Sets the curent locale.

▸ setLocale(l: string): void

  • l: string - The locale.

Returns void


▸ updateDefaultTexts(texts: TextResources): void

Returns void


Updates the information for the specified locale.

▸ updateLocaleInfo(localeId: string,localeData: LocaleInfo): void

  • localeId: string - The locale ID (like ‘en’, ‘de’, ‘uk’, etc). If the locale does exist yet - it will be added
  • localeData: LocaleInfo

Returns void


Updates the locale settings (date/time formats, separators, etc) for the specified locale.

▸ updateLocaleSettings(settingsToUpdate: LocaleSettings): void

Returns void


Updates the texts for the current locale

▸ updateLocaleTexts(texts: TextResources): void

  • texts: TextResources - A plain JS object that contains textual resources

Returns void