Locale class
An identifier used to select a user's language and formatting preferences.
This represents a Unicode Language Identifier (i.e. without Locale extensions), except variants are not supported.
Locales are canonicalized according to the "preferred value" entries in the
IANA Language Subtag
Registry.
For example, const Locale('he')
and const Locale('iw')
are equal and
both have the languageCode he
, because iw
is a deprecated language
subtag that was replaced by the subtag he
.
See also:
- Window.locale, which specifies the system's currently selected Locale.
Constructors
Properties
- countryCode → String
-
The region subtag for the locale. [...]
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- languageCode → String
-
The primary language subtag for the locale. [...]
read-only
- scriptCode → String
-
The script subtag for the locale. [...]
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
override