I would find it nice if there was a way to format numbers according to the locale.
For instance, the number 1234.56 (as written in Javascript) should be rendered as 1,234.56 in English and 1 234,56 in French.
So it would be amazing if $.i18n('number-of-results', 1234.56) could render as There are 1,234.56 results in English and Il y a 1 234,56 résultats in French.
Apologies if this is already supported somehow, I couldn't figure it out looking at the readme.
The standard function Number.prototype.toLocaleString can of course be used but this has two downsides:
- this will format the number according to the browser's locale, which might not be the same as the one used by this library
- this means supplying this number as a string to jquery.i18n, so we probably break plural support by doing that (I haven't actually tried)
I would find it nice if there was a way to format numbers according to the locale.
For instance, the number
1234.56(as written in Javascript) should be rendered as1,234.56in English and1 234,56in French.So it would be amazing if
$.i18n('number-of-results', 1234.56)could render asThere are 1,234.56 resultsin English andIl y a 1 234,56 résultatsin French.Apologies if this is already supported somehow, I couldn't figure it out looking at the readme.
The standard function Number.prototype.toLocaleString can of course be used but this has two downsides: