I was made some changes in the i18n package to make it more compatible with Delphi XE3 during install..
Modified files:
1. DELPHIAREA.INC
Open it, and paste code:
- Code: Select all
{$IFDEF VER240} //Delphi XE3
{$DEFINE DXE3}
{$ENDIF}
{$IFDEF VER230} //Delphi XE2
{$DEFINE DXE2}
{$ENDIF}
{$IFDEF VER220} //Delphi XE
{$DEFINE DXE}
{$ENDIF}
after:
- Code: Select all
{ Then detect if it is older (.NET versions are ignored) }
Then save it.
2. i18nJSON.pas
Open it.
Find text:
- Code: Select all
{ Local Helper Functions
after it you will be see two methods:
- Code: Select all
function StrToNumber(const Str: String): Extended;
function NumberToStr(const Value: Extended): String;
replace it by this code:
- Code: Select all
function StrToNumber(const Str: String): Extended;
begin
if {$IFDEF DXE3} FormatSettings.DecimalSeparator {$ELSE} DecimalSeparator {$ENDIF} <> '.' then
Result := StrToFloat(StringReplace(Str, '.', {$IFDEF DXE3} FormatSettings.DecimalSeparator {$ELSE} DecimalSeparator {$ENDIF}, []))
else
Result := StrToFloat(Str)
end;
function NumberToStr(const Value: Extended): String;
begin
Result := Format('%g', [Value]);
if {$IFDEF DXE3} FormatSettings.DecimalSeparator {$ELSE} DecimalSeparator {$ENDIF} <> '.' then
Result := StringReplace(Result, {$IFDEF DXE3} FormatSettings.DecimalSeparator {$ELSE} DecimalSeparator {$ENDIF}, '.', []);
end;
All work's done!
Good luck and happy coding!