One time in past, I needed to have decimal separator as dot and thousand separator as space for a string in Java.
E.g.
134523423 should produce 1 345 234.23
So my solution was:
DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();
symbols.setGroupingSeperator(' ');
DecimalFormat df = new DecimalFormat("###,##.##", symbols);
String output = df.format(1345234.23,)