Search code examples
emailxliff

How to annotate that a trans-unit contains e-mail text?


If a trans-unit contains text that will go into an e-mail, the line endings need to be CRLF (\r\n). This has to be taken care of when importing/exporting XLIFF files from and to a database. Is there a suitable attribute to set on such a trans-unit? What about extype?

XLIFF specification: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#trans-unit


Solution

  • XLIFF follows XML whitespace rules, which means that you'll need to make sure to set xml:space="preserve" -- otherwise, the line breaks will be normalized away. If you need to store anything beyond that, extype might be a possible place, although I don't think that attribute is consistently supported in tools.