Fix forcing language to french in http-negociation mode
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 21 Feb 2017 17:17:41 +0100
changeset 123 feb0194f5851
parent 120 d70eed2a940e
child 124 2e9a0ec6df06
Fix forcing language to french in http-negociation mode The previous monkeypatch wasn't working since set_user_language() was dropped in cubicweb 3.24
site_cubicweb.py
--- a/site_cubicweb.py	Tue Feb 21 17:46:12 2017 +0100
+++ b/site_cubicweb.py	Tue Feb 21 17:17:41 2017 +0100
@@ -20,5 +20,5 @@
 
 
 @monkeypatch(request._CubicWebRequestBase)
-def set_user_language(self, user):
-    self.set_language('fr')
+def negotiated_language(self):
+    return 'fr'