def user_has_language_set(request: HttpRequest) -> bool:
    """
    Determine whether the user has explicitely set a language earlier on.
    This is taken later on as an indication that we should not mess with the
    site's language settings, after all, the user's decision is what counts.
    """
    if (
        hasattr(request, "session")
        and request.session.get(LANGUAGE_SESSION_KEY) is not None
    ):
        return True
    if LANGUAGE_COOKIE_NAME in request.COOKIES:
        return True
    return False

    Determine whether the user has explicitely set a language earlier on.
    This is taken later on as an indication that we should not mess with the
    site's language settings, after all, the user's decision is what counts.
    
feincms/extensions/translations.py