The XLIFF interchange file format in SharePoint

Get information about the SharePoint implementation of the XLIFF interchange file format, including schema reference information and an XML example.

The XLIFF interchange file format implementation in SharePoint

SharePoint provides XML Localization Interchange File Format (XLIFF) application support for the Variations feature and the Translation Services feature. SharePoint Server uses XLIFF to transport information about a file and its contents from SharePoint Server to a human translator in a format that the translator can easily understand.

SharePoint adheres to the XLIFF 1.2 representation guide for HTML published by OASIS when SharePoint Server HTML pages are extracted to XLIFF format. To eliminate the mix of translatable elements and code elements that would appear in XLIFF packages if unmodified SharePoint Server CDATA content were to be transported, SharePoint is delivered with the ability to produce fully XLIFF-compliant XLIFF documents that are also well-integrated with SharePoint. When exporting XML files in XLIFF format from sharepointservernv, the data that the human translator receives is clean and ready to translate.

This article documents specific SharePoint Server implementations of XLIFF elements and attributes that are defined more generally in version 1.2 of the XLIFF open standard document published by OASIS. For more information about specific XLIFF elements and attributes, see the XLIFF 1.2 Specification.

Table 1. Notable XLIFF elements and attributes in SharePoint

Element Attributes Notes
Declares the XML version and encoding.
Contains the version attribute and the schema validation mechanism.
Corresponds to the original source file, which in is one page GUID from the Variations feature that includes the source and target languages ( source-language and target-language) that are used by both machine-translation tools and human-translation tools.
The original attribute contains a GUID that is used to identify the original source content. This value should remain static to help ensure a successful import.
The datatype attribute is also stored in the File element in HTML format for all SharePoint pages.
The tool-id attribute is the GUID that identifies the tool that generated the XLIFF file.
Identifies the tool that generated the XLIFF file.
Contains information that may be useful to the localizer, developer, or others who process the XLIFF file.
note element values are generated by . note attributes contain GUIDs that identify location and types of content to provide context.
The id attribute contains a GUID that identifies the location of the import.
The datatype attribute defines the type of data contained in the trans-unit element. For a list of available datatype attribute values, see the XLIFF open standard document.
HTML content often contains markup that has to be preserved. For this reason, SharePoint wraps markup in HTML content with tags that are defined in the XLIFF 1.2 representation guide for HTML.
ph (optional)
bpt (optional)
ept (optional)
sub (optional)
HTML content often contains markup that has to be preserved. For this reason, SharePoint wraps markup in HTML content with tags that are defined in the XLIFF 1.2 representation guide for HTML.
Files stored in SharePoint can be sent for localization via XLIFF through the bin-unit elements. The file can be extracted back into its original file format by using the SharePoint: Extract and insert bin-unit elements in XLIFF files code sample.

Example: XLIFF markup from SharePoint

The following example of an XML document in XLIFF interchange file format demonstrates how SharePoint implements some of the elements and attributes defined in the standard.

<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
  <file original="ce2b8e40-b802-4196-b6cb-93e63eb4bb42" source-language="en-US" target-language="fr-CA" datatype="html">
      <trans-unit id="fa564e0f-0c70-4ab9-b863-0177e6ddd247" datatype="plaintext">
        <source>Type or edit text in a different language</source>
      <trans-unit id="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" datatype="html">
          <bpt id="1">&amp;lt;strong&amp;gt;</bpt>When you want to type documents in different languages, you can change your keyboard layout language--the language-specific characters typed when keyboard keys are pressed--so that you can type the special characters for each language. 
  <ept id="1">&amp;lt;/strong&amp;gt;</ept>
        <note>fieldTitle=Page Content</note>

Additional resources