XLIFF Import / Export
Using the XLIFF file format to import/export content
Within the Localize dashboard we provide you with an ability to import and export phrases and translations in various file formats.
You can also import/export Glossary terms.
To see a general explanation of how importing and exporting works in Localize, click here.
UTF-8 File Format
Be sure that you are using the UTF-8 file format when working with the external files you are creating for importing purposes.
Importing Phrases or Glossary Terms
Before importing, make sure your file adheres to the file requirements below.
Navigate to the File Import / Export: Import tab in your dashboard.
- Drag-and-drop a file to import into the box, or select a file to import.
- Select XLIFF under File Format.
- Select the language you are importing.
- Specify the import type: Phrases or Glossary terms
- Click the Submit button.
- Wait for the file to be uploaded.
- Success! View the file details to see how many phrases were created, updated, etc.
Exporting Phrases or Glossary Terms
Navigate to the File Import / Export: Export tab in your dashboard.
- Select XLIFF under File Format.
- Select a filter which will determine which phrases get exported:
a. Published translations
b. Machine translations
c. Human translations
d. No translations
e. Needs human translations - Select the language you are exporting.
- Specify the export type: Phrases or Glossary terms
- Click the Export button.
- Wait for your download to complete, then close the popup dialog.
Exporting Selected Phrases
Alternatively, you can filter exactly which phrases that you want to export on the Phrases page. Find out how...
File Requirements
XLIFF is a format that's used to exchange data between participants in a translation project. This special format enables translators to concentrate on the text to be translated, without worrying about text layout.
Use the following sample for guidance when creating your XLIFF file for importing into Localize.
The following data is required:
<?xml version = "1.0" encoding="UTF-8"?>
element: standard XML v 1.0 element, specifying the encoding<xliff version="1.2">
element: parent element of all other elements that follow<file>
element: Currently, Localize only supports 1 elementoriginal
attribute: ???source-language
attribute: the source language codetarget-language
attribute: the target language code
<trans-unit>
: For each phrase:<source>
element: this is the source language phrasexml:lang
attribute: the value is the source language code
The following data is optional for each phrase (trans-unit):
id
- an attribute of thetrans-unit
element - this internal ID will be seen in any files exported from Localize<note>
element - a string which provides context for your translatorsxml:lang
attribute: the value is the source language code
<labels>
element: A comma-separated of strings which are labels to apply to the phrase- Note that any pre-existing labels on the phrase will be replaced by the ones in the import file.
- Any labels added to the phrase in the file being imported will be added to the Localize dashboard.
<target>
element- If present, this is the translation of the source text
- The target language code must be specified in the
xml:lang
attribute
<?xml version = "1.0" encoding="UTF-8"?>
<xliff version="1.2">
<file original="main" source-language="en" target-language="es">
<head></head>
<body>
<trans-unit id="5e3325d441c51b0f14d4bcbb">
<note xml:lang="en">this is some context</note>
<source xml:lang="en">Here’s another new sentence.</source>
</trans-unit>
<trans-unit id="5e05ff60b5f2a4f81803b695">
<note xml:lang="en">Translator: import</note>
<source xml:lang="en">We can’t possibly run irrigation to this tree, so it will have to survive on its own.</source>
<target xml:lang="es">No es posible que podamos regar este árbol, por lo que tendrá que sobrevivir por sí solo.</target>
</trans-unit>
<trans-unit id="5d3f4a7b85fe7e1d173f1d6f">
<labels xml:lang="en">lzm-meta-og:title, lz-page-title</labels>
<source xml:lang="en">What we do | Localize — LZ Product Demo</source>
<target xml:lang="es">Lo que hacemos | Localize - LZ Product Demo</target>
</trans-unit>
</body>
</file>
</xliff>
Troubleshooting
If your import fails you can view the error here under Import History.
Updated over 3 years ago