translate method

String translate(
  1. String key
)

Translate key to this locale. If key is not translated, key is returned 'as-is'.

Implementation

String translate(String key) =>
    (translations.containsKey(key)) ? translations[key]! : key;