DelphiFAQ Home Search:

Determine the operating system's default language

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

The code below uses unit SysUtils to easily determine the Operating System's default language. The TLanguages class also contains other information for each entry - check the online help on this type.

uses
  SysUtils, Dialogs;

procedure TForm1.FormCreate(Sender: TObject);
var
  i : Integer;
begin
  i := Languages.IndexOf(SysLocale.DefaultLCID);
  ShowMessage(Languages.Name[i]);
end;
You don't like the formatting? Check out SourceCoder then!

Comments:

2006-11-16, 12:49:11
[hidden] from Germany  
I would like to know how to change the language of my operating system and cannot find such info. Please help if you can because when I insurt a disk in a D: drive the names of the songs that I want to listem are written in different symbols that I do not understand. I want the Russian language to be correct. Everything is in English on my PC, but I can switch between the russian and english when need to. But when I insurt russian disks they appear in symbols. And also when I tried to download a program from Microsoft.com I was tald that this programm is not supported by my operating system language. I am a newbie and cannot understand your instructions on finding out my O/P language.

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Washington, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.