XLIFF
The standard XML package used to send source strings and context to translation tools, then bring completed translations back.
What it is
XLIFF is an OASIS XML format for moving localizable content between an app, a TMS, and a translation vendor without making every tool understand the app's native files. It carries source and target segments plus IDs, language tags, notes, workflow state, and inline codes that stand in for formatting or placeholders. Files commonly use .xlf or .xliff.
Reach for it at a tool boundary: export JSON, Android XML, Apple strings, or a CMS document as XLIFF, let the vendor work in that neutral package, then import the translated targets back into the original format. Xcode does exactly this: Product, then Export Localizations, hands you an .xcloc bundle with XLIFF inside, and Import Localizations reads it back. Stable unit IDs are what let the return trip find the right application string.
Gotcha: XLIFF 1.2 and 2.x are different schemas, not interchangeable labels on the same XML. Agree on the version before export. Never parse it with regular expressions, discard unknown metadata, or let translators edit protected inline codes, because a file that looks translated can still fail to round-trip into the product.
Ask AI for it
Implement XLIFF 2.1 export and import for this message catalog. Generate valid XML in the urn:oasis:names:tc:xliff:document:2.0 namespace, put each translation key in a stable unit ID, carry source and target locale tags, notes, state, and protected inline placeholders, and parse it with a namespace-aware XML parser rather than regular expressions. On import, reject duplicate or unknown IDs, missing targets, and altered placeholder sets. Add a round-trip test proving an export and import changes only target text and preserves every key and placeholder.