getFullNameForLangCode static method

String getFullNameForLangCode(
  1. LangCode langCodeToGetStringFor
)

Returns the full name of the language based on the LangCode provided.

This can be used for displaying a user-friendly language name.

  • langCodeToGetStringFor: The LangCode to retrieve the full name for.

Returns the name of the language as a string.

Implementation

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