Guess request language from supported languages only

This commit is contained in:
str4d
2013-07-14 07:01:13 +00:00
parent a305c9efac
commit 1e5a48aad3

View File

@@ -67,7 +67,7 @@ def get_locale():
return g.lang
# otherwise try to guess the language from the user accept
# header the browser transmits. The best match wins.
return request.accept_languages.best_match(['en', 'es', 'zh', 'de', 'fr', 'it', 'nl', 'ru', 'sv', 'cs', 'ar'])
return request.accept_languages.best_match(SUPPORTED_LANGS)
##########################