procedure TForm1.Button1Click(Sender: TObject);
var
S : array[0..255] of char;
iType : LCTYPE;
begin
iType := LOCALE_SNATIVELANGNAME;
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, iType, S, SizeOf(S));
if s='中文(简体)' then
showmessage('简体')
else
showmessage('繁体');
end;
var
DefaultID:integer;
begin
DefaultID:=GetSystemDefaultLangID;
if (DefaultID = 1028) then
begin
繁体中文
end
else if (DefaultID = 2052) then
begin
简体中文
end
else
begin
其它语言
end;
The GetACP function retrieves the current ANSI code-page identifier for the system.
UINT GetACP(VOID);
Parameters
This function has no parameters.
Return Values
The return value is the current ANSI code-page identifier for the system, or a default identifier if no code page is current.
Remarks
Windows 2000/XP: The return value for the Indic languages is 0, because they are Unicode only.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.