mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 02:39:27 +02:00
* getlocalformatsettings, Mantis 10389
git-svn-id: trunk@15691 -
This commit is contained in:
parent
591dbb66df
commit
1181115baa
@ -60,6 +60,7 @@ Procedure RaiseLastWin32Error;
|
|||||||
function GetFileVersion(const AFileName: string): Cardinal;
|
function GetFileVersion(const AFileName: string): Cardinal;
|
||||||
|
|
||||||
procedure GetFormatSettings;
|
procedure GetFormatSettings;
|
||||||
|
procedure GetLocaleFormatSettings(LCID: Integer; var FormatSettings: TFormatSettings); platform;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -651,13 +652,15 @@ Begin
|
|||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
procedure GetFormatSettings;
|
procedure GetLocaleFormatSettings(LCID: Integer; var FormatSettings: TFormatSettings);
|
||||||
var
|
var
|
||||||
HF : Shortstring;
|
HF : Shortstring;
|
||||||
LID : LCID;
|
LID : Windows.LCID;
|
||||||
I,Day : longint;
|
I,Day : longint;
|
||||||
begin
|
begin
|
||||||
LID := GetThreadLocale;
|
LID := LCID;
|
||||||
|
with FormatSettings do
|
||||||
|
begin
|
||||||
{ Date stuff }
|
{ Date stuff }
|
||||||
for I := 1 to 12 do
|
for I := 1 to 12 do
|
||||||
begin
|
begin
|
||||||
@ -693,7 +696,12 @@ begin
|
|||||||
DecimalSeparator:=GetLocaleChar(LID, LOCALE_SDECIMAL, '.');
|
DecimalSeparator:=GetLocaleChar(LID, LOCALE_SDECIMAL, '.');
|
||||||
CurrencyDecimals:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRDIGITS, '0'), 0);
|
CurrencyDecimals:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRDIGITS, '0'), 0);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure GetFormatSettings;
|
||||||
|
begin
|
||||||
|
GetlocaleFormatSettings(GetThreadLocale, DefaultFormatSettings);
|
||||||
|
end;
|
||||||
|
|
||||||
Procedure InitInternational;
|
Procedure InitInternational;
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user