Get user's locale

        :return: :class:`babel.core.Locale`

def locale(self) -> babel.core.Locale or None:
        """
        Get user's locale

        :return: :class:`babel.core.Locale`
        """
        if not self.language_code:
            return None
        if not hasattr(self, '_locale'):
            setattr(self, '_locale', babel.core.Locale.parse(self.language_code, sep='-'))
        return getattr(self, '_locale')