aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-09 14:07:38 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-09 14:07:38 +0200
commita0203dc2aae6bd36dd980832b6ffbfdf75b5c936 (patch)
treec7a7493dedd3efcf4598d11d3c1911da19aa1f9d /src/web/views
parentAdd a link to the list of categories. (diff)
downloadnewspipe-a0203dc2aae6bd36dd980832b6ffbfdf75b5c936.tar.gz
newspipe-a0203dc2aae6bd36dd980832b6ffbfdf75b5c936.tar.bz2
newspipe-a0203dc2aae6bd36dd980832b6ffbfdf75b5c936.zip
Updated translations.
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