dbapi.py
changeset 8274 aedb32d324ab
parent 8268 c9babe49c1c1
child 8322 cb838b126b07
--- a/dbapi.py	Mon Feb 27 11:53:24 2012 +0100
+++ b/dbapi.py	Mon Feb 27 11:54:14 2012 +0100
@@ -280,13 +280,17 @@
 
     def __init__(self, vreg, session=None):
         super(DBAPIRequest, self).__init__(vreg)
+        #: 'language' => translation_function() mapping
+        self.translation = {}
         try:
             # no vreg or config which doesn't handle translations
             self.translations = vreg.config.translations
         except AttributeError:
-            self.translations = {}
+            pass
+        #: Request language identifier eg: 'en'
+        self.lang = None
         self.set_default_language(vreg)
-        # cache entities built during the request
+        #: cache entities built during the request
         self._eid_cache = {}
         if session is not None:
             self.set_session(session)