mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +02:00
[enh] configurable default interface locale - #177
This commit is contained in:
parent
317bce74dd
commit
08c2e263f5
2 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,9 @@ cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years
|
|||
def get_locale():
|
||||
locale = request.accept_languages.best_match(settings['locales'].keys())
|
||||
|
||||
if settings['server'].get('default_locale'):
|
||||
locale = settings['server']['default_locale']
|
||||
|
||||
if request.cookies.get('locale', '') in settings['locales']:
|
||||
locale = request.cookies.get('locale', '')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue