Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Re: Ländereinstellung ermitteln
21. Mai 2007, 12:37
Meinst du so was:
Delphi-Quellcode:
////////////////////////////////////////////////////////////////////////////////
// Procedure : GetOSLanguageID
// Comment : Returns the language of the OS
function GetOSLanguageStr: string;
begin
SetLength(Result, MAX_PATH);
SetLength(Result, VerLanguageName(GetSystemDefaultLangId,
@Result[1], length(Result)));
end;
////////////////////////////////////////////////////////////////////////////////
// Procedure : GetOSLanguageStr
// Comment : Returns the language ID-String
function GetOSLanguageIDStr: string;
var
Buffer : array[0..MAX_PATH] of char;
len : Integer;
begin
ZeroMemory(@Buffer, sizeof(Buffer));
len := GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, Buffer,
sizeof(Buffer));
SetString(result, Buffer, len);
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|
|
Zitat
|