Formatting currencies for local cultures
It is possible to use the spinner widget in conjunction with the Globalize jQuery library. The Globalize library is an effort by the jQuery foundation to standardize the way jQuery projects format data for different cultures. A culture is a set of rules that formats strings, dates, and currencies according to cultural norms. For example, our application should treat German dates and currencies differently from French dates and currencies. This is how we're able to pass a culture
value to the spinner widget. Let's look at how we can use the Globalize library with the spinner widget to format currencies to local cultures.
How to do it...
The first thing our application needs when working with several locales is to include the globalize
libraries. Each culture is contained in its own JavaScript file.
<script src="globalize.js" type="text/javascript"></script> <script src="globalize.culture.de-DE.js" type="text/javascript"></script...