Format decimals with single function, convert locale to standard form. #3862