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

How to override the default currency format for en-US? #727

Open
christian-ritter opened this issue Oct 5, 2023 · 0 comments
Open

How to override the default currency format for en-US? #727

christian-ritter opened this issue Oct 5, 2023 · 0 comments

Comments

@christian-ritter
Copy link

How can I override the default currency format for language en-US?

For other languages I do it as follows:

const en = require('numbro/dist/languages/en-GB.min') as numbro.NumbroLanguage;

en.currencyFormat.average = false;
en.currencyFormat.spaceSeparated = true;
en.currencyFormat.thousandSeparated = true;
en.currencyFormat.mantissa = 2;
en.currencyFormat.totalLength = 0;
en.currencyFormat.currencySymbol = '€';

numbro.registerLanguage(en);

But for en-US there is no language file available that I could import and override.
Of course I could set the format where ever I use .formatCurrency() but I want it to be configured on a central place.

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

1 participant