I can't find the option of, given a number and a currency, printing them to a string given a culture. The closest thing I've found is decimal.ToString("C", GIVEN_CULTURE)
, but this won't ask for the currency, and will assume I'm talking about the currency the culture knows about. What if I work with USD in Europe?
Javascript, for instance, will request both parameters when building a string:
GIVEN_STRING.toLocaleString(culture, { style: 'currency', currency: currency })
And this is relevant, as the software I'm working on handles both USD and MXN (mexican peso). Our web dashboard displays different symbols regarding culture (Chrome examples, I think it varies cross-browser):
en:
- USD has symbol "$"
- MXN has symbol "MX$"
es-MX:
- USD has symbol "US$"
- MXN has symbol "$"