LocaleSettingsExt<E extends BaseAppLocale<T> , T extends BaseTranslations> extension
- on
-
- BaseLocaleSettings<
E, T>
- BaseLocaleSettings<
Properties
- currentLocale → E
-
Available on BaseLocaleSettings<
Gets current locale.E, T> , provided by the LocaleSettingsExt extensionno setter - currentTranslations → T
-
Available on BaseLocaleSettings<
Gets current translationsE, T> , provided by the LocaleSettingsExt extensionno setter -
supportedLocalesRaw
→ List<
String> -
Available on BaseLocaleSettings<
Gets supported locales in string format.E, T> , provided by the LocaleSettingsExt extensionno setter
Methods
-
setLocale(
E locale) → E -
Available on BaseLocaleSettings<
Sets locale, but do not change potential TranslationProvider's state Useful when you are in a pure Dart environment (without Flutter) This will be overwritten when using with flutter.E, T> , provided by the LocaleSettingsExt extension -
setLocaleRaw(
String rawLocale) → E -
Available on BaseLocaleSettings<
Sets locale using string tag (e.g. en_US, de-DE, fr) Fallbacks to base locale. Returns the locale which has been set.E, T> , provided by the LocaleSettingsExt extension -
setPluralResolver(
{String? language, E? locale, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → void -
Available on BaseLocaleSettings<
Sets plural resolvers. See https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html See https://github.com/Tienisto/slang/blob/master/slang/lib/api/plural_resolver_map.dart Either specifyE, T> , provided by the LocaleSettingsExt extensionlanguage
, orlocale
. Locale has precedence.