Re:Show HN: A New, Clean Geolocation API
by qwerty456127 on Friday December 08, 2017 @02:03PM
(#15881017)
If the geolocation api doesn't give anything - that probably means the user has chosen to configure it this way because they don't want to share their location. You should probably ask them in case you actually need to know where they are.
Re:Show HN: A New, Clean Geolocation API
by endless1234 on Friday December 08, 2017 @03:21PM
(#15881697)
If one is not even allowed to guess with the user's IP the language this should be asked in, should the first question be some kind language selection form with just pictograms in it? :-)
Re:Show HN: A New, Clean Geolocation API
by stedaniels on Friday December 08, 2017 @02:57PM
(#15881489)
True. But what language should you ask them in? Correctly assuming some details improves the UX for the many.
Re:Show HN: A New, Clean Geolocation API
by ksenzee on Friday December 08, 2017 @03:34PM
(#15881801)
You should ask them in whatever language their Accept-Language HTTP header specifies. If there isn't one, then ok, maybe look at their IP. But it makes no sense to treat the IP as a more valuable source of information than the HTTP header that's there for exactly this purpose.
Re:Show HN: A New, Clean Geolocation API
by qwerty456127 on Friday December 08, 2017 @03:47PM
(#15881906)
If there isn't one (which is rather improbable - AFAIK all the browsers have it set by default), then it should be either English or both English and the language assumed given the IP address.
And it's sometimes the only information they have if the geolocation api doesn't give them anything.