2 ms·
While the locale implies a country, it does not imply its currency. Many people set their conputers to en-US without ever living there. It's a hack in my book,
by nicbou 4y ago
While the locale implies a country, it does not imply its currency. Many people set their conputers to en-US without ever living there.
It's a hack in my book, but it's the best hack I could come up with.
- masklinn 4y ago> While the locale implies a country, it does not imply its currency. Many people set their computers to en-US without ever living there. And the relation between system and browser language is not always simple. For instance Safari on macOS doesn't (seem to) reflect all the system-configured languages, it just returns the primary (or whatever you configured for safari specifically). So if you habitually configure your system in en (-US or -GB) then add your "mother culture" as secondary, won't work, you'll get USD or GBP which may mean nothing to your day-to-day. > It's a hack in my book, but it's the best hack I could come up with. Since it's your own site, why not add a `localStorage` override? Obviously it requires additional work (a currency picker UI of some sort, and a way to get to it from the tooltip), but it should allow users to fix things up when the defaults are not right for them.
- nicbou 4y agoThe initial design (on paper) let you choose your currency, but I went for something simpler. I like that the tooltips just use :hover styling, and could even work without JavaScript if I set their value on the server side. Something more complex would be a bit more finicky (as are the current glossary tooltips).