Language = Struct.new(:code, :name) do
  # Labels:
  #   https://en.wikipedia.org/w/index.php?title=List_of_ISO_639-1_codes
  #
  def self.all
    [
      Language.new('af', 'Afrikaans'),
      Language.new('am', 'Amharic'),
      Language.new('ar', 'Arabic'),
      Language.new('ar-EG', 'Arabic (Egypt)'),
      Language.new('az', 'Azerbaijani'),
      Language.new('be', 'Belarusian'),
      Language.new('bg', 'Bulgarian'),
      Language.new('bn', 'Bengali'),
      Language.new('bs', 'Bosnian'),
      Language.new('ca', 'Catalan; Valencian'),
      Language.new('crp', 'Mauritian Creole'),
      Language.new('cs', 'Czech'),
      Language.new('cy', 'Welsh'),
      Language.new('da', 'Danish'),
      Language.new('de', 'German'),
      Language.new('de-AT', 'German (Austria)'),
      Language.new('de-BL', 'German (Belgium)'),
      Language.new('de-CH', 'German (Switzerland)'),
      Language.new('el', 'Greek, Modern'),
      Language.new('en-AU', 'English (Australia)'),
      Language.new('en-BL', 'English (Belgium)'),
      Language.new('en-CA', 'English (Canada)'),
      Language.new('en-GB', 'English (Great Britain)'),
      Language.new('en-IN', 'English (India)'),
      Language.new('en-IE', 'English (Ireland)'),
      Language.new('en-MY', 'English (Malaysia)'),
      Language.new('en-NZ', 'English (New Zealand)'),
      Language.new('en-ZA', 'English (South Africa)'),
      Language.new('en-SG', 'English (Singapore)'),
      Language.new('en-CH', 'English (Switzerland)'),
      Language.new('en', 'English'),
      Language.new('eo', 'Esperanto'),
      Language.new('es', 'Spanish; Castilian'),
      Language.new('es-419', 'Spanish (Latin America)'),
      Language.new('et', 'Estonian'),
      Language.new('eu', 'Basque'),
      Language.new('fa', 'Farsi'),
      Language.new('fi', 'Finnish'),
      Language.new('fil', 'Filipino'),
      Language.new('fr', 'French'),
      Language.new('fr-BL', 'French (Belgium)'),
      Language.new('fr-CA', 'French (Canada)'),
      Language.new('fr-CH', 'French (Switzerland)'),
      Language.new('ga', 'Irish'),
      Language.new('gl', 'Galician'),
      Language.new('gu', 'Gujarati'),
      Language.new('hi', 'Hindi'),
      Language.new('hr', 'Croatian'),
      Language.new('ht', 'Haitian; Haitian Creole'),
      Language.new('hu', 'Hungarian'),
      Language.new('hy', 'Armenian'),
      Language.new('id', 'Indonesian'),
      Language.new('is', 'Icelandic'),
      Language.new('it', 'Italian'),
      Language.new('iw', 'Hebrew'),
      Language.new('ja', 'Japanese'),
      Language.new('ka', 'Georgian'),
      Language.new('kk', 'Kazakh'),
      Language.new('km', 'Khmer'),
      Language.new('kn', 'Kannada'),
      Language.new('ko', 'Korean'),
      Language.new('ky', 'Kyrgyz'),
      Language.new('lt', 'Lithuanian'),
      Language.new('lv', 'Latvian'),
      Language.new('la', 'Latin'),
      Language.new('lg', 'Luganda'),
      Language.new('lo', 'Lao'),
      Language.new('mg', 'Malagasy'),
      Language.new('mk', 'Macedonian'),
      Language.new('ml', 'Malayalam'),
      Language.new('ms', 'Malay'),
      Language.new('mt', 'Maltese'),
      Language.new('my', 'Burmese (Myanmar)'),
      Language.new('ne', 'Nepali'),
      Language.new('nl', 'Dutch'),
      Language.new('nl-BL', 'Dutch (Belgium)'),
      Language.new('no', 'Norwegian'),
      Language.new('nn', 'Norwegian (Nynorsk)'),
      Language.new('or', 'Oriya'),
      Language.new('pa', 'Punjabi'),
      Language.new('pl', 'Polish'),
      Language.new('pt', 'Portuguese'),
      Language.new('pt-BR', 'Portuguese (Brazil)'),
      Language.new('rm', 'Rhaeto-Romance'),
      Language.new('ro', 'Romanian'),
      Language.new('ru', 'Russian'),
      Language.new('rw', 'Kinyardwanda'),
      Language.new('si', 'Sinhala'),
      Language.new('sk', 'Slovak'),
      Language.new('sl', 'Slovene'),
      Language.new('sq', 'Albanian'),
      Language.new('sr', 'Serbian'),
      Language.new('sv', 'Swedish'),
      Language.new('sw', 'Swahili'),
      Language.new('ta', 'Tamil'),
      Language.new('th', 'Thai'),
      Language.new('tl', 'Tagalog'),
      Language.new('tr', 'Turkish'),
      Language.new('uk', 'Ukrainian'),
      Language.new('ur', 'Urdu'),
      Language.new('uz', 'Uzbek'),
      Language.new('vi', 'Vietnamese'),
      Language.new('yi', 'Yiddish'),
      Language.new('yo', 'Yoruba'),
      Language.new('zh', 'Chinese'),
      Language.new('zh-Hans', 'Chinese (Simplified)'),
      Language.new('zh-Hant', 'Chinese (Traditional)'),
      Language.new('zh-HK', 'Chinese (Hong Kong)'),
      Language.new('zh-MS', 'Chinese (Malay)'),
      Language.new('zh-HG', 'Chinese (Singapore)'),
      Language.new('zu', 'Zulu')
    ]
  end

  def self.codes
    all.map(&:code)
  end

  def label
    "#{code} - #{name}"
  end
end
