[wp-meta] [Making WordPress.org] #810: WordPress.org lang-guess
Making WordPress.org
noreply at wordpress.org
Fri Jan 9 12:15:13 UTC 2015
#810: WordPress.org lang-guess
--------------------------+-------------------------------------------
Reporter: marcozink | Owner:
Type: enhancement | Status: new
Priority: normal | Component: International Sites (Rosetta)
Resolution: | Keywords:
--------------------------+-------------------------------------------
Comment (by Otto42):
The language guess code isn't actually based on location, most of the
time. It uses IP based location as a fallback, but generally it's actually
getting the information from your web browser.
Most browsers have the ability to set the desired Language in some manner.
This information gets passed along with the request to the server in an
"Accept-Language" http header. The lang-guess program uses this
information, compares it with our list of sites, and returns the
appropriate response, more or less.
In other words, if your browser was sending Accept-Language: es-cl, then
you would indeed receive a response that linked to cl.wordpress.org, as
that site does exist. Similarly, sending it es-pe would cause it to get
pe.wordpress.org instead.
This is basically a limitation of the browsers not knowing about those
locales, or at least not supporting them as separate languages.
Adding additional IP based lookups to that is possible, but the data for
IP 2 location is generally pretty bad. It probably wouldn't be very
accurate. Still, the data is there, so it's worth looking into.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/810#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list