+
+class MultilangScopedSession(ScopedSession):
+ """Dispatches language selection to the attached Session."""
+
+ def __init__(self, *args, **kwargs):
+ super(MultilangScopedSession, self).__init__(*args, **kwargs)
+
+ @property
+ def default_language_id(self):
+ """Passes the new default language id through to the current session.
+ """
+ return self.registry().default_language_id
+
+ @default_language_id.setter
+ def default_language_id(self, new):
+ self.registry().default_language_id = new