lookupTencentCloudChatLocalizations function
Implementation
TencentCloudChatLocalizations lookupTencentCloudChatLocalizations(Locale locale) {
// Lookup logic when language+script codes are specified.
switch (locale.languageCode) {
case 'zh': {
switch (locale.scriptCode) {
case 'Hans': return TencentCloudChatLocalizationsZhHans();
case 'Hant': return TencentCloudChatLocalizationsZhHant();
}
break;
}
}
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'ar': return TencentCloudChatLocalizationsAr();
case 'en': return TencentCloudChatLocalizationsEn();
case 'ja': return TencentCloudChatLocalizationsJa();
case 'ko': return TencentCloudChatLocalizationsKo();
case 'zh': return TencentCloudChatLocalizationsZh();
}
throw FlutterError(
'TencentCloudChatLocalizations.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.'
);
}