When the WordPress administrator enables the Translation Management module, translators and translation services will be able to receive translation jobs as XLIFF files, translate them offline and upload their work back to WordPress.

Translators and translation services can receive XLIFF files in two different ways: by email or by manual download.

Receiving XLIFF Files via Email

When a translation job is sent to a local translator, the translator will be notified by email. Each notification email will include a ZIP file. This ZIP contains the XLIFF files of the documents that were assigned to the translator for translation.

Site administrators can adjust notification options on the Translation Notification tab located at WPML-> Settings open.

If the original documents are published, the notification email will also include links to them. Translators are encouraged to review them in order to learn more about the structure and context of the site they are translating.

Manually downloading the XLIFF Files

Translators can export the XLIFF file of a translation job from the WPML -> Translations page. They simply need to select the document and XLIFF version to export to and click the Apply button.

WPML export XLIFF file

XLIFF Options

Administrators can define a default XLIFF version for exporting files and the line break type to be used in trans-unit tag text.

The XLIFF options are located under the XLIFF file options section of the WPML ->Settings.

XLIFF file options
XLIFF file options

XLIFF format structure

WPML uses XLIFF files to send jobs to translators and translation services. They can use these files for offline translation and upload their work back to a WordPress site.

WPML allows controlling the XLIFF version and which elements to include in it. This ensures that the generated file is compliant with the XLIFF standard.

XLIFF Version

If you set the default version for XLIFF it will be sent along with the email notifications to translators. If needed, translators can change the XLIFF version from the WPML -> Translations page.

Selecting a default version only affects the XLIFF export process. This option has no impact when importing XLIFF files.

Differences between XLIFF versions are in the XLIFF tag attributes version and XML namespace. The content of body and trans-unit tag remains the same across versions from 1.0 to 1.2.

New lines character

Normally, in HTML, you insert <br /> tags to generate line breaks. In WordPress, new-lines generate line breaks too. Use this option to select if in trans-unit tags you would like to replace the new lines character with the tag:

<br class=”xliff-newline” />

Notes within XLIFF file

It is possible to add a note for a specific page before sending it for translation. This note is then available to the translator when they get a translation job.

Adding the note for a translator
Adding the note for a translator

This note will become a part of the XLIFF file sent to the translator. The note is placed within the phase-group section of the file. This section has three phase-name subsections:

  1. shortcodes – this subsection holds a list of all shortcodes that are being used in the site’s content.
  2. notes – this subsection contains a note for the translator.
  3. post_type – this subsection contains the post type of the page that is being translated.
Part of the XLIFF file with notes
Part of the XLIFF file with notes

Some notes to Translators working with XLIFF files

Unique WordPress Content Elements

Although XLIFF files are standard, they contain some elements that are unique to WordPress. Understanding these special features will allow you to create better translations.

Categories, tags and custom fields

WordPress content is often organized in categories. It may have tags and custom fields. These are extra data-fields added to the main content.

All these special fields will appear as individual XLIFF fields. They have names, but these names may not always be clear to you initially. When you see small fields below the main content, ask the site administrator what they mean. These fields will normally repeat for different jobs that you do on the same site.

Returning Completed Translations

When you’re done translating, login to WordPress and go to the WPML -> Translations page. At the bottom of that page you will find an option for XLIFF file upload.

Importing XLIFF files from the translation jobs page
Importing XLIFF files from the translation jobs page

You can upload individual XLIFF files or ZIP several files together and upload the ZIP.

When you upload your work, WordPress automatically notifies the site administrator.

You will be able to upload only translations that were assigned to you from that website. While you upload a file WPML checks the Job and Translator ID to ensure that you are uploading the right file.