Skip to content

Commit

Permalink
REPORTGEN-508 : generate template in french gives error
Browse files Browse the repository at this point in the history
  • Loading branch information
AEteve committed Apr 2, 2019
1 parent b71c76e commit 217ced1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CastReporting.Reporting/Helper/FormatHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,16 @@ public static string FormatEvolution(this double pValue) {

public static string FormatStringDoubleIntoString(this string pValue)
{
double var = double.Parse(pValue);
double var;
try
{
var = double.Parse(pValue, CultureInfo.CurrentCulture);
}
catch (FormatException)
{
var = double.Parse(pValue, new CultureInfo("en-US"));
}

return var.ToString("N2");
}
}
Expand Down

0 comments on commit 217ced1

Please sign in to comment.