aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/web/views/__init__.py b/src/web/views/__init__.py
index c5903d9b..6de83818 100644
--- a/src/web/views/__init__.py
+++ b/src/web/views/__init__.py
@@ -10,3 +10,11 @@ __all__ = ['views', 'home', 'session_mgmt', 'api',
'article_bp', 'articles_bp', 'feed_bp', 'feeds_bp',
'category_bp', 'categories_bp', 'icon_bp',
'admin_bp', 'user_bp', 'users_bp']
+
+import conf
+from flask import request
+from flask import g
+
+@g.babel.localeselector
+def get_locale():
+ return request.accept_languages.best_match(conf.LANGUAGES.keys())
bgstack15