intl_local/lib/src/intl_helpers library

A library for general helper code associated with the intl library rather than confined to specific parts of it.

Classes

LocaleDataReader
An abstract superclass for data readers to keep the type system happy.
MessageLookup
UninitializedLocaleData<F>
This is used as a marker for a locale data map that hasn't been initialized, and will throw an exception on any usage that isn't the fallback patterns/symbols provided.

Properties

messageLookup MessageLookup
The internal mechanism for looking up messages. We expect this to be set by the implementing package so that we're not dependent on its implementation.
getter/setter pair

Functions

canonicalizedLocale(String? aLocale) String
computeMessageName(String? name, String? text, String? meaning) String?
If a message is a string literal without interpolation, compute a name based on that and the meaning, if present.
initializeInternalMessageLookup(Function lookupFunction) → void
Initialize the message lookup mechanism. This is for internal use only. User applications should import message_lookup_by_library.dart and call initializeMessages
shortLocale(String aLocale) String
Return the short version of a locale name, e.g. 'en_US' => 'en'
verifiedLocale(String? newLocale, bool localeExists(String), String? onFailure(String)?) String?

Typedefs

MessageIfAbsent = String Function(String? messageText, List<Object>? args)
Type for the callback action when a message translation is not found.

Exceptions / Errors

LocaleDataException