You're wrong. :)
This is what the Accept-Language header is meant for[1]. AFAIK it is sent by most modern browsers, although as the referenced MDN article explains it isn't always an accurate reflection of user preferences. I'm not sure how iOS Safari in particular sets its value, but I would imagine that it is based on the current OS language setting.
[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_ne...
Spanish speakers (in Spain at least) tend to come from google.es, which prefers Spanish-language results, or from Spanish language links and discussions.
It is wrong behaviour to choose my language based on my location.
Given, they're "similar" languages, but I would think Google would recognize "não" (no), for example, as belonging to the Portuguese language (especially since it's the only language that uses that word).
also, as previous sites don't add the chosen language in the click request, i don't see how being on hn previously is relevant.
the flip side to this is - if this is actually a big problem (incorrect renderings of language) maybe some dnn could be applied for a new start up idea! haha