views:

1495

answers:

3

How can i format currency related data in a manner that is culture aware in JavaScript?

+2  A: 

Dojo has a currency formatter that's locale aware.

If you don't want to include Dojo in your project just for this function, then perhaps you can localize the currency in your back-end?

sherbang
I believe the Dojo currecy formatting is based on XML data from the Unicode Common Locale Data Repository (http://unicode.org/cldr). While Dojo will do the hard work for you, if you don't want to use it you can get the raw data from there.
georgebrock
A: 

Since I'm using ASP.NET 3.5 is there an equivalent in Microsoft's Ajax Framework?

iulianchira
+1  A: 

there is a Number.localeFormat function but I'm not sure it's what your after

http://msdn.microsoft.com/en-gb/library/bb310813.aspx

Christian Hagelid
this is an ASP.NET extension function, not native JS
Jan Willem B