Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Determine the language of the Windows installation
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:
I would like to know which country or language my program is running in? How can I pick this information from Windows? (control panel settings)
Answer:
Easy - see the code below (Delphi 5) - it returns 'English (United States)' here.
 | |  | | procedure TForm1.FormCreate(Sender: TObject);
begin
Caption := Languages.NameFromLocaleID[GetThreadLocale];
end; | |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|