Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are a number of ways of obtaining some form of locale information. Some of them use advanced techniques such as geolocation based on ping delay or topology, but one of the most common way is to look into the content of a HTTP headers that request a web page from the public instance. At least the following three headers parts of an HTTP request are relevant to the identification of the public user's locale identification:

  • the User-Agent header
  • the Accept-Language
  • Path
  • header
  • Request-URI

While it may occassionally contain some locale information, for example the en_US part in 

Code Block
Mozilla/5.0 (compatible; Konqueror/4.5; NetBSD 5.0.2; X11; amd64; en_US) KHTML/4.5.4 (like Gecko)

the locale information is redundant information in the User-Agent header and more often than not, the header will not contain it. Internally, Magnolia has no direct means how to check and use this kind of information.

The preferred locale information is communicated in the Accept-Language header.

<TODO>The first one 

The Public instance delivers the final page to a page visitor, and tries to deliver it in a way that fulfills the content of the HTTP request for the page. A part of the HTTP request's header defines which languages the visitor (client) is able to understand, and which locale variant of the page is preferred. The part that does this is the Accept-Language request header and may take one of the following three forms:

...