Parsing Localized Strings in JavaScript

Now I discover (well, the testers discover) JavaScript does not take locale into consideration when attempting to parse a float.

So if you’re localized to Belgium, then parseFloat ('134,39') returns 134.

You’ll need to wrap parseFloat appropriately.

Possibly Related posts (machine generated):

  1. Localized Date Parsing in JavaScript
  2. Minesweeper in XSLT
  3. Some JavaScript Links
  4. User prefs via JavaScript
  5. JavaScripting Mac OS

More like this: , .