On the technical side:
Querrying the backend using the longitude and latitude (option 2) has the advantage of providing the country in the same way for every platform.
However it has the following drawbacks:
- a user can refuse to share geolocalisation in order to protect his privacy. You won't get lattitude and longitude. THis will break your design.
- whenever a user refuses geolocalisation, you're bound to the phone configuration, which will certainly determine country using less accurate means (e.g. phone configuration, IP address, telecom carrier, etc..). So if you implement option 2, you'll anyway have to provide for option 1.
- this design does not enforce privacy by design, because you involuntarily track the movements of the user on the backend, whereas it's not directly needed to provide the service you intend.
- geospatial coordinates are not completely accurate in some areas, or if you're in tunnels or undergrounds
- geospatial coordinates might be irrelevant if user sits in a train or a plane
- In addition you might soon worry about legal issues as well: it is not to exclude that some countries could adopt laws to restrict geotracking. Especially if more incidents like this one raises awareness and fears.
So for all these reasons, I'd strongly suggest option 1 and pass the country code to the backend.
The user experience point of view
Using geographic location to decide on localization topics such as number and date format does not always give you happy users. Here some topics you should consider:
- Some peope could consult your site while on travel. They may want to use the formatting of their home country and not one which they are not familiar with.
- For currency it's even worse: it's possible that the user want to see the prices in local currency of the shop. Or they may want to see the prices in their home currency (because they are on business trip and will handle the order when back at home).
- Some countries have several official languages: minorities might get upset if you systematically use the most used language. SO for language, best get the preferences from the phone's or the browser's settings.
So if you use a geolocalized country code, consider to nevertheless take the localization settings from the phone (language, formats). And if you use local currency of the country (especially if your app is related to tourism), give your user the possibility to change the display currency.