Fix locale and search language
Locale and search language was always defined with english value. This patch inits the locale on `pre_request` in order to define the default value of locale and language preferences. Plus the `best_match` function provided by flask babel library did not work as expected. So the function `match_language` provided by searx is used to detect that the language from Accepted-Language header can be used in searx project. Close: https://github.com/asciimoo/searx/issues/844 Close: #35, #42
Loading
Please register or sign in to comment