getTranslation static method

String getTranslation(
  1. String key
)

to pass the string

Implementation

static String getTranslation(String key) {
  final Map<String, String>? languageMap = translations[GetLocale.langcode];
  return languageMap != null ? languageMap[key] ?? key : key;
}