def update_languages(self):
language_fields = record_get_field_instances(self.record, '<STR_LIT>')<EOL>language = "<STR_LIT>"<EOL>record_delete_fields(self.record, "<STR_LIT>")<EOL>for field in language_fields:<EOL><INDENT>subs = field_get_subfields(field)<EOL>if '<STR_LIT:a>' in subs:<EOL><INDENT>language = self.get_config_item(subs['<STR_LIT:a>'][<NUM_LIT:0>], "<STR_LIT>")<EOL>break<EOL><DEDENT><DEDENT>new_subs = [('<STR_LIT:a>', language)]<EOL>record_add_field(self.record, "<STR_LIT>", subfields=new_subs)<EOL>
041 Language.