I'm looking for a working solution, to use line-breaks (<br />
) in symfony's XLIFF i18n files.
Unfortunately, the default tag <x id='1' ctype='lb'/>
seems to get stripped by Twig and/or symfony's XLIFF implementation. The XLIFF format is the recommended format for symfony2, so I'm wondering that there is no single line about line-breaks in symfony's cookbooks ?
<!-- messages.fr.xliff -->
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>Je suis Joe Schmoe</source>
<target>I am<x id="1" ctype="lb"/>Joe Schmoe</target>
</trans-unit>
</body>
</file>
</xliff>
Generic placeholder <x/>
(deprecated)
<x/>
The
<x/>
element is used to replace any code of the original document. The required id attribute is used to reference the replaced code in the skeleton file. The optionalctype
attribute allows you to specify what kind of attribute the placeholder represents;
Source: XLIFF 1.2 specification
Line 1<x id='1' ctype='lb'/>line 2
Edit 2:
The <x/>
element is deprecated - you can find this information in the documentation now.
`, I guess the xliff format is not that good implemented in Symfony (only the basic functions) – Wouter J Jan 29 '14 at 17:55