XLIFF 1.2
XLIFF 1.2 is a widely used XML-based format for the exchange of localisation data. It is the predecessor of XLIFF 2.0.
It is used for Angular, iOS, Symfony and many other platforms.
If you use Angular, please check out our dedicated Angular documentation.
Features
- Any nesting of groups
- Each
trans-unit
is treated separately (independent of group) - Description/meaning are used as context when provided
in
<note from="description">
/<note from="meaning">
Usage
curl https://api.doloc.io -H "Authorization: Bearer $API_TOKEN" --data-binary "@input.xlf" -o output.xlf
Example
For a detailed example of XLIFF 1.2 localization with doloc, including step-by-step instructions on using the API for translation, check out our XLIFF 1.2 Example Translated with doloc.
Options
Options are passed as query parameters in the URL.
The options untranslated
and context
can use any DNF combination of the described values.
I.e. a comma separated list of values for an OR combination and an underscore separated list of
values for an AND
combination.
For details check the options documentation.
name | values | default | description |
---|---|---|---|
untranslated |
combination of XLIFF 1.2 states, no-state , target-equals-source , empty-target |
new,needs-translation,needs-l10n,needs-adaption,no-state_target-equals-source,no-state_empty-target |
Translate all units that match this configuration. |
context |
combination of XLIFF 1.2 states, no-state , target-not-equals-source , non-empty-target |
final,translated,signed-off,no-state_target-not-equals-source |
Use all units that match this configuration as translation context (glossary). |
newState |
any XLIFF 1.2 state or unchanged |
translated |
State of the (newly) translated units. unchanged : keep existing state. |
Limitations
- Single
<file>
per XLIFF file