Fix numbers being formatted wrong on some machines [DEV-5]

My system is configured to use German causing the method to use the wrong decimal seperator for the given format
This commit is contained in:
Christian Koop 2021-10-02 11:26:50 +02:00
parent 5255dbf701
commit ce72ab7291
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3

View File

@ -15,6 +15,7 @@ public class NumberUtils {
// This is done to specifically prevent the NBSP character from printing in foreign languages.
DecimalFormatSymbols symbols = decimalFormatter.getDecimalFormatSymbols();
symbols.setGroupingSeparator(',');
symbols.setDecimalSeparator('.');
decimalFormatter.setDecimalFormatSymbols(symbols);
return decimalFormatter.format(number);