(no title)
bojanz | 1 year ago
On the other hand, be careful about tying the symbol to the currency, as symbols are locale specific. For example, the symbol for USD is $ in eu-US but US$ in en-CA and en-AU (Canada and Australia), and then $US in French locales.
https://cldr.unicode.org/ is the magical dataset behind most good implementations that deal with currency display. Updated twice a year, available in JSON, providing currency symbols and formatting rules for all locales, as well as country => currency mappings and other useful information.
Disclaimer: I maintain a Go solution in this problem space: https://github.com/bojanz/currency
samatman|1 year ago
Disclaimers separate you from the comment, examples:
> Disclaimer: I am not a lawyer and this is not legal advice
> [says things about $company] Disclaimer: I don't work for $company, I heard this from someone who does but I can't link to a primary source
Disclosures are additional information which you think it's proper to add, to be open about your interest or stake in the topic:
> Disclosure: I wrote a similar library
> [replies to thing about $company] Disclosure: I used to work for $company
ahoka|1 year ago
bojanz|1 year ago
dkarl|1 year ago
andylynch|1 year ago
CLDR a really interesting one though, their list of users is quite something too.
eriksencosta|1 year ago
Anyway, the library uses the CLDR dataset through ICU: https://github.com/eriksencosta/money/blob/trunk/docs/append...
unknown|1 year ago
[deleted]