Login Account

XLIFF 1.2

XLIFF 1.2 is a widely used XML-based format for the exchange of localization 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.

namevaluesdefaultdescription
untranslatedcombination of XLIFF 1.2 states, no-state, target-equals-source, empty-targetnew,needs-translation,needs-l10n,needs-adaptation,no-state_target-equals-source,no-state_empty-targetTranslate all units that match this configuration.
contextcombination of XLIFF 1.2 states, no-state, target-not-equals-source, non-empty-targetfinal,translated,signed-off,no-state_target-not-equals-sourceUse all units that match this configuration as translation context (glossary).
newStateany XLIFF 1.2 state or unchangedtranslatedState of the (newly) translated units. unchanged: keep existing state.
newStateQualifierany XLIFF 1.2 state-qualifier, x- prefixed user-defined value, or unchangedunchangedSet/update attribute state-qualifier of element target for (newly) translated units. unchanged: keep existing attribute.

Limitations

  • Single <file> per XLIFF file