The Smartling Adobe Experience Manager (AEM) Touch and Cloud Connectors enable you to seamlessly translate your AEM content. Translations are requested directly from within AEM, and the translated content is automatically returned to your environment. Visual Context can be integrated, providing translators and editors with a visual representation of the source content as they work. This helps ensure high-quality translations.
Both connectors support the translation of pages, Content Fragments, Experience Fragments, i18n dictionaries (such as those in Forms), metadata in DAM assets (images and documents), and tags via AEM Translation Projects.
How it works
The Smartling AEM Connector uses a custom workflow to prepare content for upload and initiate the AEM out-of-the-box (OOTB) translation workflow. The information below explains how the process works behind the scenes and describes the parameters used in the workflow. The connector uses three workflows for different content types:
-
Pages and Experience Fragments
/var/workflow/models/smartling/wcm-translate -
Content Fragments
/var/workflow/models/smartling/dam-translate -
Adaptive Forms
/var/workflow/models/smartling/form-translate
Parameters
Workflows support the following parameters:
Required parameters
| Parameter | Type | Description |
targetLocaleCodes |
String Array | Target AEM language codes (e.g., ["fr", "de_DE"]) |
loggedUser |
String | AEM user ID that will be added to Owners and Observers of a Translation Project |
projectUid |
String | Smartling project identifier where the content should be sent for translation |
sourcePathList |
String Array | List of paths to be sent for translation |
Optional parameters
| Parameter | Type | Default | Description |
jobUid |
String | - | Smartling job UID for reusing an existing Smartling job. A new job will be created if the parameter is not specified. |
jobName |
String | Auto-generated | Smartling job name. The workflow creates a Smartling job with this name. If both jobName and jobUid are omitted, the name is auto-generated. |
jobDueDate |
Date | - | Smartling job due date. Used only when creating a new job. |
authorizeJob |
Boolean | true |
Flag indicating whether the job should be auto-authorized. |
forceResubmission |
Boolean | true |
Flag that causes the workflow to touch the payload before requesting translation. |
pseudo |
Boolean | false |
Flag that causes the connector to use pseudo translation. |
configSourceLocaleCode |
String | - | AEM language code to be used for resolving Smartling multiconfig. |
customFields |
JSON | - | Smartling job custom field values. JSON value of a list of field value objects. Example:[{ "fieldUid"="<fieldUid_value>", "fieldName"="<fieldName_value>", "fieldValue"="<field_value>" }, ...]. |
localeWorkflows |
JSON | If this parameter is not specified, the language's default workflow will be used. |
Maps Smartling target languages to Smartling workflows that should be used for each language. String formatted as a JSON object value, example: [ |
Example snippet
Here is an example snippet demonstrating how a page is sent for translation.
Map<String, Object> metadata = new HashMap<>();
metadata.put("targetLocaleCodes", new String[] { "fr", "de_DE"});
metadata.put("authorizeJob", true);
metadata.put("forceResubmission", true);
String userId = request.getResourceResolver().getUserID();
metadata.put("loggedUser", userId);
metadata.put("isDeep", false);
metadata.put("projectUid", "proje6tu1d");
metadata.put("sourcePathList", new String[] { "/content/site/en/page", "/content/site/en/another-page" });
metadata.put("localeWorkflows", "[\n" +
" {\n" +
" \"targetLocale\": \"fr\",\n" +
" \"workflowUid\": \"42478ed22598\"\n" +
" },\n" +
" {\n" +
" \"targetLocale\": \"de\",\n" +
" \"workflowUid\": \"04ec4daa5daf\"\n" +
" }\n" +
"]");
WorkflowSession workflowSession = resourceResolver.adaptTo(WorkflowSession.class);
WorkflowData workflowData = workflowSession.newWorkflowData("JCR_PATH", "/content/site/en/page");
WorkflowModel model = workflowSession.getModel("/etc/workflow/models/smartling/wcm-translate/jcr:content/model");
workflowSession.startWorkflow(model, workflowData, metadata);To illustrate the infrastructure flow, the following is a sequence diagram for communication between Smartling and AEM when you request translation:
The following diagram illustrates how translations are delivered from Smartling to AEM, once translations are completed in Smartling.