getStringRepForLangCode static method

String getStringRepForLangCode(
  1. LangCode langCodeToGetStringFor
)

Returns the short string representation of the LangCode for programmatic use.

This can be used when exporting or saving state to a persistent storage.

  • langCodeToGetStringFor: The LangCode to retrieve the short representation for.

Returns the short string representation of the language code.

Implementation

static String getStringRepForLangCode(LangCode langCodeToGetStringFor) {
  switch (langCodeToGetStringFor) {
    case LangCode.en:
      return "en";
    case LangCode.de:
      return "de";
  }
}