Supported File Types (Strings)

.XLIFF - XML Localization Interchange File Format V2 (Strings)

Content is machine translated from English by Phrase Language AI.

File Extensions

.xlf, .xliff

API Extension

xliff_2

Import

Yes

Export

Yes

Plural forms support

Yes

Plural forms support

No

Format options

ignore_source_translations, ignore_target_translations, override_file_language, enclose_in_cdata, include_translation_state

XLIFF 2.0 is an update on the more commonly used XLIFF 1.2.

It is an XML-based variation that uses tags such as <source>, <target> to store original and translated texts for a given source file. In addition, it extracts non-translatable data including variables, codes, and comments and saves them in customized elements.  

Compared with XLIFF 1.2, XLIFF 2.0 has the advantage of simplicity coming from a better organized DOM structure and the application of modularity.  

XLIFF 2.0 has a different DOM structure than XLIFF 1.2. The two formats are usually incompatible.

Format Options

Identifier

ignore_source_translations

Type

boolean

Upload

Yes

Download

No

Default

false

Description

Ignores the source translations in the file during the upload (to avoid accidental source language updates)

Identifier

ignore_target_translations

Type

boolean

Upload

Yes

Download

No

Default

false

Description

Ignores the target translations in the file during the upload (to avoid accidental target language updates)

Identifier

override_file_language

Type

boolean

Upload

Yes

Download

No

Default

false

Description

This file format typically contains language information in the file itself. Use this option to override the language with one you specify.

Identifier

enclose_in_cdata

Type

boolean

Upload

No

Download

Yes

Default

false

Description

Encloses translations containing html tags in CDATA. If disabled, unsupported HTML entities are replaced with their decoded values. For example:

  • &pound; is replaced with £.

  • &trade; is replaced with .

Code Sample

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="2.0" xmlns="urn:oasis:names:tc:xliff:document:2.0" srcLang="en" trgLang="de">
  <file original="ng.template" id="ngi18n">
    <unit id="key_name">
      <notes>
        <note category="meaning">header</note>
        <note category="location">app/app.component.ts:2</note>
      </notes>
      <segment>
        <source>Hello</source>
        <target>Hallo</target>
      </segment>
    </unit>
  </file>
</xliff>

Plural forms

Pluralized keys will be exported using the following syntax:

<unit id="plural_key">
  <segment>
    <source>{"one":"a plural","other":"some plurals"}</source>
    <target>{"one":"ein Plural","other":"einige Plurale"}</target>
  </segment>
</unit>
Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.