|980508-4||How can an HTTP client automatically select in which language a HTML page is to be displayed?|
In the request command, the HTTP client includes the following header field to the server:
Where "sv" indicates the Swedish language. The language tags are based on an ISO standard, further enhanced by IETF in RFC 1766.The value in the Accept-language header field can, according to the present HTTP/1.1 proposed standard, be one or a list of preferred languages, for example
Accept-Language: da, en-gb;q=0.8, en;q=0.7
indicates that Danish is best, British English second best, any other English third choice. However, much existing software today (May 1998), is only able to handle a single, or the first, language.
This method is known under the term server-driven selection, since it is the server which decides which version to send based on information from the client. The RFC 2068 version of HTTP/1.1 also specified a header for client-driven selection, with the name Alternates. The idea is that the server sends a list of alternate forms of a document, with information about them, and the client choses which to download. This field has not been very much used, and will probably be removed from the next version of HTTP.
List of exam questions