AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    InstallationUsing the Xperience interfaceDeveloping websitesConfiguring XperienceManaging usersSecuring websitesDeploying websitesManaging website contentMultilingual websitesMacro expressionsExternal utilitiesIntegrating 3rd party systemsCustom developmentE-commerce featuresOn-line marketing featuresRelease notes - Xperience 13Xperience terminology glossary
  • Tutorial
    Using the Xperience interfaceDeveloper tutorialBusiness tutorialResource hub for marketers
  • API Examples
    ConfigurationContent managementDevelopmentE-commerceOn-line marketingSocial media
  1. Home
  2. Multilingual websites
  3. Developing custom translation services
  4. Customizing XLIFF export for translations

Customizing XLIFF export for translations


Was this page helpful?

Send us feedback Go back to top
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)

By default, the XLIFF files exported by translation services use CDATA⁠ (opens in a new tab) notation. You disable CDATA in exported XLIFF files by adding the CMSTranslationServicesUseCDATAForTransUnit key into your web.config file.

Example of an XLIFF file with CDATA notation

HTML
<xliff version="1.2">
  <file original="cms.document;25" source-language="en-US" target-language="fr-FR" datatype="htmlbody">
    <body>
    ...

      <trans-unit id="newstitle">
        <source><![CDATA[Apple iPad Mini In Stock]]></source>
      </trans-unit>
      <trans-unit id="newssummary">
        <source><![CDATA[Today, we have good news for all fans of the awesome Apple iPad. We are glad to announce that its new version, Apple iPad Mini, is available in our web shop. Furthermore, we keep our reasonable pricing policy, providing the lowest price currently available on the Web.]]></source>
      </trans-unit>

    ...
    </body>
  </file>
</xliff>

The CDATA section permits the special characters such as '&', '<*', '*>', etc. to be included in the text without being escaped. If you disable CDATA via the CMSTranslationServicesUseCDATAForTransUnit web.configkey, special characters in the exported XLIFF files will automatically be escaped.

For example: <p> Text to be translated </p> becomes &lt;p&gt; Text to be translated &lt;/p&gt;

For more information, see the XLIFF documentation⁠ (opens in a new tab).⁠ (opens in a new tab)

Disabling CDATA in exported XLIFF files

  1. Edit your Xperience administration project's web.config file.

  2. Add the CMSTranslationServicesUseCDATAForTransUnit key into the <appSettings> section of the file.

    HTML
    <appSettings>
      ...
    
      <add key="CMSTranslationServicesUseCDATAForTransUnit" value="false" />
    
      ...
    </appSettings>
  3. Save the web.config file.

Now, whenever you submit a document for translation, the system exports it without the CDATA notation.

Example of an XLIFF file without CDATA notation

XML
<xliff version="1.2">
  <file original="cms.document;25" source-language="en-US" target-language="fr-FR" datatype="htmlbody">
    <body>
    ...

      <trans-unit id="newstitle">
        <source>Apple iPad Mini In Stock</source>
      </trans-unit>
      <trans-unit id="newssummary">
        <source>Today, we have good news for all fans of the awesome Apple iPad. We are glad to announce that its new version, Apple iPad Mini, is available in our web shop. Furthermore, we keep our reasonable pricing policy, providing the lowest price currently available on the Web.</source>
      </trans-unit>

    ...
    </body>
  </file>
</xliff>

On this page

  • Example of an XLIFF file with CDATA notation
  • Disabling CDATA in exported XLIFF files
  • Example of an XLIFF file without CDATA notation