Formatting currency for AED
I'm currently doing a project for a client in Dubai, where the currency is AED. Throughout the project I used {0开发者_如何学Go:c} assuming that setting the local in web-config would sort me out.
I set the culture in web.config using:
<globalization culture="ar-AE" />
This used arabic symbols for the currency, which I assumed the client would want (turns out I assumed a bit too much). They actually wanted the currency to look like:
AED 50.00
I'm not sure if this is the standard format or not. Is there a way in web.config to make it use this format. I ended up hard coding all the currencies, but I'm sure there must be a better way.
Assuming the current culture/region is set, this is avilable in the following:
string symbol = System.Globalization.RegionInfo.CurrentRegion.CurrencySymbol;
string symbol = System.Globalization.RegionInfo.CurrentRegion.ISOCurrencySymbol;
精彩评论