def user_has_language_set(request):
 if (hasattr(request, u'session') and (request.session.get(LANGUAGE_SESSION_KEY) is not None)):
  return True
 if (LANGUAGE_COOKIE_NAME in request.COOKIES):
  return True
 return False

def user_has_language_set ( request ) : if ( hasattr ( request , u'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 .