intl_messages
library
Functions
-
allLocales()
→ Map<String, String>
-
List with al known locales codes and names.
-
allLocalesCodes()
→ List<String>
-
List will all locales codes.
-
createLocalesManager(InitializeLocaleFunction initializeLocaleFunction, [void onDefineLocale(String locale)?])
→ LocalesManager
-
-
formatDateRangeText(DateTime startTime, DateTime endTime, bool hasTimePicker, [IntlLocale? locale])
→ String
-
Gets a date range,
startTime
and endTime
, and formats it's texts with locale
, trying to use less characters.
-
getCountryInfo({String? countryCode, int? dialCode, String? countryName})
→ CountryInfo?
-
Returns a CountryInfo by
countryCode
, dialCode
or countryName
.
-
getCurrentLocale()
→ String
-
Returns the current locale.
-
getDateFormat_yMMMd([IntlLocale? locale])
→ DateFormat
-
Returns
DateFormat
for locale
and skeleton yMMMd
.
-
getDateFormat_yMMMMd([IntlLocale? locale])
→ DateFormat
-
Returns
DateFormat
for locale
and skeleton yMMMMd`.
-
getDateRangeTypeTitle(DateRangeType rangeType, [IntlLocale? locale, IntlLocale? localeFallback])
→ String?
-
Returns the localized title message for
rangeType
.
-
getFirstDayOfWeek([IntlLocale? locale])
→ DateTimeWeekDay
-
Returns
DateTimeWeekDay
for locale
.
-
getLoadedLocales()
→ List<String>?
-
Returns a list of loaded locales.
-
getLocaleDateSymbols([IntlLocale? locale])
→ DateSymbols?
-
A
DateSymbols
, with many information for locale
-
getLocaleName(String locale, {String? defaultName, bool nativeName = false, String? nativeLocale, bool preserveLatinNames = true})
→ String
-
Returns the name of a locale code.
-
getPossibleLocalesSequence(String locale)
→ List<String>
-
Returns a list of possible locales sequence for best discovery priority
-
getSimilarLocales(String locale)
→ List<String>
-
Returns a similar locale, usually for fallback discover.
-
getTimeFormatUsesAMPM([IntlLocale? locale])
→ bool
-
Returns
true
if locale
us AMPM format.
-
isLoadedLocale(String locale, [bool def = false])
→ bool
-
Returns
true
if locale
is loaded or def
.
-
latinLanguages()
→ List<String>
-
List of locales for latin languages.
-
messageIdiomByLocale(String locale)
→ String
-
Returns the message for the word
idiom
.
Useful to build language selectors.
-
messageLanguageByLocale(String locale)
→ String
-
Returns the message for the word
language
.
Useful to build language selectors.
-
replaceLocale(RegExp pattern, String path, String locale)
→ String
-
Inserts the
locale
in a path
using pattern
as place holder.