Mega Code Archive

 
Categories / Delphi / System
 

Which is the active language in Windows

Title: Which is the active language in Windows? Question: Knowing the active language in Windows Answer: You can use the following function. -------- function WhichLanguage:string; var ID:LangID; Language: array [0..100] of char; begin ID:=GetSystemDefaultLangID; VerLanguageName(ID,Language,100); Result:=String(Language); end; Sample call: procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text:=WhichLanguage; end;