LocaleMappingOptions<T extends Object> class

Configuration options for locale mapping operations.

Type parameter T represents the type of locale identifier that can be used for main and fallback locales.

Available extensions

Constructors

LocaleMappingOptions({T? mainLocale, T? fallbackLocale, bool localizeFullNames = true, bool useLanguageFallback = true, String altSymbol = "+", String formatter(IsoLocaleKey isoLocale, String l10n)?})
Creates a LocaleMappingOptions instance with the specified configuration.
const

Properties

altSymbol String
Symbol used to mark alternative/full names in localized strings.
final
fallbackLocale → T?
Secondary locale used when translation is not found in mainLocale.
final
formatter String Function(IsoLocaleKey isoLocale, String l10n)?
Optional formatter function for customizing localized strings.
final
hashCode int
The hash code for this object.
no setterinherited
localizeFullNames bool
Whether to include full/official names in localization results.
final
mainLocale → T?
Primary locale used for translation lookup.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useLanguageFallback bool
Whether to try language-only codes when specific locale is not found.
final

Methods

copyWith({String? altSymbol, T? fallbackLocale, bool? localizeFullNames, T? mainLocale, bool? useLanguageFallback, String formatter(IsoLocaleKey isoLocale, String l10n)?}) LocaleMappingOptions<T>

Available on LocaleMappingOptions<T>, provided by the LocaleMappingOptionsExtension extension

Creates a copy of this LocaleMappingOptions with the given fields replaced.
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

Constants

defaultAltSymbol → const String
Default symbol used to mark alternative names in localization maps.