def set_language_data_from_request(request):
 if ('default_language' not in request.session):
  request.session['default_language'] = select_best_available_language((getattr(request.session.get('facility_user'), 'default_language', None) or get_default_language()))
 cur_lang = (request.GET.get('lang') or request.session.get('default_language'))
 set_request_language(request, lang_code=cur_lang)

def set_language_data_from_request ( request ) : if ( 'default_language' not in request . session ) : request . session [ 'default_language' ] = select_best_available_language ( ( getattr ( request . session . get ( 'facility_user' ) , 'default_language' , None ) or get_default_language ( ) ) ) cur_lang = ( request . GET . get ( 'lang' ) or request . session . get ( 'default_language' ) ) set_request_language ( request , lang_code = cur_lang )
process requests to set language .