class TranslationWriter implements TranslationWriterInterface

TranslationWriter writes translation messages.

Methods

addDumper(string $format, DumperInterface $dumper)

Adds a dumper to the writer.

disableBackup()

Disables dumper backup.

array
getFormats()

Obtains the list of supported formats.

write(MessageCatalogue $catalogue, string $format, array $options = [])

Writes translation from the catalogue according to the selected format.

writeTranslations(MessageCatalogue $catalogue, string $format, array $options = []) deprecated

Writes translation from the catalogue according to the selected format.

Details

at line 34
addDumper(string $format, DumperInterface $dumper)

Adds a dumper to the writer.

Parameters

string $format The format of the dumper
DumperInterface $dumper The dumper

at line 42
disableBackup()

Disables dumper backup.

at line 56
array getFormats()

Obtains the list of supported formats.

Return Value

array

at line 70
write(MessageCatalogue $catalogue, string $format, array $options = [])

Writes translation from the catalogue according to the selected format.

Parameters

MessageCatalogue $catalogue The message catalogue to write
string $format The format to use to dump the messages
array $options Options that are passed to the dumper

Exceptions

InvalidArgumentException

at line 98
writeTranslations(MessageCatalogue $catalogue, string $format, array $options = []) deprecated

deprecated since 3.4 will be removed in 4.0. Use write instead.

Writes translation from the catalogue according to the selected format.

Parameters

MessageCatalogue $catalogue The message catalogue to write
string $format The format to use to dump the messages
array $options Options that are passed to the dumper

Exceptions

InvalidArgumentException