translate static method

String translate(
  1. String key
)

Implementation

static String translate(String key) {
  return _translations[_localeKey(locale)]?[key] ??
      _translations[locale.languageCode]?[key] ??
      _translations[_localeKey(_fallbackLocale)]?[key] ??
      _translations[_fallbackLocale.languageCode]?[key] ??
      key;
}