Functions

Index

addLocale

Adds the locale.

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

Parameters:

  • 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

▸ addMapper(mapper: LocaleMapper): void

Parameters:

  • mapper: LocaleMapper

Returns void


booleanToStr

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

Parameters:

  • bool: boolean
  • format: string, Optional

Returns string


dateTimeToStr

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

Parameters:

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

Returns string


getCurrentLocale

Gets the current locale ID.

▸ getCurrentLocale(): string

Returns string - The locale.


getLocaleSettings

▸ getLocaleSettings(): LocaleSettings

Returns LocaleSettings


getLocales

Gets added locales with their names.

▸ getLocales(): LocaleInfoItem[]

Returns LocaleInfoItem[] - The locales.


getLongMonthName

▸ getLongMonthName(monthNum: number): string

Parameters:

  • monthNum: number

Returns string


getLongWeekDayName

▸ getLongWeekDayName(dayNum: number): string

Parameters:

  • dayNum: number

Returns string


getOneLocaleSetting

▸ getOneLocaleSetting(key: string): any

Parameters:

  • key: string

Returns any


getShortMonthName

▸ getShortMonthName(monthNum: number): string

Parameters:

  • monthNum: number

Returns string


getShortWeekDayName

▸ getShortWeekDayName(dayNum: number): string

Parameters:

  • dayNum: number

Returns string


getText

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

Parameters:

  • 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

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

Parameters:

  • number: number
  • format: string, Optional

Returns string


resetLocales

▸ resetLocales(): void

Returns void


setCurrentLocale

Sets the curent locale.

▸ setCurrentLocale(localeId: string): void

Parameters:

  • localeId: string - The locale.

Returns void


setLocale

Sets the curent locale.

▸ setLocale(l: string): void

Parameters:

  • l: string - The locale.

Returns void


updateDefaultTexts

▸ updateDefaultTexts(texts: TextResources): void

Parameters:

Returns void


updateLocaleInfo

Updates the information for the specified locale.

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

Parameters:

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

Returns void


updateLocaleSettings

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

▸ updateLocaleSettings(settingsToUpdate: LocaleSettings): void

Parameters:

Returns void


updateLocaleTexts

Updates the texts for the current locale

▸ updateLocaleTexts(texts: TextResources): void

Parameters:

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

Returns void