Thema: SetLocaleInfo

Einzelnen Beitrag anzeigen

Andreas13

Registriert seit: 14. Okt 2006
Ort: Nürnberg
711 Beiträge
 
Delphi XE5 Professional
 
#2

AW: SetLocaleInfo

  Alt 23. Apr 2023, 10:17
Hallo,
vielleicht hilft Dir die betreffende Zeile dieser Procedure zum Ändern Deiner DecimalSeparator-Einstellungen:

Delphi-Quellcode:
Procedure ConfiguraRegiaoBR; // = Original-Name
// Setzt DecimalSeparator etc.
// Quelle:
// http://stackoverflow.com/questions/25109497/decimalseparator-in-sysutils-and-system-sysutils
// von Rodrigo Garcia

Var
  WFormatoBR: TFormatSettings;

Begin
  WFormatoBR:= TFormatSettings.Create;
    
  WFormatoBR.DecimalSeparator := '.'; // ',';
  WFormatoBR.ThousandSeparator:= ','; // '.';
  WFormatoBR.CurrencyDecimals := 2;
  WFormatoBR.DateSeparator := '/';
  WFormatoBR.ShortDateFormat := 'dd/mm/yyyy';
  WFormatoBR.LongDateFormat := 'dd/mm/yyyy';
  WFormatoBR.TimeSeparator := ':';
  WFormatoBR.TimeAMString := 'AM';
  WFormatoBR.TimePMString := 'PM';
  WFormatoBR.ShortTimeFormat := 'hh:nn';
  WFormatoBR.LongTimeFormat := 'hh:nn:ss';
  WFormatoBR.CurrencyString := 'R€'; // 'R$';

  System.SysUtils.FormatSettings:= WFormatoBR;
End;{Procedure ConfiguraRegiaoBR}
{-------------------------------}
Grüße
Andreas
Grüße, Andreas
Wenn man seinem Nächsten einen steilen Berg hinaufhilft, kommt man selbst dem Gipfel näher. (John C. Cornelius)
  Mit Zitat antworten Zitat