The internationalization API is a very simple way to convert numbers to a string format including comma/period placement and even currencies around the world. However, there is no way to reverse that API. This renders the Intl.numberFormat
function fairly unusable, especially when converting back and forth between an integer, server format and a string, display format for input fields.
This can be solved using a number parser that involves the i18n info, such as locale and/or currency code. We could use the format patterns already associated with the locales, currencies, etc. to match floats in the given number string.
As this is my first post, I am looking for feedback on:
- How do I obtain the number formats baked into the spec?
- What additional information / investigations do I need to provide to make this proposal?