flutter_translate library

Functions

changeLocale(BuildContext context, String? localeCode) Future
Change the currently selected locale
getCurrentLocale() Locale?
Returns the current device locale
getPreferredLocales() List<Locale>?
Returns preferred device locales
localeFromString(String code, {bool languageCodeOnly = false}) Locale
localeToString(Locale locale) String
translate(String key, {Map<String, dynamic>? args}) String
Translate the selected key into the currently selected locale
translatePlural(String key, num value, {Map<String, dynamic>? args}) String
Translate the selected key into the currently selected locale using pluralization

Typedefs

LocaleChangedCallback = Future Function(Locale locale)