Dan Dan - 7 months ago 69
Javascript Question

Javascript Number and Currency localization

I've run into numbers and currency localization in JavaScript

What I need is a convenient library for that.

I am responsible for setting the decimal separators, currency, etc.

Please post the best links you think


The best answer for you probably depends on what javascript libary, if any, you are currently using. But YUI has support for number/currency formatting with internationalization, and it is a solid and well-designed library.


    prefix: "€",
    thousandsSeparator: ".",
    decimalSeparator: ",",
    decimalPlaces: 2,
    suffix: " (EUR)"