def METHOD_NAME(self, request):
    supported = (
        request.event.locales
        if (hasattr(request, "event") and request.event)
        else list(settings.LANGUAGES_INFORMATION)
    )
    language = (
        self._language_from_request(request, supported)
        or self._language_from_user(request, supported)
        or self._language_from_browser(request, supported)
    )
    if hasattr(request, "event") and request.event:
        language = language or request.event.locale
    translation.activate(language)
    request.LANGUAGE_CODE = translation.get_language()
    with suppress(zoneinfo.ZoneInfoNotFoundError):
        if hasattr(request, "event") and request.event:
            tzname = request.event.timezone
        elif request.user.is_authenticated:
            tzname = request.user.timezone
        else:
            tzname = settings.TIME_ZONE
        timezone.activate(zoneinfo.ZoneInfo(tzname))
        request.timezone = tzname