Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localization, internationalization decimal-separator #187

Open
inox99 opened this issue Mar 25, 2020 · 1 comment
Open

localization, internationalization decimal-separator #187

inox99 opened this issue Mar 25, 2020 · 1 comment

Comments

@inox99
Copy link

inox99 commented Mar 25, 2020

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

@vmsh0
Copy link

vmsh0 commented Feb 2, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants