Expand my Community achievements bar.

The first preview of our new Community upgrade is live - check it out now.

Export XLIFF or XML from translation projects in Adobe Experience Manager

Avatar

Level 1

We are trying to work on translation project for content in Adobe Experience Manager. Able to create a translation project from Sites but when I go to the translation job within the translation project unable to export the contents of the project in an XLIFF or XML. Can someone help with step by step instructions to be able to do that. Also help understand if there is any setting or configuration that needs to be enabled to perform the export of XLIFF or XML. Also is there an API to do this programmatically at scale or not.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Level 5

Hi @hardik_eclerx ,

This is a common point of confusion in AEM. Exporting XLIFF/XML is not automatic just by creating a translation project from Sites. A few conditions must be met.

Where the Export option actually appears : The Export option is available only on the Translation Job tile, not inside the job details view.

Steps:

  1. Go to Projects --> open your Translation Project
  2. Locate the Translation Job tile
  3. Click the three-dot on the job tile
  4. You should see Export --> Download Exported File

Translation Integration Framework must be in use : In case you don't see the export button itself, reason could be because of XLIFF/XML export works only when the job is created using AEM’s Translation Integration Framework (TIF).

Please check:

  • Your site is associated with a Translation Cloud Configuration under /conf
  • The translation project was created using that configuration

OSGi setting that controls XML vs XLIFF export : AEM has an OSGi configuration that explicitly controls the export format.

  • Go to OSGI config console and search for "com.adobe.cq.wcm.translation.impl.TranslationPlatformConfigurationImpl"
  • Property name is "export.format".

Programmatic export (API question) : There is no official REST API exposed by Adobe specifically for “Export Translation Job as XLIFF”.

However, at scale, we have two supported approaches:

Option 1: Server-side (OSGi) using Translation APIs

  • Use Granite Translation APIs
  • Convert translation-object XML <--> XLIFF using "com.adobe.granite.translation.api.xliff.TranslationXLIFFService"

Option 2: Connector-based workflow (preferred at scale) If you’re integrating with a TMS, Let AEM generate and send XLIFF via the Translation Connector. UI-based export is mainly intended for manual or ad-hoc workflows.

 

 

 

Avatar

Level 1

Thanks for the reply, I am now able to see the import/export option in the dropdown on translation job. Does one need to keep the zip file format the same while importing back the content? I tried importing the translated files but don't see the content reflect the changes even after a successful import completion. Does one need to keep the content file names the same while importing back? How does one track the changes that are translated whether they are applied in the selected sites or not?

Avatar

Level 5

Yes, the import format must remain exactly the same. The files should be packaged in a ZIP archive using the same file names and structure as the exported package. In essence, the ZIP should contain the exact exported package, with only the content translated and no changes to naming or hierarchy.

Avatar

Level 1

I have tried importing the package as a zip file with translated content but unable to review if the translated content reflects on the page. Can you please guide on how can one preview the translated content once imported. Also does one need to complete the translation job for the changes to reflect. Please help with a step by step guide if feasible to review translated content post import

Avatar

Level 5

Hi @hardik_eclerx , Can you share what is the status of job/translation obejcts in the job tile once you import the zip ?

Avatar

Level 4

Hi @hardik_eclerx 

Step-by-Step Instructions for XLIFF/XML Export

1. Verify Translation Project Setup

First, ensure your translation project is properly configured:

  1. Navigate to Sites  Projects → Your Translation Project

  2. Open the translation project and verify the translation job exists

  3. Check that the translation job status shows content is ready for export

2. Required OSGi Configurations

You need to add translation-specific OSGi configurations to your project. Create these configuration files:

Translation Integration Framework Configuration:

// ui.config/src/main/content/jcr_root/apps/wknd/osgiconfig/config.author/com.adobe.granite.translation.core.impl.TranslationManagerImpl.cfg.json
{
  "defaultConnectorName": "microsoft",
  "defaultCategory": "/libs/settings/translation/supportedLanguages",
  "useCredentialsFromCloudConfig": true
}

Translation Cloud Service Configuration:

// ui.config/src/main/content/jcr_root/apps/wknd/osgiconfig/config.author/com.adobe.granite.translation.connector.msft.core.impl.MicrosoftTranslationServiceImpl.cfg.json
{
  "previewEnabled": true,
  "attributionEnabled": false,
  "subscriptionKey": "<your-translation-service-key>",
  "subscriptionRegion": "global"
}

3. Enable Translation Export Servlet

Add this OSGi configuration to enable XLIFF export:

// ui.config/src/main/content/jcr_root/apps/wknd/osgiconfig/config.author/com.day.cq.wcm.translation.impl.TranslationPlatformConfigurationImpl.cfg.json
{
  "exportFormat": "xliff_1_2",
  "importFormat": "xliff_1_2",
  "attributeMap": [
    "jcr:title=title",
    "jcr:description=description",
    "text=text"
  ]
}

4. Manual Export Steps

Once configurations are in place:

  1. Access Translation Job:

    • Go to Projects → Your Translation Project

    • Click on the translation job tile

  2. Export XLIFF:

    • In the translation job, look for Export or Download button

    • Select XLIFF format

    • Click Export to download the file

  3. Alternative Method via Touch UI:

    • Navigate to 

      /libs/cq/translation/gui/content/translationjob.html

       

    • Select your translation job

    • Use the Actions menu → Export

5. Troubleshooting Common Issues

If export button is missing:

  • Verify translation job status is "Ready for Review" or "Approved"

  • Check user permissions (need 

    translation-users
     group membership)

     

  • Ensure translation connector is properly configured

If export fails:

  • Check error logs: 

    /system/console/slinglog

     

  • Verify OSGi bundle status: 

    /system/console/bundles

     

  • Look for translation-related bundles

6. Programmatic API Approach

For scale operations, use these APIs:

Translation Job Export API:

// Java API example
@Reference
private TranslationJobManager translationJobManager;

@Reference
private TranslationService translationService;

public void exportTranslationJob(String projectPath, String jobId) {
    try {
        TranslationJob job = translationJobManager.getTranslationJob(jobId);
        InputStream xliffStream = translationService.exportXLIFF(job);
        // Process the XLIFF stream
    } catch (TranslationException e) {
        log.error("Export failed", e);
    }
}
 

REST API Endpoints:

# Get translation job details
GET /api/projects/{projectId}/translationjobs/{jobId}

# Export XLIFF
POST /api/projects/{projectId}/translationjobs/{jobId}/export
Content-Type: application/json
{
  "format": "xliff_1_2"
}

# Bulk export via servlet
GET /bin/wcm/translation/export?jobId={jobId}&format=xliff

cURL Example:

curl -u admin:admin \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"format":"xliff_1_2"}' \
  "http://localhost:4502/api/projects/{projectId}/translationjobs/{jobId}/export"

7. Required Permissions

Ensure users have these permissions:

  •  

    translation-users
     group membership

     

  • Read access to 

    /content
     and 
    /conf

     

  • Write access to 

    /var/translation

     

8. Workflow Configuration

Add translation workflow configuration:

<!-- ui.content/src/main/content/jcr_root/conf/wknd/settings/workflow/models/translation/.content.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="nt:unstructured"
    exportEnabled="{Boolean}true"
    xliffVersion="1.2"/>

The key issues are usually missing OSGi configurations and proper translation connector setup. Once you add the required configurations and redeploy your project, the export functionality should work properly.

For large-scale operations, I recommend using the REST APIs with proper authentication and error handling to automate the export process across multiple translation projects.