Format international currencies

I have an asp.net application in which we are in the process of "globalization", I have currentculture, and currentUICultre is set to the appropriate values, and currencies are displayed on hold using the format currency, i.e.

FormatCurrency(_nPrice)

produces

$ xxx.xx for en-AU and £ xxx.xx for en-GB, however, we need to distinguish between the currency of the value displayed in a different symbol, because many currencies use the dollar sign,

For example, we need to display $ 123.12 for states or $ 123.12 for Australia. Is there an automatic way to do this as it is for a character.

Any suggestions would be appreciated. Thanks,

+3
source share
1 answer

RegionInfo ISOCurrencySymbol. CurrentCulture, :

string currencySymbol = RegionInfo.CurrentRegion.ISOCurrencySymbol;

// currencySymbol equals EUR for France(fr-FR) or any EU country
// returns AUD for en-AU, US for en-US, etc.
+2

Source: https://habr.com/ru/post/1707731/


All Articles