localization - Are currency formatting functions actually useful? -
With many languages, such as the built-in currency formatting feature Whatever he does, he uses a number-specific number format to format a number and adds a currency symbol of the culture.
The problem here is that the number format is strongly coupled with the currency symbol, number of behaviors in practice should be correct for the surrounding text language, whereas the symbol of currency is the currency being talked about must have to. For example, you will not use American thousand separators while talking about US Dollars in German.
Can you think of a practical use for this type of currency formatting, or are they present in the money-oriented management to influence people?
The symbol can be overridden as needed.
Like your example, if I am embedding the currency value in a string, then I use the string culture for the format, but override the appropriate currency symbol. The rest of the formatting has been omitted.
On the other hand, if I am doing a report then all the values are formulated using all cultures. I generally use ISO 3-character codes instead of currency symbols in this case, especially if it is included in more than 2 currencies to avoid issues with font.
It shows that the best practice for currency formatting in C #.
Comments
Post a Comment