(*
  Name:             WindowsLanguages
  Copyright:        Copyright (C) SIL International.
  Documentation:    
  Description:      
  Create Date:      16 Jun 2008

  Modified Date:    16 Jun 2008
  Authors:          mcdurdin
  Related Files:    
  Dependencies:     

  Bugs:             
  Todo:             
  Notes:            
  History:          16 Jun 2008 - mcdurdin - I1400 - Initial version
*)
unit WindowsLanguages;

interface

type
  TWindowsLanguage = record
    ID: Integer;
    Name: WideString;
  end;
  
const
  CWindowsLanguages: array[0..213] of TWindowsLanguage = (
(ID: $0436; Name: 'Afrikaans.'),
(ID: $041C; Name: 'Albanian.'),
(ID: $0484; Name: 'Alsatian.'),
(ID: $045E; Name: 'Amharic.'),
(ID: $0401; Name: 'Arabic.'),
(ID: $0801; Name: 'Arabic as spoken in Iraq.'),
(ID: $0C01; Name: 'Arabic as spoken in Egypt.'),
(ID: $1001; Name: 'Arabic as spoken in Libya.'),
(ID: $1401; Name: 'Arabic as spoken in Algeria.'),
(ID: $1801; Name: 'Arabic as spoken in Morocco.'),
(ID: $1C01; Name: 'Arabic as spoken in Tunisia.'),
(ID: $2001; Name: 'Arabic as spoken in Oman.'),
(ID: $2401; Name: 'Arabic as spoken in Yemen.'),
(ID: $2801; Name: 'Arabic as spoken in Syria.'),
(ID: $2C01; Name: 'Arabic as spoken in Jordan.'),
(ID: $3001; Name: 'Arabic as spoken in Lebanon.'),
(ID: $3401; Name: 'Arabic as spoken in Kuwait.'),
(ID: $3801; Name: 'Arabic as spoken in the United Arab Emirates.'),
(ID: $3C01; Name: 'Arabic as spoken in Bahrain.'),
(ID: $4001; Name: 'Arabic as spoken in Qatar.'),
(ID: $042B; Name: 'Armenian.'),
(ID: $044D; Name: 'Assamese.'),
(ID: $042C; Name: 'Azeri-Latin.'),
(ID: $082C; Name: 'Azeri-Cyrillic.'),
(ID: $046D; Name: 'Bashkir'),
(ID: $042D; Name: 'Basque.'),
(ID: $0423; Name: 'Byelorussian.'),
(ID: $0445; Name: 'Bengali.'),
(ID: $0845; Name: 'Bengali as spoken in Bangladesh.'),
(ID: $141A; Name: 'Bosnian/Latin as spoken in Bosnia and Herzegovina.'),
(ID: $201A; Name: 'Bosnian/Cyrillic as spoken in Bosnia and Herzegovina.'),
(ID: $047E; Name: 'Breton.'),
(ID: $0402; Name: 'Bulgarian.'),
(ID: $0403; Name: 'Catalan.'),
(ID: $0404; Name: 'Traditional Chinese.'),
(ID: $0804; Name: 'Simplified Chinese.'),
(ID: $0C04; Name: 'Chinese as spoken in Hong Kong SAR.'),
(ID: $1004; Name: 'Chinese as spoken in Singapore.'),
(ID: $1404; Name: 'Chinese as spoken in Macao SAR.'),
(ID: $0483; Name: 'Corsican.'),
(ID: $0405; Name: 'Czech.'),
(ID: $041A; Name: 'Croatian.'),
(ID: $101A; Name: 'Bosnian.'),
(ID: $0406; Name: 'Danish.'),
(ID: $048C; Name: 'Dari.'),
(ID: $0465; Name: 'Divehi.'),
(ID: $0413; Name: 'Dutch.'),
(ID: $0813; Name: 'Belgian Dutch.'),
(ID: $0409; Name: 'English as spoken in the United States.'),
(ID: $0809; Name: 'English as spoken in the United Kingdom.'),
(ID: $0C09; Name: 'English as spoken in Australia.'),
(ID: $1009; Name: 'English as spoken in Canada.'),
(ID: $1409; Name: 'English as spoken in New Zealand.'),
(ID: $1809; Name: 'English as spoken in Ireland.'),
(ID: $1C09; Name: 'English as spoken in South Africa.'),
(ID: $2009; Name: 'English as spoken in Jamaica.'),
(ID: $2409; Name: 'English as spoken in the Caribbean.'),
(ID: $2809; Name: 'English as spoken in Belize.'),
(ID: $2C09; Name: 'English as spoken in Trinidad and Tobago.'),
(ID: $3009; Name: 'English as spoken in Zimbabwe.'),
(ID: $3409; Name: 'English as spoken in the Philippines.'),
(ID: $4009; Name: 'English as spoken in India.'),
(ID: $4409; Name: 'English as spoken in Malaysia.'),
(ID: $4809; Name: 'English as spoken in Singapore.'),
(ID: $0425; Name: 'Estonian.'),
(ID: $0438; Name: 'Faeroese.'),
(ID: $0464; Name: 'Filipina.'),
(ID: $040B; Name: 'Finnish.'),
(ID: $040C; Name: 'French.'),
(ID: $080C; Name: 'Belgian French.'),
(ID: $0C0C; Name: 'French as spoken in Canada.'),
(ID: $100C; Name: 'French as spoken in Switzerland.'),
(ID: $140C; Name: 'French as spoken in Luxembourg.'),
(ID: $180C; Name: 'French as spoken in Monaco.'),
(ID: $0462; Name: 'French as spoken in the Netherlands.'),
(ID: $0456; Name: 'Galician.'),
(ID: $0437; Name: 'Georgian.'),
(ID: $0407; Name: 'German.'),
(ID: $0807; Name: 'German as spoken in Switzerland.'),
(ID: $0C07; Name: 'German as spoken in Austria.'),
(ID: $1007; Name: 'German as spoken in Luxembourg.'),
(ID: $1407; Name: 'German as spoken in Liechtenstein.'),
(ID: $0408; Name: 'Greek.'),
(ID: $046F; Name: 'Greenlandic.'),
(ID: $0447; Name: 'Gujarati.'),
(ID: $0468; Name: 'Hausa.'),
(ID: $040D; Name: 'Hebrew.'),
(ID: $0439; Name: 'Hindi.'),
(ID: $040E; Name: 'Hungarian.'),
(ID: $040F; Name: 'Icelandic.'),
(ID: $0470; Name: 'Igbo.'),
(ID: $0421; Name: 'Indonesian.'),
(ID: $045D; Name: 'Inuktitut.'),
(ID: $085D; Name: 'Inuktitut in Latin script.'),
(ID: $083C; Name: 'Gaelic as spoken in Ireland.'),
(ID: $0410; Name: 'Italian.'),
(ID: $0810; Name: 'Italian as spoken in Switzerland.'),
(ID: $0411; Name: 'Japanese.'),
(ID: $044B; Name: 'Kannada.'),
(ID: $0860; Name: 'Kashmiri in Devanagari script.'),
(ID: $043F; Name: 'Kazakh.'),
(ID: $0453; Name: 'Khmer.'),
(ID: $0486; Name: 'Kiche.'),
(ID: $0487; Name: 'Kinyarwanda'),
(ID: $0457; Name: 'Konkani.'),
(ID: $0412; Name: 'Korean.'),
(ID: $0440; Name: 'Kirghiz.'),
(ID: $0454; Name: 'Lao.'),
(ID: $0426; Name: 'Latvian.'),
(ID: $0427; Name: 'Lithuanian.'),
(ID: $082E; Name: 'Lower Sorbian.'),
(ID: $046E; Name: 'Luxembourgish.'),
(ID: $042F; Name: 'Macedonian.'),
(ID: $043E; Name: 'Malaysian.'),
(ID: $083E; Name: 'Malay as spoken in Brunei Darussalam.'),
(ID: $044C; Name: 'Malayalam.'),
(ID: $043A; Name: 'Maltese.'),
(ID: $0481; Name: 'Maori.'),
(ID: $047A; Name: 'Mapudungun.'),
(ID: $044E; Name: 'Marathi.'),
(ID: $047C; Name: 'Mohawk.'),
(ID: $0450; Name: 'Mongolian.'),
(ID: $0850; Name: 'Mongolian as spoken in China.'),
(ID: $0861; Name: 'Nepali as spoken in India.'),
(ID: $0461; Name: 'Nepali.'),
(ID: $0414; Name: 'Bokmol as spoken in Norway.'),
(ID: $0814; Name: 'Nynorsk as spoken in Norway.'),
(ID: $0482; Name: 'Occitan.'),
(ID: $0448; Name: 'Oriya.'),
(ID: $0463; Name: 'Pashto.'),
(ID: $0429; Name: 'Farsi.'),
(ID: $0415; Name: 'Polish.'),
(ID: $0816; Name: 'Portuguese.'),
(ID: $0416; Name: 'Brazilian Portuguese.'),
(ID: $0446; Name: 'Punjabi.'),
(ID: $046B; Name: 'Quechua as spoken in Bolivia.'),
(ID: $086B; Name: 'Quechua as spoken in Ecuador.'),
(ID: $0C6B; Name: 'Quechua as spoken in Peru.'),
(ID: $0418; Name: 'Romanian.'),
(ID: $0417; Name: 'Rhaeto-Romanic.'),
(ID: $0419; Name: 'Russian.'),
(ID: $043B; Name: 'Sami (Northern) as spoken in Norway'),
(ID: $083B; Name: 'Sami (Northern) as spoken in Sweden.'),
(ID: $0C3B; Name: 'Sami (Northern) as spoken in Finland.'),
(ID: $103B; Name: 'Sami (Lule) as spoken in Norway.'),
(ID: $143B; Name: 'Sami (Lule) as spoken in Sweden.'),
(ID: $183B; Name: 'Sami (Southern) as spoken in Norway'),
(ID: $1C3B; Name: 'Sami (Southern) as spoken in Sweden.'),
(ID: $203B; Name: 'Sami (Skolt) as spoken in Finland.'),
(ID: $243B; Name: 'Sami (Inari) as spoken in Finland.'),
(ID: $044F; Name: 'Sanskrit.'),
(ID: $181A; Name: 'Serbian/Latin as spoken in Bosnia and Herzegovina.'),
(ID: $1C1A; Name: 'Serbian/Cyrillic as spoken in Bosnia and Herzegovina.'),
(ID: $041A; Name: 'Croatian.'),
(ID: $081A; Name: 'Serbian/Latin.'),
(ID: $0C1A; Name: 'Serbian/Cyrillic.'),
(ID: $0459; Name: 'Sindhi.'),
(ID: $0859; Name: 'Sindhi as spoken in Pakistan.'),
(ID: $045B; Name: 'Sinhalese.'),
(ID: $046C; Name: 'Sepedi.'),
(ID: $041B; Name: 'Slovak.'),
(ID: $0424; Name: 'Slovenian.'),
(ID: $040A; Name: 'Spanish.'),
(ID: $080A; Name: 'Spanish as spoken in Mexico.'),
(ID: $0C0A; Name: 'Spanish (Modern Sort).'),
(ID: $100A; Name: 'Spanish as spoken in Guatemala.'),
(ID: $140A; Name: 'Spanish as spoken in Costa Rica.'),
(ID: $180A; Name: 'Spanish as spoken in Panama.'),
(ID: $1C0A; Name: 'Spanish as spoken in the Dominican Republic.'),
(ID: $200A; Name: 'Spanish as spoken in Venezuela.'),
(ID: $240A; Name: 'Spanish as spoken in Colombia.'),
(ID: $280A; Name: 'Spanish as spoken in Peru.'),
(ID: $2C0A; Name: 'Spanish as spoken in Argentina.'),
(ID: $300A; Name: 'Spanish as spoken in Ecuador.'),
(ID: $340A; Name: 'Spanish as spoken in Chile.'),
(ID: $380A; Name: 'Spanish as spoken in Uruguay.'),
(ID: $3C0A; Name: 'Spanish as spoken in Paraguay.'),
(ID: $400A; Name: 'Spanish as spoken in Bolivia.'),
(ID: $440A; Name: 'Spanish as spoken in El Salvador.'),
(ID: $480A; Name: 'Spanish as spoken in Honduras.'),
(ID: $4C0A; Name: 'Spanish as spoken in Nicaragua.'),
(ID: $500A; Name: 'Spanish as spoken in Puerto Rico.'),
(ID: $540A; Name: 'Spanish as spoken in USA'),
(ID: $0441; Name: 'Swahili.'),
(ID: $041D; Name: 'Swedish.'),
(ID: $081D; Name: 'Swedish as spoken in Finland.'),
(ID: $045A; Name: 'Syriac.'),
(ID: $0428; Name: 'Tajik.'),
(ID: $085F; Name: 'Tamazight (Latin).'),
(ID: $0449; Name: 'Tamil.'),
(ID: $0444; Name: 'Tatar.'),
(ID: $044A; Name: 'Telugu.'),
(ID: $041E; Name: 'Thai.'),
(ID: $0451; Name: 'Tibetan.'),
(ID: $0473; Name: 'Tigrigna as spoken in Ethiopia.'),
(ID: $0873; Name: 'Tigrigna as spoken in Eritrea.'),
(ID: $0432; Name: 'Tswana.'),
(ID: $041F; Name: 'Turkish.'),
(ID: $0442; Name: 'Turkmen.'),
(ID: $0480; Name: 'Uighur.'),
(ID: $0422; Name: 'Ukrainian.'),
(ID: $042E; Name: 'Sorbian.'),
(ID: $0420; Name: 'Urdu.'),
(ID: $0820; Name: 'Urdu as spoken in India.'),
(ID: $0443; Name: 'Uzbek (Latin).'),
(ID: $0843; Name: 'Uzbek (Cyrillic).'),
(ID: $042A; Name: 'Vietnamese.'),
(ID: $0452; Name: 'Welsh.'),
(ID: $0488; Name: 'Wolof.'),
(ID: $0434; Name: 'Xhosa.'),
(ID: $0485; Name: 'Yakut.'),
(ID: $0478; Name: 'Yi.'),
(ID: $046A; Name: 'Yoruba.'),
(ID: $0435; Name: 'Zulu.'));

function GetWindowsLanguage(ID: Integer): TWindowsLanguage;

implementation

function GetWindowsLanguage(ID: Integer): TWindowsLanguage;
var
  I: Integer;
begin
  for I := 0 to High(CWindowsLanguages) do
    if CWindowsLanguages[I].ID = ID then
    begin
      Result := CWindowsLanguages[I];
      Exit;
    end;
  Result.ID := 0;
  Result.Name := '';
end;

end.
