def write_translations(self, catalogue, format, options={}):
if format not in self.dumpers:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'.format(format))<EOL><DEDENT>dumper = self.dumpers[format]<EOL>if "<STR_LIT:path>" in options and not os.path.isdir(options['<STR_LIT:path>']):<EOL><INDENT>os.mkdir(options['<STR_LIT:path>'])<EOL><DEDENT>dumper.dump(catalogue, options)<EOL>
Writes translation from the catalogue according to the selected format.

@type catalogue: MessageCatalogue
@param catalogue: The message catalogue to dump

@type format: string
@param format: The format to use to dump the messages

@type options: array
@param options: Options that are passed to the dumper

@raises: ValueError