--- date: 2020-11-09 id: 36596d9f-7a8e-4018-a28c-e6ed2f727c47 title: XLIFF 2.0 --- # Introduction From [Symfony 4.0](20201109140137-symfony_4_0) XLIFF support has been added. # Syntax ``` xml new true user login original-content translated-content ``` ``` php $catalogue = new MessageCatalogue('en_US'); $catalogue->add([ 'original-content' => 'translated-content', ]); $catalogue->setMetadata('original-content', ['notes' => [ ['category' => 'state', 'content' => 'new'], ['category' => 'approved', 'content' => 'true'], ['category' => 'section', 'content' => 'user login', 'priority' => '1'], ]]); $dumper = new XliffFileDumper(); $dumper->formatCatalogue($catalogue, 'messages', [ 'default_locale' => 'fr_FR', 'xliff_version' => '2.0' ]); ```