Hi,
Using French as the default language on our site, we noticed a few inconsistencies when browsing the invenio website.
When navigating the site (as a guest) in the default language, the ln= parameter in the url is generally
omitted (eg. webdocs, search interface), and thus the user's preferred language is used (if available).
We found that this can result in an inconsistent browsing experience for the user.
For example: CFG_SITE_LANGS is, say, 'en,fr,de', CFG_SITE_LANG is 'fr', and user Bobby F.
has set the preferred languages in his browser as such: Accept-Language: 'en-us,en;q=0.9,fr-ch;q=0.8'
(English is preferred over French). Bobby chose to browse the site in French, but when performing searches
and clicking links, he is presented pages in English because of his browser's settings. Bobby wonders why
the pages are in English since he previously clicked on the 'fr' language link.
This means that when browsing the site in the default language, we are dependant on the user's
browser settings. In order to override the preferences detection, we simply edited webinterface_handler.py
so that CFG_SITE_LANG is used instead of calling the function get_preferred_user_language.
This works fine for us. However, being rather reluctant to locally modify the code too much in order to ease
our server's future upgrades, we would like to suggest making this behaviour configurable, with for
example a variable CFG_SITE_LANG_USE_USER_PREFS being set to 1 or 0 depending on whether we want to use
the preferred language set in the browser or not.
Thoughts?
Best regards,
Dominic Wyler
