I am trying to change the existing number formatting in my corporate application to make it more readable for international users. This is an application for trading stocks, so most stock prices come up to two decimal places, for example, like this → 17.23. We can also get ticks with an accuracy of 4 decimal points, so the penny stock can be 0.0341. The original line format we used for stocks was "#, ## 0.00 ##", which would give us the format we wanted (basically trimming 0). The problem here is that "," and "." crowded out by the user, where in many other countries the thousands separator is ".". and the decimal point is ",". The male boss doesn’t want to use “N4” for all numbers,although this will solve the problem of globalization. Is it possible to have a global custom string format?
Other options besides writing the average person’s code to internationalize numbers formatted in the original way or using the other string.format method?
source
share