Resolve "Initialize default local currency based on locale"
Closes #430
- Adds a list of countries in the Euro zone (since the currency list maps the Euro to the "EU" country code)
- Modifies the initialization of the
preferences
reducer to call a function that gets the device locale viaDevice.getLanguageTag
and tries to map it with a currency in the list, otherwise just uses the current default
Notes
- The device locale used in this implementation typically refers to the language used in a given region (see IETF BCP 47), and may not always reflect the currency correctly. I personally have
en-GB
on my laptop for some reason, and that maps to GBP, even though I'm not in a GBP country. - As with Euro, there might be items in the list that use a code that is not a country itself, thus would never show up in the locale string and not be matched. If we are aware of those, we should include additional lists and map accordingly.