CSV to XLIFF
The return trip: give it the original XLIFF file and the CSV the translator filled in, and it writes each translation into the right <target> — matched by id, with the inline tags rebuilt from the source — and leaves every other byte of structure alone, so the file goes straight back into the system that exported it.
CSV to XLIFF
The CSV needs an id column and a target column (a translation column is accepted too); state, segment and file are used when present. Any other columns — source, notes, a reviewer's comments — are ignored, and so is their order.
How to use it
- Paste or drop the original XLIFF on the left — the same file the CSV was made from with XLIFF to CSV.
- Paste or drop the translated CSV on the right.
- Read the status line and the list under the panes: how many targets were updated, added or left alone, and any row that could not be merged.
- Download the merged file and import it back into your CMS, app or CAT tool.
What the merge changes — and what it does not
- Only targets whose text changed. A row whose target is identical to what the file already has is not touched, nor is any segment that has no row in the CSV. Run an unedited CSV through and you get the same document back — the same elements, attributes, text and comments. Only serialisation details no XML parser distinguishes can differ, such as the order the browser writes attributes in.
- A missing
<target>is created in the place the format puts it: after<source>(and after<seg-source>, if a 1.2 unit has one), indented like its neighbours. - Inline codes are rebuilt from the source. A placeholder
<1>…</1>becomes a copy of the source's first code with every attribute it had;<2/>becomes a copy of the second, content included. If a translation drops a code the source has, the row is still merged and the list says which code went missing — XLIFF 2.0 requires that codes which may not be removed survive translation. - State. A value in the
statecolumn is written if it is a valid state for the file's version; otherwise a changed target is set totranslated(untick the box to leave states alone). In XLIFF 2.0 the segment'ssubStateis removed at the same time, because the specification requires anything that updatesstateto update or deletesubState. - Target language. XLIFF 2.0 requires
trgLangon the root once there are targets; if the file has none, the value in the box is added. In 1.2 it fillstarget-languageon each<file>that lacks one. Existing values are never overwritten. - Notes are not written back — the note column is there for the translator to read.
Rows that are rejected
A row is left out, and listed in red, when its placeholders do not add up — <3> where the source only has two codes, a pair closed in the wrong order, a standalone code written as a pair — or, in markup mode, when the cell is not well-formed XML. Ids that do not exist in the file are listed too. Everything else is still merged, so one bad cell does not cost the whole batch.
FAQ
What does "detect" do for inline codes?
It looks at the CSV: numbered tags such as <1/> mean placeholder mode, XLIFF element names such as <g id="1"> or escaped entities such as & mean markup mode. Pick the mode yourself if the sheet has no inline codes and no special characters at all — then the two are the same.
The same id appears in two files of my XLIFF.
Ids only have to be unique inside one <file>. XLIFF to CSV adds a file column whenever the document has more than one, and the merge uses it; a row without it that matches in several files is rejected rather than guessed.
Can I merge a CSV produced by another tool?
Yes, as long as the header row names an id column and a target (or translation) column and the ids are the XLIFF unit ids. Comma, semicolon and tab delimiters are detected.
Related tools
- XLIFF to CSV — make the CSV in the first place
- CSV to Android strings.xml — the same merge for an Android app
- XML Diff — compare the merged file with the original, change by change
- XML Validator — confirm the result is well-formed
Privacy
100% client-side. Both files are read and merged in your browser; nothing is uploaded. See the privacy policy.