decimal separator lazarus / 11-Options ---------------------------------------------------------------------- franzala · 2022-05-23 16:53 With Lazarus 2.0.10 under Ubuntu 20.04 and french as language (/etc/default/locale file shows      LANG="fr_FR.UTF-8") I obtain a dot as decimal separator with the numerical keypad. How could I change it to a comma, which I obtain with other softwares as Libre Office Spreadsheets for instance. ---------------------------------------------------------------------- AlexTP · 2022-05-23 17:05 Assign to FormatSettings.DecimalSeparator ? https://stackoverflow.com/questions/25109497/decimalseparator-in- sysutils-and-system-sysutils ---------------------------------------------------------------------- Handoko · 2022-05-23 17:06 Drop a TEdit on the form and put this code on the TEdit's OnChange event: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Edit1Change(Sender: TObject);var  D: Double;begin  DecimalSeparator := ',';  if not(TryStrToFloat(Edit1.Text, D)) then  Caption := '(error)'  else    Caption := D.ToString;end; Read more: https://www.freepascal.org/docs-html/rtl/sysutils/strtofloat.html https://wiki.lazarus.freepascal.org/DecimalSeparator https://www.freepascal.org/docs-html/rtl/sysutils/tformatsettings.html ---------------------------------------------------------------------- Thaddy · 2022-05-23 17:15 Quote from: AlexTP on May 23, 2022, 07:05:08 pmAssign to FormatSettings.DecimalSeparator ? https://stackoverflow.com/questions/25109497/decimalseparator-in- sysutils-and-system-sysutils No, make a copy of FormatSettings (an instance of a record) as a local instance of TFormatSettings (A record declaration) and change it there. ---------------------------------------------------------------------- Sieben · 2022-05-23 17:58 Try adding unit cLocale to the uses clause of your .lpr file, after(!) cThreads: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program MyProg; {$mode objfpc}{$H+} uses  {$IFDEF UNIX}  cThreads,  cLocale,  {$ENDIF}  Interfaces, Forms, //... ---------------------------------------------------------------------- zeljko · 2022-05-23 18:43 That's pretty strange. Locales should be properly loaded on linux without including cLocale or setting Decimal/Thousand separator IMO. You should check what locale is loaded with echo $LANG or echo $LC_NUMERIC. Maybe your locale isn't properly installed.