locale rather than target_lang in the get parameters
This commit is contained in:
parent
7acdbfd364
commit
376e6ef296
@ -248,8 +248,8 @@ def get_locale_from_request(request):
|
|||||||
accept_lang_matches = request.accept_language.best_matches()
|
accept_lang_matches = request.accept_language.best_matches()
|
||||||
|
|
||||||
# Your routing can explicitly specify a target language
|
# Your routing can explicitly specify a target language
|
||||||
if request.matchdict.has_key('target_lang'):
|
if request.matchdict.has_key('locale'):
|
||||||
target_lang = request.matchdict['target_lang']
|
target_lang = request.matchdict['locale']
|
||||||
elif request.session.has_key('target_lang'):
|
elif request.session.has_key('target_lang'):
|
||||||
target_lang = request.session['target_lang']
|
target_lang = request.session['target_lang']
|
||||||
# Pull the first acceptable language
|
# Pull the first acceptable language
|
||||||
|
Loading…
x
Reference in New Issue
Block a user