#NEWLINE# def _validate_msg_languages( self , cleaned_data ) : #NEWLINE# #INDENT# msgs = cleaned_data . get ( 'messages' ) . all ( ) #NEWLINE# lang = msgs [ 0 ] . language #NEWLINE# for message in msgs : #NEWLINE# #INDENT# if ( message . language != lang ) : #NEWLINE# #INDENT# msg = 'All the messages have to be in the same language.' #NEWLINE# raise forms . ValidationError ( _ ( msg ) )