aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/web/views/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/views/__init__.py b/src/web/views/__init__.py
index e0e49927..10b5cf54 100644
--- a/src/web/views/__init__.py
+++ b/src/web/views/__init__.py
@@ -19,4 +19,7 @@ from flask import g
@g.babel.localeselector
def get_locale():
- return request.accept_languages.best_match(conf.LANGUAGES.keys())
+ try:
+ return request.accept_languages.best_match(conf.LANGUAGES.keys())
+ except:
+ return 'en'
bgstack15