Locale class abstract

Representing a Unicode locale identifier.

It is composed of the primary language subtag for the locale, the region (also referred to as 'country') subtag, and the script subtag.

Examples are de-DE, es-419, or zh-Hant-TW.

Constructors

Locale()

Properties

hashCode → int
The hash code for this object.
no setteroverride
language → String
The language subtag (e.g. 'en', 'zh', 'und').
no setter
region → String?
The region subtag (e.g. 'US', '419'), or null if unspecified.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
script → String?
The script subtag (e.g. 'Hant', 'Latn'), or null if unspecified.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toLanguageTag([String separator = '-']) → String
Generate a language tag by joining the subtags with the separator.
toString() → String
A string representation of this object.
override
withCalendar(Calendar calendar) → Locale
Returns a new Locale with the given calendar.
withClockStyle(ClockStyle clockStyle) → Locale
Returns a new Locale with the given clockStyle.
withNumberingSystem(NumberingSystem system) → Locale
Returns a new Locale with the given system.

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Properties

system → Locale
The system's current locale.
no setter

Static Methods

parse(String s) → Locale
Constructs a Locale by parsing a BCP47 language tag.