def METHOD_NAME(self, request, **kwargs):  # lint-amnesty, pylint: disable=unused-argument
    """
    Accept requests to update the preview language.
    """
    if not self._user_can_preview_languages(request.user):
        raise Http404
    action = request.POST.get('action', None)
    if action == 'set_preview_language':
        self._set_preview_language(request)
    elif action == 'reset_preview_language':
        self._clear_preview_language(request)
    return redirect(request.path)