lookupChatLocalizations function

ChatLocalizations lookupChatLocalizations(
  1. Locale locale
)

Implementation

ChatLocalizations lookupChatLocalizations(Locale locale) {
  // Lookup logic when only language code is specified.
  switch (locale.languageCode) {
    case 'ar':
      return ChatLocalizationsAr();
    case 'bg':
      return ChatLocalizationsBg();
    case 'bn':
      return ChatLocalizationsBn();
    case 'ca':
      return ChatLocalizationsCa();
    case 'cs':
      return ChatLocalizationsCs();
    case 'da':
      return ChatLocalizationsDa();
    case 'de':
      return ChatLocalizationsDe();
    case 'el':
      return ChatLocalizationsEl();
    case 'en':
      return ChatLocalizationsEn();
    case 'es':
      return ChatLocalizationsEs();
    case 'et':
      return ChatLocalizationsEt();
    case 'fa':
      return ChatLocalizationsFa();
    case 'fi':
      return ChatLocalizationsFi();
    case 'fr':
      return ChatLocalizationsFr();
    case 'ga':
      return ChatLocalizationsGa();
    case 'he':
      return ChatLocalizationsHe();
    case 'hi':
      return ChatLocalizationsHi();
    case 'hr':
      return ChatLocalizationsHr();
    case 'hu':
      return ChatLocalizationsHu();
    case 'id':
      return ChatLocalizationsId();
    case 'it':
      return ChatLocalizationsIt();
    case 'ja':
      return ChatLocalizationsJa();
    case 'ko':
      return ChatLocalizationsKo();
    case 'lt':
      return ChatLocalizationsLt();
    case 'lv':
      return ChatLocalizationsLv();
    case 'ms':
      return ChatLocalizationsMs();
    case 'mt':
      return ChatLocalizationsMt();
    case 'nl':
      return ChatLocalizationsNl();
    case 'no':
      return ChatLocalizationsNo();
    case 'pl':
      return ChatLocalizationsPl();
    case 'pt':
      return ChatLocalizationsPt();
    case 'ro':
      return ChatLocalizationsRo();
    case 'ru':
      return ChatLocalizationsRu();
    case 'sk':
      return ChatLocalizationsSk();
    case 'sl':
      return ChatLocalizationsSl();
    case 'sr':
      return ChatLocalizationsSr();
    case 'sv':
      return ChatLocalizationsSv();
    case 'sw':
      return ChatLocalizationsSw();
    case 'ta':
      return ChatLocalizationsTa();
    case 'te':
      return ChatLocalizationsTe();
    case 'th':
      return ChatLocalizationsTh();
    case 'tl':
      return ChatLocalizationsTl();
    case 'tr':
      return ChatLocalizationsTr();
    case 'uk':
      return ChatLocalizationsUk();
    case 'vi':
      return ChatLocalizationsVi();
    case 'zh':
      return ChatLocalizationsZh();
  }

  throw FlutterError(
    'ChatLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
    'an issue with the localizations generation tool. Please file an issue '
    'on GitHub with a reproducible sample app and the gen-l10n configuration '
    'that was used.',
  );
}