The parser has unit tests focusing on edge cases of price formatting:
> cd .\parser\
> yarn test
The end-to-end tests attempt to compare known prices for the D2 v3
instance in us-west
using permutations of supported culture
, operating-system
, and currency
:
> cd .\parser\
> yarn e2e-all
Culture | Culture display name | Currency | Currency display name | Support |
---|---|---|---|---|
en-us |
English (US) | usd |
US Dollar ($) | ✅ |
cs-cz |
Čeština | eur [1] |
Euro (€) | ✅ |
da-dk |
Dansk | dkk |
Danish Krone (kr) | ✅ |
de-de |
Deutsch | eur |
Euro (€) | ✅ |
chf [2] |
Swiss Franc. (chf) | ✅ | ||
en-au |
English (Australia) | aud |
Australian Dollar ($) | ✅ |
en-ca |
English (Canada) | cad |
Canadian Dollar ($) | ✅ |
en-in |
English (India) | inr |
Indian Rupee (₹) | ✅ |
en-gb |
English (UK) | gpb |
British Pound (£) | ✅ |
nzd [3] |
New Zealand Dollar ($) | ✅ | ||
es-es |
Español | eur |
Euro (€) | ✅ |
es-mx |
Español (MX) | usd [4] |
US Dollar ($) | ✅ |
fr-fr |
Français | eur |
Euro (€) | ✅ |
chf [2] |
Swiss Franc. (chf) | ✅ | ||
fr-ca |
Français (Canada) | cad |
Canadian Dollar ($) | ✅ |
it-it |
Italiano | eur |
Euro (€) | ✅ |
chf [2] |
Swiss Franc. (chf) | ✅ | ||
hu-hu |
Magyar | eur [1] |
Euro (€) | ✅ |
nb-no |
Norsk | nk |
Norwegian Krone (kr) | ✅ |
nl-nl |
Nederlands | eur |
Euro (€) | ✅ |
pl-pl |
Polski | eur [1] |
Euro (€) | ✅ |
pt-br |
Português (Brasil) | brl |
Brazilian Real (R$) | ✅ |
pt-pt |
Português | eur |
Euro (€) | ✅ |
sv-se |
Svenska | sek |
Swedish Krona (kr) | ✅ |
tr-tr |
Türkçe | usd [4] |
US Dollar ($) | ✅ |
ru-ru |
Pусский | rub |
Russian Ruble (руб) | ✅ |
ja-jp |
日本語 | jpy |
Japanese Yen (¥) | ✅ |
ko-kr |
한국어 | krw |
Korean Won (₩) | ✅ |
zh-cn |
中文(简体) | N/A |
N/A | N/A |
zh-tw |
中文(繁體) | twd |
Taiwanese Dollar (NT$) | ✅ |
1. Euro is used for countries which don't have their currency listed, are part of the European Union but not part of the Eurozone.
2. German, French and Italian are three of the official languages of Switzerland.
3. English (UK) has been selected due to the use of New Zealand English in New Zealand.
4. USD is used when no other currency could be matched to the country.