diff options
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/__init__.py | 5 |
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' |