O'Reilly logo

jQuery UI Cookbook by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required