4 ms·
Geolocation is bad for detecting the language, the HTTP Accept-Language header is better for that. But Geolocation can be good for localising content. If I'm in
by didroe 17y ago
Geolocation is bad for detecting the language, the HTTP Accept-Language header is better for that. But Geolocation can be good for localising content. If I'm in Germany and search for fast food, I want to see the results in English (if possible) but they should be about German businesses.
It's impossible to get it right though because you need to decide what the user wants to see localised vs always in their home locale. Maybe another header that you could set per site like "Accept-Content-Locale" or something.
And of course, both the Accept-Language and GeoIP methods fail miserably at determining things like the user's time zone. There really should be a "home" and "roaming" locale system in browsers that sends the preferred language, time zone, localised content preference, and anything else that could be useful in generically customising content. The user could set the locale browser wide or per site.
- decadentcactus 17y agoA way that I think would be useful is, presuming you're on "fastfood.com" and not "germanfastfood.com", have a search box where you enter the food (pizza) and a location, which would be automatically filled with the GeoIP location, or blank if you can't determine. That way it's helpful if you are in Germany, but you can change it easily, and aren't forced into it (it's more of an opt-to rather than opt-out)