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: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.

Answers


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;

Need Your Help

Adding a background image to a UILabel

iphone objective-c ipad ios uikit

I'm attempting to add a UIImageView to the subview of a UILabel, but for some reason, I'm unable to have it as the background as this will cover the actual label text.

- (void)dealloc Question

iphone objective-c ios memory-management

Can you tell me if the following code is 100% correct? Expecially the dealloc section

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.