DisplayNames class final

Provides localized names for languages, regions, scripts, and currencies.

This class uses the specified locale and options to format codes (like 'en', 'US') into human-readable strings (like 'English', 'United States').

Constructors

DisplayNames({Locale? locale, Style style = Style.long, LanguageDisplay languageDisplay = LanguageDisplay.dialect, Fallback fallback = Fallback.code})
Creates a new display name formatter configured for a specific locale.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ofLocale(Locale locale) String
Returns the localized display name for a given language locale.
ofRegion(String regionCode) String
Returns the localized display name for a given region code.
toString() String
A string representation of this object.
inherited

Operators

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