#NEWLINE# def process_request( self , request ) : #NEWLINE# #INDENT# urlconf = getattr ( request , 'urlconf' , settings . ROOT_URLCONF ) #NEWLINE# ( i18n_patterns_used , prefixed_default_language ) = is_language_prefix_patterns_used ( urlconf ) #NEWLINE# language = translation . get_language_from_request ( request , check_path = i18n_patterns_used ) #NEWLINE# language_from_path = translation . get_language_from_path ( request . path_info ) #NEWLINE# if ( ( not language_from_path ) and i18n_patterns_used and ( not urlconf ) ) : #NEWLINE# #INDENT# language = settings . LANGUAGE_CODE #NEWLINE# #UNINDENT# translation . activate ( language ) #NEWLINE# request . LANGUAGE_CODE = translation . get_language ( )