The main question is: How should I build the structure of the XLIFF to be usable?
What I have:
A Symfony (3.4)
project where I want to export the translatable content as XLIFF
. I don't mean bundle translations, but dynamic content from the database.
I have written a bundle so far that uses the MessageCatalogue
to collect the content and the XliffFileDumper
to write the XLIFF
file.
This gives me a flat XLIFF with the content to be translated. I guess this is not very usable.
Example: Pages have content. At the moment I just collect all content in a flat XLIFF
. Giving this file to a translator, he/she wouldn't know which content belongs to which page. This is bad, right?
The MessageCatalogue => XliffFileDumper
method I use at the moment seems a bit limited in this way. I can add metadata (notes), but I can't use groups for example. It seems also not to be possible to add more than one segment to a unit.
What I can set is a "domain" which results in <file id="content.fr">
tag (domain=content)
for example.
I would be great to build a useful XLIFF
this way, but tell me if I can't. Than I need to write a customized XLIFF
dumper.
Ideas: I could use one domain per page, which results in many files? Good practice? I could add information about the parent page in the metadata / notes. Could a translator even make use of it?
What would be the best practice for file structure?
If anybody knows a symfony
bundle that is helpful, please tell me.