?
Solved

RETRIEVE COUNTRY CODES FROM WINDOWS

Posted on 2003-02-24
2
Medium Priority
?
156 Views
Last Modified: 2010-04-04
Hi All,

Does anyone know how I can retrieve the official Windows language codes like BE, NL, ...... and so on.
I don't think this is hard to do.

Tom.
0
Comment
Question by:TomDedecker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 400 total points
ID: 8007741
Hi,

Language codes are three letters long. Place one ListBox and one Button on a form and try this:

// to get a list of all supported languages
procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
begin
  ListBox1.Items.Clear;
  for i := 0 to Languages.Count - 1 do ListBox1.Items.Add(Languages.Ext[i]);
end;

// to get the current locale (returns 'ENU' on my computer):
function GetLocaleCode: string;
begin
  result := Languages.Ext[Languages.IndexOf(SysLocale.DefaultLCID)];
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ShowMessage(GetLocaleCode);
end;

Regards, Geo
0
 

Expert Comment

by:SpideyMod
ID: 8676286
Please return to this question and finalize.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question