Nuances around location-based programming
austingil.com
austingil.com
> You want to set the language or currency of your app based on the region.
DO NOT DO THIS. I prefer my software and articles in English or at the very least based on the locale I set myself. However, my location would not allow for this, which is highly annoying. There is nothing more annoying than applications and websites that try to figure out the language out for themselves, ignoring my preferences. Then of all the methods using the location is the worst one to choose from. Further down, the article briefly acknowledges this, but I can't understate how much of an annoyance it is when websites try to be clever here. If you want to do anything, make it a nice little menu that pops up on the right of my screen *asking* me if I want to switch.
> You want to geofence your app for legal reasons (eg. cookie banners).
I guess it is a valid reason, but whenever I encounter websites that do this I also know to avoid them as they clearly do not respect the privacy of their visitors and do not care to hide it either.
The article also mentions that IP location might not be reliable because of VPNs, which is true. But it also isn't reliable in general, as it depends on a lot more factors. At most it gives you a rough potential location but it can easily be hundreds of kilometers off without the user using anything like a VPN.
The correct way is to show the version I came for and maybe inform me that an option in a preferred language exists.
Since I travel a lot, I must also repeat that my location does not inform which languages I speak, or which country's subsite I want to see. I might do Germany-related business while I'm visiting the family abroad. I don't speak Thai just because I'm in Thailand.
I agree, but the article isn't suggesting that you SHOULD do this, though. It's simply giving it as a possibly use-case that would require location-based logic.
Nepal for example uses a +545 offset, and a one in 6 chance that you’re in the Kathmandu valley (based on population stats, but you could do better with internet stats).
This works quite decently for small unique timezones, but gets fuzzier for the larger ones (China and India are just one timezone each).
I then thought of using other Signals to augment the probabilities (such as the locale which does have its own issues). At that point it felt like a fingerprinting project instead of anything novel and I lost interest.