sprintf.js
sprintf.js copied to clipboard
localization, internationalization decimal-separator
is it possible to setup sprintf to format due to a language-specifier (e.g."fr", "es", "de") to have the output accordingly? So: console.log(sprintf("%0.2f", 1.23456789)); to print 1.23 for "en" 1,23 for "de" either by choosing a language-specifier or by setting the decimal-separator-character?
Edgar
I also need this. As far as I can see, this is currently not possible. As a workaround, I'm replacing a '.' with a ',' after formatting (I'm only using the library for very simple use cases).