============================================
Form variable-based browser language adapter
============================================

The ``IUserPreferredLanguages`` adapter provided by the ``adapter.py``
module allows the preferred language to be specified in a request form
variable in addition to the HTTP headers.

Without any language specification, the default translation (English)
is returned:

  >>> print http(r"""
  ... GET /@@testpage HTTP/1.1
  ... """)
  HTTP/1.1 200 Ok
  Content-Length: 17
  Content-Type: text/plain;charset=utf-8
  <BLANKLINE>
  This is a message

When the `Accept-Language` HTTP header is provided, the adapter works
like the default one:

  >>> print http(r"""
  ... GET /@@testpage HTTP/1.1
  ... Accept-Language: de
  ... """)
  HTTP/1.1 200 Ok
  Content-Length: 23
  Content-Type: text/plain;charset=utf-8
  <BLANKLINE>
  Dies ist eine Nachricht

The innovation is that when a request variable, e.g. from a GET form,
is provided, it influences the target translation language, too:

  >>> print http(r"""
  ... GET /@@testpage?ZopeLanguage=es HTTP/1.1
  ... """)
  HTTP/1.1 200 Ok
  Content-Length: 17
  Content-Type: text/plain;charset=utf-8
  <BLANKLINE>
  Eso es un mensaje

Note that the request variable takes precedence over any HTTP header:

  >>> print http(r"""
  ... GET /@@testpage?ZopeLanguage=es HTTP/1.1
  ... Accept-Language: de
  ... """)
  HTTP/1.1 200 Ok
  Content-Length: 17
  Content-Type: text/plain;charset=utf-8
  <BLANKLINE>
  Eso es un mensaje
