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

Support for other Currency Codes when using different locale #7

Open
bvkimball opened this issue Oct 26, 2017 · 0 comments
Open

Support for other Currency Codes when using different locale #7

bvkimball opened this issue Oct 26, 2017 · 0 comments

Comments

@bvkimball
Copy link

The following don't work when not in the same locale as the currency.

abbrev full symbol
PLN Polish Zloty
CHF Swiss Franc CHF
AED United Arab Emirates Dirham AED
SGD Singapore Dollar $, S$
HUF Hungarian Forint Ft
DKK Danish Krone kr.
SEK Swedish Krona kr
NOK Norwegian Krone kr
ZAR South African Rand R

The issue is with then INTL libary only seems to support true currency symbols (ie. single character) from here:
http://www.fileformat.info/info/unicode/category/Sc/list.htm

Spec: http://www.ecma-international.org/ecma-402/1.0/#sec-6.3

We should create an override system for these scenarios to check if the currency code (PLN) is still in the formatted string replace with overrideString in a mapping we maintain.

Override should happen here: https://github.com/bullhorn/chomsky/blob/master/src/lib/formats.ts#L53

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

No branches or pull requests

1 participant