Functions
- addLocale
- addMapper
- booleanToStr
- dateTimeToStr
- getCurrentLocale
- getLocaleSettings
- getLocales
- getLongMonthName
- getLongWeekDayName
- getOneLocaleSetting
- getShortMonthName
- getShortWeekDayName
- getText
- numberToStr
- resetLocales
- setCurrentLocale
- setLocale
- updateDefaultTexts
- updateLocaleInfo
- updateLocaleSettings
- updateLocaleTexts
addLocale
Section titled “addLocale”Adds the locale.
▸ addLocale(localeId: string,localeInfo: LocaleInfo): void
Parameters:
Section titled “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
Section titled “addMapper”▸ addMapper(mapper: LocaleMapper): void
Parameters:
Section titled “Parameters:”- mapper:
LocaleMapper
Returns void
booleanToStr
Section titled “booleanToStr”▸ booleanToStr(bool: boolean,format?: string): string
Parameters:
Section titled “Parameters:”- bool:
boolean - format:
string, Optional
Returns string
dateTimeToStr
Section titled “dateTimeToStr”▸ dateTimeToStr(dateTime: Date,dataType: DataType,format?: string): string
Parameters:
Section titled “Parameters:”- dateTime:
Date - dataType: DataType
- format:
string, Optional
Returns string
getCurrentLocale
Section titled “getCurrentLocale”Gets the current locale ID.
▸ getCurrentLocale(): string
Returns string - The locale.
getLocaleSettings
Section titled “getLocaleSettings”▸ getLocaleSettings(): LocaleSettings
Returns LocaleSettings
getLocales
Section titled “getLocales”Gets added locales with their names.
▸ getLocales(): LocaleInfoItem[]
Returns LocaleInfoItem[] - The locales.
getLongMonthName
Section titled “getLongMonthName”▸ getLongMonthName(monthNum: number): string
Parameters:
Section titled “Parameters:”- monthNum:
number
Returns string
getLongWeekDayName
Section titled “getLongWeekDayName”▸ getLongWeekDayName(dayNum: number): string
Parameters:
Section titled “Parameters:”- dayNum:
number
Returns string
getOneLocaleSetting
Section titled “getOneLocaleSetting”▸ getOneLocaleSetting(key: string): any
Parameters:
Section titled “Parameters:”- key:
string
Returns any
getShortMonthName
Section titled “getShortMonthName”▸ getShortMonthName(monthNum: number): string
Parameters:
Section titled “Parameters:”- monthNum:
number
Returns string
getShortWeekDayName
Section titled “getShortWeekDayName”▸ getShortWeekDayName(dayNum: number): string
Parameters:
Section titled “Parameters:”- dayNum:
number
Returns string
getText
Section titled “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:
Section titled “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
Section titled “numberToStr”▸ numberToStr(number: number,format?: string): string
Parameters:
Section titled “Parameters:”- number:
number - format:
string, Optional
Returns string
resetLocales
Section titled “resetLocales”▸ resetLocales(): void
Returns void
setCurrentLocale
Section titled “setCurrentLocale”Sets the curent locale.
▸ setCurrentLocale(localeId: string): void
Parameters:
Section titled “Parameters:”- localeId:
string- The locale.
Returns void
setLocale
Section titled “setLocale”Sets the curent locale.
▸ setLocale(l: string): void
Parameters:
Section titled “Parameters:”- l:
string- The locale.
Returns void
updateDefaultTexts
Section titled “updateDefaultTexts”▸ updateDefaultTexts(texts: TextResources): void
Parameters:
Section titled “Parameters:”- texts: TextResources
Returns void
updateLocaleInfo
Section titled “updateLocaleInfo”Updates the information for the specified locale.
▸ updateLocaleInfo(localeId: string,localeData: LocaleInfo): void
Parameters:
Section titled “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
Section titled “updateLocaleSettings”Updates the locale settings (date/time formats, separators, etc) for the specified locale.
▸ updateLocaleSettings(settingsToUpdate: LocaleSettings): void
Parameters:
Section titled “Parameters:”- settingsToUpdate: LocaleSettings - a LocaleSettings object
Returns void
updateLocaleTexts
Section titled “updateLocaleTexts”Updates the texts for the current locale
▸ updateLocaleTexts(texts: TextResources): void
Parameters:
Section titled “Parameters:”- texts: TextResources - A plain JS object that contains textual resources
Returns void