Translating AEM Dictionaries

The other day, I was in a call where we spent quite some time thinking through how to manage translation of dictionaries in AEM 6.1 and integrate it with the larger translation integration. This has been elegantly solved in AEM 6.2. However, customers still need to jump hoops for older versions. Before I deep dive any further, we first need to understand – what are dictionaries in AEM and why would you want to translate them.

Dictionaries in AEM is a mechanism of externalizing strings used in code (user interface, components, dialogs etc.). It uses SLING Dictionaries as defined here: https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html. In case you have components that render strings on the final published page (example – “Add to Cart” etc), you would need to translate the dictionaries so that these strings that are added via code on the final published page get translated and then rendered in the right language.

In addition, SLING now supports two kinds of formats for dictionaries:

  • sling:messageEntry based and
  • JSON-file based

and so does AEM.

In order to translate the dictionary, one needs to translate the strings in the target language and add them back as a valid language ISO locale.

Starting AEM 6.2, translating dictionaries is supported out of the box. Translating dictionaries is nicely integrated with AEM Translation Projects. You can translate dictionary either from the Translator Page (http://<hostname>:<port-number>/libs/cq/i18n/translator.htmlor from Translation Projects themselves.

Translation Projects

Here are the steps to translate a dictionary using AEM Translation Projects:

  1. Create a Translation Projects from AEM Projects screen (http://<hostname>:<port-number>/projects.html/content/projects).
    1. Just chose to create a new Project and select “Translation Project” as the template
    2. Specify a name of the Translation Project, say “Blog”
    3. Click on “Advanced” section and set the Source Language and the target Language. Also specify the translation metadata. Let’s use Machine Translation and MS Translator (the one that ships with AEM).

Pic1             4.Choose to open the Project, on the confirmation dialog.

2. Now click on the three dots at the bottom side of the “Translation Job” card.

3. Click on Add and Select “Add Dictionary”

Pic2.png

4. This opens up a dialog for you to pick a source dictionary.

Pic3It scans all the dictionaries either stored in /libs or /apps. It supports both the dictionary formats as well.

5. Select your source dictionary and it will get added to the Translation Project. It will be treated as yet another asset. You can send the dictionary along with other content (web pages, assets or anything else) that you want to get translated as one single project.

Translator Page [Classic UI]

In addition to the above method, you can also chose to send a dictionary out for translation using the Translator Page. The Page has been updated to add options to send a dictionary out for Translation using the AEM Translation Projects.

Here are the steps to translate a dictionary using AEM Translator Page:

  1. Open the AEM Translator Page (http://<hostname>:<port-number>/libs/cq/i18n/translator.html) in a browser window.
  2. You will observe that the page has a new dropdown, with options to “Create a new Translation Project” or “Add to an existing Translation Project” – the same familiar options that you see in the “References” Panel in SITES or ASSETS Admin View.

Pic4.png

3. You can select either of the options to add the current dictionary to an AEM      Translation Project

Pic5.png

4.  The dialog lets you select a Destination Language (aka target language) as well as an option to send only the missing translations – aka Update Translation workflows in case you added new Strings.

In case you are not using AEM 6.2 and have an earlier message, the only tool that you have is the option to Export dictionary and then manually toss it over to the translation vendor and once translated import it back in AEM.
With AEM 6.2, there is a nice integration with Machine Translation as well.

 

AEM Translation Connector

Adobe Experience Manager, now has a well define API for integrating a Translation Platform. A number of Translation Partners have leveraged this support and built connectors. The connectors allow AEM instances to connect to Translation Platform and send content from AEM over to Translation Platform and back in AEM.

AEM supports two kinds of translation workflows – synchronous translation (machine translation) and asynchronous translation (human translation). A connector can choose to implement either of the workflows or can support both workflows. AEM’s success has attracted a number of translation vendors to write a connector and make it available to their customers. Hence there is a good chance that you can grab a connector off the shelf without going through the pain of developing one itself.

Most translation partners have also shared their connectors on the Adobe Marketing Exchange. Here is a quick link to the list of translation vendors as of today (Thursday, July 7th, 2016)

# Translation Vendor Learn More Download Connector
1 Smartling LearnMore – Smartling Connector
2 SDL WorldServer LearnMore – SDL-WordServer Connector
3 SDL TMS LearnMore-SDL-TMS Connector
4 Translations.com (GlobalLink Connect) LearnMore-TDC-Globallink-AEM Connector
5 LionBridge (Clay – Tablet) LearnMore-LionBridge Does not share connector on Package Share
6 LingoTek LearnMore-Lingotek-AEM Connector
7 Thebigword LearnMore-TheBigWord-AEM Conector
8 Cloudwords LearnMore-CloudWords-AEM Connector
9 X-Connect LearnMore-XConnect-AEM Does not share connector on Package Share
10 Systran (Machine Translation) LearnMore-Systran-AEM Connector
11 AltLang (Machine Translation) LearnMore-AltLang-AEM Connector
12 GCell XLIFF Connector (not real translation LearnMore-GCellXliff Connector

You can see the current list by clicking this link (the link will redirect to Adobe Marketing Exchange):

https://marketing.adobe.com/resources/content/resources/en/exchange/marketplace/aem.html?q=translation&cat=aem&lastQuery=&orderBy=

However, if you have valid reasons to develop one of your own, you should start from a bootstrap connector. Bootstrap connector, as the name suggests is a shell project that you can use to develop a translation connector. Here are some useful links:

Source Code:

GIT: https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector

Documentation:

API:https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc/com/adobe/granite/translation/api/package-summary.html

Documentation: https://helpx.adobe.com/experience-manager/using/bootstrap.html

As always, if you need any help in developing a connector, do not hesitate to reach out to us (see my contact info below). We have extensive experience in developing connectors and have developed multiple connectors including the Microsoft Translator connector that ships with AEM. We would love to help you build your connector.

Gaurav Garg

gaurav@experiencelabs.in

Language Copy or Live Copy | An Important Decision

Does this question seem familiar – should we use Language Copy or Live Copy? From experience, I can tell you that every AEM customer does ask this question, not once but multiple times during AEM adoption. My colleague Praffull is writing this series of blogs about Site Structures. Today while having lunch, we were discussing about the next Blog post. It occurred to me that we need to talk about Language Copy and Live Copy first before anyone starts thinking about Site structure. So here is my contribution to Praffull’s efforts.

Adobe has described the these two concepts in the AEM documentation quite clearly.

Live Copy: A live copy is a copy of specific site content for which a live relationship with the original source is maintained. The live copy inherits content from its source; synchronization performs the actual transfer of content. Prime use case is to reuse content at multiple locations. One very good example of the usage of Live Copy is for sharing the content on multiple sub-sites – example Car Dealership Sites.

Language Copy: A language copy is a copy of an existing site that is to be translated to another language. There is no live relationship as established in case of Live Copy. It is one time copy of the content. Please note, there is no translation as part of the Language Copy Creation. However, Language Copy should be used if you wish to translate the content eventually. You may chose to partially translate the content. Thumb rule: create Language Copies if you intend to translate content.

There is a common myth – Language Copies can’t be updated/synchronised. After reading the documentation most AEM users think that if they have to synchronize content between two sites, they must use Live Copy. However, that is not the case. The decision for using Live Copy vs. Language Copy should be based on whether you are going to translate content or not. If you do wish to translate content, then please evaluate using Language Copy instead. Language Copies can be updated as well and synchronized with their source. AEM has Update & Translate workflows available Out of the box that can synchronize changes between the source and language copy. However, in order to use these workflows, one needs to structure the content in a way that language roots (pages with ISO locale code) are all at the same level.

I and Praffull will be happy to discuss with you if you have any follow up questions or want to discuss your Site Structure. Please do not hesitate to write to me at gaurav@experiencelabs.in