locale rather than target_lang in the get parameters
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 13 May 2011 04:17:53 +0000 (23:17 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 13 May 2011 04:17:53 +0000 (23:17 -0500)
mediagoblin/util.py

index 8c6ec6ccec3049f729ac03bfe4b169c21beb7bbc..1f568ed3826cd1d4fe8f885ea2beaa04e4f8e582 100644 (file)
@@ -248,8 +248,8 @@ def get_locale_from_request(request):
     accept_lang_matches = request.accept_language.best_matches()
 
     # Your routing can explicitly specify a target language
-    if request.matchdict.has_key('target_lang'):
-        target_lang = request.matchdict['target_lang']
+    if request.matchdict.has_key('locale'):
+        target_lang = request.matchdict['locale']
     elif request.session.has_key('target_lang'):
         target_lang = request.session['target_lang']
     # Pull the first acceptable language