This project is not covered by Drupal’s security advisory policy.


The Format Number API module provides a method to configure number formats (site default and user defined) with configurable decimal point and thousand separators.

This module also provides the 'numericfield' Forms API element, which is a right aligned text input element that allows the user enter numbers using the configured thousands separator and decimal point (site default or user defined). This Forms API element provides a validation callback that is used automatically and that ensures input is valid numeric as per the options defined for the element.

Several functions are exposed by the module that can be used by other contributed or custom modules to display numbers accordingly, from PHP and JavaScript as well. For further information, please see the README.txt.

This module does not add any other functionality by itself, rather it might be required by other contributed or custom modules. Modules using this API: Cache browser, Formatted Number CCK, Money CCK field, Measured Value Field, Referential Integrity for CCK.

Maintained by cweagans, tinker and markus_petrux.

External references

- PHP manual: number_format().
- Unicode Locale Data Markup Language (LDML).
- Unicode CLDR Project: Common Locale Data Repository (CLDR).
- CLDR By-Type Chart: number.symbol.
- Wikipedia: Decimal separator.

Drupal related issues:

- #1345758: META: Provide locale (regional) formats framework for automated translation of non textual data
- #52153: Add format_number() and settings to configure decimal point and thousands separators
- #471058: Implement format_number() for international number formating

How can you get involved?

Project Information