Locale

open class Locale(tag: UnicodeBCP47LocaleIdentifier, options: LocaleOptions = definedExternally) : LocaleOptions(source)

Constructors

Link copied to clipboard
constructor(tag: UnicodeBCP47LocaleIdentifier, options: LocaleOptions = definedExternally)
constructor(tag: Locale, options: LocaleOptions = definedExternally)

Properties

Link copied to clipboard
open external var baseName: String

A string containing the language, and the script and region if available.

Link copied to clipboard
open external var calendar: String?

The part of the Locale that indicates the locale's calendar era.

Link copied to clipboard
open external var caseFirst: CaseFirst?

Flag that defines whether case is taken into account for the locale's collation rules.

Link copied to clipboard
open external var collation: String?

The collation type used for sorting

Link copied to clipboard
open external var hourCycle: HourCycle?

The time keeping format convention used by the locale.

Link copied to clipboard
open external var language: String

The primary language subtag associated with the locale.

Link copied to clipboard
open external var numberingSystem: String?

The numeral system used by the locale.

Link copied to clipboard
open external var numeric: Boolean?

Flag that defines whether the locale has special collation handling for numeric characters.

Link copied to clipboard
open external var region: String?

The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1.

Link copied to clipboard
open external var script: String?

The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924.

Functions

Link copied to clipboard
open external fun getCalendars(): ReadonlyArray<JsString>

Returns a list of one or more unique calendar identifiers for this locale.

Link copied to clipboard
open external fun getCollations(): ReadonlyArray<JsString>

Returns a list of one or more collation types for this locale.

Link copied to clipboard
open external fun getHourCycles(): ReadonlyArray<JsString>

Returns a list of one or more unique hour cycle identifiers for this locale.

Link copied to clipboard
open external fun getNumberingSystems(): ReadonlyArray<JsString>

Returns a list of one or more unique numbering system identifiers for this locale.

Link copied to clipboard
open external fun getTextInfo(): TextInfo

Returns the ordering of characters indicated by either ltr (left-to-right) or by rtl (right-to-left) for this locale.

Link copied to clipboard
open external fun getTimeZones(): ReadonlyArray<JsString>?

Returns a list of supported time zones for this locale.

Link copied to clipboard
open external fun getWeekInfo(): WeekInfo

Returns a WeekInfo object with the properties firstDay, weekend and minimalDays for this locale.

Link copied to clipboard
open external fun maximize(): Locale

Gets the most likely values for the language, script, and region of the locale based on existing values.

Link copied to clipboard
open external fun minimize(): Locale

Attempts to remove information about the locale that would be added by calling Locale.maximize().