Bug 6755 Web browser default lang != syspref selected langs
When Web browser default selected language doesn't belong to selected
languages list defined by syspref (language / opaclanguages), web pages
are returned in this language, which is wrong...
This patch get this behavior:
- If selected by user language is available (cookie), it is used.
- Otherwise, language is set to default web browser language.
- If this language doesn't belong to languages list (syspref),
English is selected
Some code cleanup.
To test properly: don't forget to delete your cookies, and to test what
happens without and with cookie.