slang library

Classes

BaseAppLocale<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Similar to flutter locale but available without any flutter dependencies. Subclasses will be enums.
BaseAppLocaleUtils<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Provides utility functions without any side effects.
BaseLocaleSettings<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
BaseTranslations<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Root translation class of ONE locale Entry point for every translation
FakeAppLocale
FakeTranslations
PluralResolvers
Default plural resolvers
TranslationMetadata<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Metadata instance hold by the root translation class.

Typedefs

PluralResolver = String Function(num n, {String? few, String? many, String? one, String? other, String? two, String? zero})
Selects the correct string depending on n
TranslationBuilder<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>> = T Function({PluralResolver? cardinalResolver, PluralResolver? ordinalResolver, Map<String, Node>? overrides})
Returns a new translation instance.