applyLanguageCode static method

String applyLanguageCode(
  1. LocalizationStrings localization,
  2. String languageCode
)

based on the languageCode the localization is returned in the corresponding language

Implementation

static String applyLanguageCode(
    LocalizationStrings localization, String languageCode) {
  switch (languageCode) {
    case 'de':
      return localization.toGerman();
    default:
      return localization.toEnglish();
  }
}