1
0
mirror of https://github.com/janeczku/calibre-web.git synced 2024-11-30 09:07:17 +02:00
This commit is contained in:
Ozzieisaacs 2018-12-30 14:25:03 +01:00
parent cb0f3cd074
commit 9cfe1dce20

View File

@ -194,7 +194,7 @@ def get_locale():
if user.nickname != 'Guest': # if the account is the guest account bypass the config lang settings
return user.locale
translations = [str(item) for item in babel.list_translations()] + ['en']
preferred = [str(LC.parse(x.replace('-','_'))) for x in request.accept_languages.values()]
preferred = [str(LC.parse(x.replace('-','_').replace('*','en'))) for x in request.accept_languages.values()]
return negotiate_locale(preferred, translations)