• Nicolas Gelot's avatar
    Fix locale and search language · 3425b984
    Nicolas Gelot authored
    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.
preferences.py 13.6 KB