messageIdiomByLocale function

String messageIdiomByLocale(
  1. String locale
)

Returns the message for the word idiom. Useful to build language selectors.

Implementation

String messageIdiomByLocale(String locale) {
  locale = Intl.shortLocale(locale);

  if (locale == 'en') return 'Idiom';
  if (locale == 'pt') return 'Idioma';

  if (locale == 'es') return 'Idioma';
  if (locale == 'it') return 'Idioma';
  if (locale == 'fr') return 'Idiome';
  if (locale == 'de') return 'Idiom';

  if (locale == 'ru') return 'идиома';
  if (locale == 'ja') return 'イディオム';
  if (locale == 'ko') return '관용구';
  if (locale == 'zh') return '成语';

  return 'Idiom';
}