toLanguageCode method

LanguageCode toLanguageCode()

Implementation

LanguageCode toLanguageCode() {
  switch (this) {
    case 'af-ZA':
      return LanguageCode.afZa;
    case 'ar-AE':
      return LanguageCode.arAe;
    case 'ar-SA':
      return LanguageCode.arSa;
    case 'cy-GB':
      return LanguageCode.cyGb;
    case 'da-DK':
      return LanguageCode.daDk;
    case 'de-CH':
      return LanguageCode.deCh;
    case 'de-DE':
      return LanguageCode.deDe;
    case 'en-AB':
      return LanguageCode.enAb;
    case 'en-AU':
      return LanguageCode.enAu;
    case 'en-GB':
      return LanguageCode.enGb;
    case 'en-IE':
      return LanguageCode.enIe;
    case 'en-IN':
      return LanguageCode.enIn;
    case 'en-US':
      return LanguageCode.enUs;
    case 'en-WL':
      return LanguageCode.enWl;
    case 'es-ES':
      return LanguageCode.esEs;
    case 'es-US':
      return LanguageCode.esUs;
    case 'fa-IR':
      return LanguageCode.faIr;
    case 'fr-CA':
      return LanguageCode.frCa;
    case 'fr-FR':
      return LanguageCode.frFr;
    case 'ga-IE':
      return LanguageCode.gaIe;
    case 'gd-GB':
      return LanguageCode.gdGb;
    case 'he-IL':
      return LanguageCode.heIl;
    case 'hi-IN':
      return LanguageCode.hiIn;
    case 'id-ID':
      return LanguageCode.idId;
    case 'it-IT':
      return LanguageCode.itIt;
    case 'ja-JP':
      return LanguageCode.jaJp;
    case 'ko-KR':
      return LanguageCode.koKr;
    case 'ms-MY':
      return LanguageCode.msMy;
    case 'nl-NL':
      return LanguageCode.nlNl;
    case 'pt-BR':
      return LanguageCode.ptBr;
    case 'pt-PT':
      return LanguageCode.ptPt;
    case 'ru-RU':
      return LanguageCode.ruRu;
    case 'ta-IN':
      return LanguageCode.taIn;
    case 'te-IN':
      return LanguageCode.teIn;
    case 'tr-TR':
      return LanguageCode.trTr;
    case 'zh-CN':
      return LanguageCode.zhCn;
  }
  throw Exception('$this is not known in enum LanguageCode');
}