Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can a website determine my language preference (and wrongly, I might add)?

When I browse to a site, it defaults to setting the site language to Afrikaans. I've never selected this before, nor given any indication of such in any site-wide or local browser setting.

But I'm not trying to troubleshoot this specific site, I'm just wondering about the methodology -- how a website is able to determine what language it thinks the user uses -- and whether it's coming from browser settings, or cookies, or headers, etc.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Your browser sends an accept-language header, which gives your language preferences. Most sites choose their language based on that header, which you can change in your browser settings. Other sites might do this based on the geolocation of your IP address.

share|improve this answer

You can take a look at this page to see what headers your browser is sending:
http://pgl.yoyo.org/http/browser-headers.php

The Accept-Language header is particularly important.

If there's nothing unusual in the headers, then some other options are:

  1. How are you connected to the internet? The site may be doing geolocation based on your IP address.

  2. Is there any indication as to the language in the URL you're going to? Somebody may have sent you a URL based on the language they were browsing the site in.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.