Pylons/pyramid — pull request #1402 by tisdall (2014-08-15 14:01:34+00:00)
Title: to demo i18n improvements

I don't seem to be getting my point across very well in #1398
so I'm throwing together this PR to demonstrate what I'm saying.

The default_locale_negotiator now looks at a
`pyramid.available_languages` value to know what possible languages
values are acceptable. Also, it will now use that value to match
against `Accept-Language` http request headers if no `_LOCALE_` value
is found.

Backwards compatibility: If no `pyramid.available_languages` is set
then the `_LOCALE_` value is returned as before or `None`.
(The `Accept-Language` is ignored as there's nothing to match
against)

Obviously this needs some work, docs, and tests... I thought it'd
be easier to see what I was talking about with a solid example.

The `pyramid.available_languages` is in this form:
```
pyramid.available_languages =
en English
en-US English (United States)
fr French
pr-BR Portuguese (Brazil)
```