'The locale for the current session.
Determined by either `get_user_locale`, which you can override to
set the locale based on, e.g., a user preference stored in a
database, or `get_browser_locale`, which uses the ``Accept-Language``
header.
.. versionchanged: 4.1
Added a property setter.'

@property
def locale(self):

    if (not hasattr(self, '_locale')):
        self._locale = self.get_user_locale()
        if (not self._locale):
            self._locale = self.get_browser_locale()
            assert self._locale
    return self._locale
