ILibLocale class

Constructors

ILibLocale([Object? language, String? region, String? variant, String? script])
language the ISO 639 2-letter code for the language,
or a full locale spec in BCP-47 format, or another Locale instance to copy from region the ISO 3166 2-letter code for the region variant the name of the variant of this locale, if any script the ISO 15924 code of the script for this locale, if any
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
language String?
getter/setter pair
region String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script String?
getter/setter pair
spec String?
getter/setter pair
variant String?
getter/setter pair

Methods

equals(ILibLocale other) bool
Return true if the other locale is exactly equal to the current one.
getLangSpec() String
Return the language locale specifier.
getLanguage() String?
Return the ISO 639 language code for this locale.
getLanguageAlpha3() String?
Return the language of this locale as an ISO-639-alpha3 language code.
getRegion() String?
Return the ISO 3166 region code for this locale.
getRegionAlpha3() String?
Return the region of this locale as an ISO-3166-alpha3 region code.
getScript() String?
Return the ISO 15924 script code for this locale.
getSpec() String
Return the whole locale specifier as a string.
getVariant() String?
Return the variant code for this locale.
isPseudo() bool
Return true if the current locale is the special pseudo locale.
isValid() bool
Return true if the current locale uses a valid ISO codes
for each component of the locale that exists.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

pseudoLocales List<String>
A list of all known pseudo-locales.
getter/setter pair

Static Methods

getAvailableLocales() List<String>
languageAlpha1ToAlpha3(String? alpha1) String?
Return the ISO-639 alpha3 equivalent language code for the given ISO 639 alpha1 language code.
If the given alpha1 code is not found, this function returns its argument unchanged.
regionAlpha2ToAlpha3(String? alpha2) String?
Return the ISO-3166 alpha3 equivalent region code for the given ISO 3166 alpha2 region code.
If the given alpha2 code is not found, this function returns its argument unchanged.

Constants

a1toa3langmap → const Map<String, String>
a2toa3regmap → const Map<String, String>
iso15924 → const List<String>