openexchangerates / accounting.js

A lightweight JavaScript library for number, money and currency formatting - fully localisable, zero dependencies.
http://openexchangerates.github.io/accounting.js
MIT License
4.95k stars 532 forks source link

Create plugin for l10n formatting information #7

Open wjcrowcroft opened 13 years ago

wjcrowcroft commented 13 years ago

On Forrst, Jan-Marten de Boer (johmanx10) pointed to a script he wrote that returns a JSON-representation of a country's localisation data - currency symbol, number formatting, etc. - for example: http://lievheid.nl/assets/langinfo/nl/nl/utf8

Since the data doesn't change much and could realistically be bundled into one script, with no AJAX request necessary, the idea was raised about it being turned into a plugin that can work with accounting.js to give developers access to a country's localisation style, or the ability to set a locale and have the defaults set automatically.

This (and other plugin ideas) relies on making a very simple plugin architecture for accounting.js, and making a library configuration object that the plugin could interface with to control the formatting