They are defined in Windows.pas
eg
  CTRY_NEW_ZEALAND = $40; { New Zealand }

Or, some code I use to return a Country string and the International STD
code for the country.
Note that there are a few different strings that can be returned.  eg Spain
= 'Spain' or 'Espania' etc


var
  InfoSize : integer;
  Info : string;
begin
  // determine country we are in
  InfoSize :=
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGCOUNTRY,PChar(Info),0);
  SetLength(Info,InfoSize);
  if
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGCOUNTRY,PChar(Info),InfoSize)
<> 0 then
  ...
  do whatever with Info - contains Country
  ...
  // get country STD access code
  InfoSize :=
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_ICOUNTRY,PChar(Info),0);
  SetLength(Info,InfoSize);
  if
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_ICOUNTRY,PChar(Info),InfoSize) <>
0 then
  ...
  do whatever with Info - contains STD code
  ...
end;

The LOCALE_SENGCOUNTRY etc constants are also in Windows.pas.

Search help or msdn.microsoft.com for GetLocaleInfo.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Donovan J. Edye
Sent: Wednesday, 3 November 1999 12:32
To: Multiple recipients of list delphi
Subject: [DUG]: List of Locale ID's??


G'Day All,

Does anyone know where I can get a list of the 4 digit Locale ID's and there
text equivalent? eg
United States = 0409 etc.

TIA

------------------------------------------------------------------------
--Donovan
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems, Delphi Developer
Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
TVisualBasic = Class(None);
------------------------------------------------------------------------

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to