lookupL10n function
Implementation
L10n lookupL10n(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en': return L10nEn();
case 'hi': return L10nHi();
case 'ja': return L10nJa();
case 'ko': return L10nKo();
case 'ru': return L10nRu();
case 'zh': return L10nZh();
}
throw FlutterError(
'L10n.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.'
);
}