Translate Headless Content translate-content
Use the translation integration to translate your headless content.
The Story So Far story-so-far
In the previous document of the AEM headless translation journey, Configure Translation Connector you learned about the translation framework in AEM. You should now:
- Understand the important parameters of the Translation Integration Framework in AEM.
- Be able to set up your own connection to your translation service.
Now that your connector is set up, this article takes you through the next step of translating your headless content.
Objective objective
This document helps you understand how to use AEM’s translation projects along with the connector to translate content. After reading this document, you should:
- Understand what a translation project is.
- Be able to create new translation projects.
- Use translation projects to translate your headless content.
Creating a Translation Project creating-translation-project
Translation projects enable you to manage the translation of headless AEM content. A translation project gathers the content to be translated into other languages in one location for a central view of the translation effort.
When content is added to a translation project, a translation job is created for it. Jobs provide commands and status information that you use to manage the human translation and machine translation workflows that execute on the resources.
Translation projects can be created in two ways:
- Select the language root of the content and have AEM automatically create the translation project based on the content path.
- Create an empty project and manually select the content to add to the translation project
Both are valid approaches usually only differing based on the persona performing the translation:
- The translation project manager (TPM) often needs the flexibility of manually selecting the content to the translation project.
- If the content owner is also responsible for translation, letting AEM automatically create the project based on the selected content path is often easier.
Both approaches are explored in the following sections.
Automatically Creating a Translation Project Based on Content Path automatically-creating
For content owners who are also responsible for translation, it is often easier to have AEM automatically create the translation project automatically. To have AEM automatically create a translation project based on your content path:
- Navigate to Navigation > Assets > Files. Remember that headless content in AEM is stored as assets known as Content Fragments.
- Select the language root of your project. In this case we have selected
/content/dam/wknd/en
. - Select the rail selector and show the References panel.
- Select Language Copies.
- Check the Language Copies checkbox.
- Expand the section Update Language Copies at the bottom of the references panel.
- In the Project drop-down list, select Create Translation Project(s).
- Provide an appropriate title for your translation project.
- Select Start.
You receive a message that the project was created.
Manually Creating a Translation Project by Selecting Your Content manually-creating
For translation project managers, it is often necessary to manually select specific content to include in a translation project. To create such a manual translation project, you must start by creating an empty project and then select the content to add to it.
-
Navigate to Navigation > Projects.
-
Select Create > Folder to create a folder for your projects.
- This is optional, but helpful to organize your translation efforts.
-
In the Create Project window, add a Title for the folder and then select Create.
-
Select the folder to open the folder.
-
In your new project folder, select Create > Project.
-
Projects are based on templates. Select the Translation Project template to select it and then select Next.
-
On the Basic tab, enter a name for your new project.
-
On the Advanced tab, use the Target Language drop-down to select the languages into which your content should be translated. Select Create.
-
Select Open in the confirmation dialog.
The project has been created, but contains no content to translate. The next section details how the project is structured and how to add content.
Using a Translation Project using-translation-project
Translation projects are designed to collect the content and tasks related to a translation effort in one place to make your translation simple and easy to manage.
To view the translation project:
- Navigate to Navigation > Projects.
- Select the project that was created in the previous section.
The project is divided into multiple cards.
- Summary - This card shows the basic header information of the project including the owner, language, and translation provider.
- Translation Job - This card or these cards show(s) provide an overview of the actual translation job including the status, number of assets, and so on. Generally there is one job per language with the ISO-2 language code appended to the job name.
- Team - This card shows the users who are collaborating on this translation project. This journey does not cover this topic.
- Tasks - Additional tasks associated with translating the content such as to do items or workflow items. This journey does not cover this topic.
How you use a translation project depends on how it was created: either automatically by AEM or manually.
Using an Automatically Created Translation Project using-automatic-project
When automatically creating the translation project, AEM evaluates the headless content under the path you selected. Based on that evaluation, it extracts the content that requires translation into a new translation project. I knows what fields to translate based on the fields flagged as Translatable by the content architect.
To see the detail of the headless content included in this project:
- Select the ellipsis button at the bottom of the Translation Job card.
- The Translation Job window lists all items in the job.
- Select a line to see the detail of that line, keeping in mind that one line may represent multiple content items to translate.
- Select the selection checkbox for a line item to see further options such as the option to delete it from the job or view it in the Content Fragments or Assets consoles.
Typically the content for the translation job starts in the Draft state as indicated by the State column in the Translation Job window.
To start the translation job, return to the translation project overview and Select the chevron button at the top of the Translation Job card and select Start.
AEM now communicates with your translation configuration and connector to send the content to the translation service. You can view the progress of the translation by returning to the Translation Job window and viewing the State column of the entries.
Machine translations automatically return with a state of Approved. Human translation allows for more interaction, but is beyond the scope of this journey.
Using a Manually Created Translation Project using-manual-project
When manually creating a translation project, AEM creates the necessary jobs, but does not automatically select any content to include. This allows the translation project manager the flexibility to pick-and-chose what content to translate.
To add content to a translation job:
-
Select the ellipsis button at the bottom of one of the Translation Job cards.
-
See that the job contains no content. Select the Add button at top of the window and then Assets/Pages from the drop-down.
-
A path browser opens allowing you to select specifically which content to add. Locate your content and Select to select.
-
Select Select to add the selected content to the job.
-
In the Translate dialog, specify that you want to Create Language Copy.
-
The content is now included in the job.
-
Select the selection checkbox for a line item to see further options such as the option to delete it from the job or view it in the Content Fragments or Assets consoles.
- Repeat these steps to include all required content in the job.
You can use the prior steps to add the necessary content to all languages (jobs) for the project. After you have selected all the content, you can start the translation.
Typically the content for the translation job starts in the Draft state as indicated by the State column in the Translation Job window.
To start the translation job, return to the translation project overview and select the chevron button at the top of the Translation Job card and select Start.
AEM now communicates with your translation configuration and connector to send the content to the translation service. You can view the progress of the translation by returning to the Translation Job window and viewing the State column of the entries.
Machine translations automatically return with a state of Approved. Human translation allows for more interaction, but is beyond the scope of this journey.
Reviewing Translated Content reviewing
As previously seen, machine translated content flows back into AEM with the status of Approved since the assumption is that because machine translation is being used, no human intervention is required. However it is still possible to review the translated content.
Simply go to the completed translation job and select a line item by tapping or clicking the checkbox. The icon Reveal in Content Fragment is shown in the tool bar.
Select that icon to open the translated content fragment in its editor console to see the details of the translated content.
You can further modify the content fragment as necessary, providing you have the proper permission, but editing content fragments is beyond the scope of this journey. See the Additional Resources section at the end of this document for more information on this topic.
The project’s purpose is to collect all the resources related to a translation in one place for easy access and a clear overview. However as you can see by viewing the detail of a translated item, the translations themselves flow back into the asset folder of the translation language. In this example the folder is
/content/dam/wknd/es
If you navigate to this folder by way of Navigation > Files > Assets, you see the translated content.
AEM’s translation framework receives the translations from the translation connector and then automatically creates the content structure based on the language root and using the translations provided by the connector.
It is important to understand that this content is not published and therefore not available to your headless services. You learn about this author-publish structure and see how to publish translated content in the next step of the translation journey.
Human Translation human-translation
If your translation service provides human translation, the review process offers more options. For example, translations arrive back in the project with the status Draft and must be reviewed and approved or rejected manually.
Human translation is beyond the scope of this localization journey. See the Additional Resources section at the end of this document for more information on this topic. However beyond the additional approval options, the workflow for human translations is the same as machine translations as described in this journey.
What’s Next what-is-next
Now that you have completed this part of the headless translation journey you should:
- Understand what a translation project is.
- Be able to create new translation projects.
- Use translation projects to translate your headless content.
Build on this knowledge and continue your AEM headless translation journey by next reviewing the document Publish translated content where you learn how to publish your translated content and how to update those translations as your language root content changes.
Additional Resources additional-resources
While it is recommended that you move on to the next part of the headless translation journey by reviewing the document Publish translated content, the following are some additional, optional resources that do a deeper dive on some concepts mentioned in this document, but they are not required to continue on the headless journey.
- Managing Translation Projects - Learn the details of translation projects and additional features such as human translation workflows and multi-language projects.
- Authoring Environment and Tools - AEM provides various mechanisms for organizing and editing your content including a robust path browser.