Embitel

Search
Close this search box.

Globalizing Your Content and Expanding the Reach: Automating Content Localisation with AEM and Google Translate

About the Customer:

Our customer is a leading Indian insurance company, offering a wide range of innovative and customer-centric insurance products and other fintech services.

They are utilising Adobe Experience Manager to manage and localise web content. They required an efficient and scalable solution to automate the translation of pages within AEM, enabling faster content localisation and more streamlined workflows across regions.

Overview:

In this case study, we describe developing and implementing an automated translation workflow in Adobe Experience Manager (AEM) leveraging the Google Translate API.

The Google Translation Workflow automates the translation of AEM pages simplifying the process and improving efficiency for content creators. This workflow ensures that content is translated into a target language without requiring manual intervention thereby accelerating time-to-market for localised content.

Business Challenges:

The primary objective was to create an automated solution that could translate AEM pages from one language to another while ensuring that the translated content would be saved in the appropriate target language folder within the AEM repository.

The client sought to:

  1. Automate Translation: Save valuable time for content teams by automating the translation process.
  2. Ensure Scalability: Support multiple languages effortlessly with minimal manual input, enabling global expansion.
  3. Preserve Content Integrity: Exclude non-translatable fields to maintain the consistency and structure of the original content.
  4. Enhance User Experience: Simplify content localization to provide a seamless and engaging experience for website visitors worldwide.
  5. Efficient Workflow: Streamline AEM page translations to reduce manual work, accelerating content localization and allowing teams to focus on strategic tasks.
  6. Cost-Effective Localisation: Cut down on external translation service costs while ensuring high-quality, accurate translations.
  7. Consistent Branding: Preserve a consistent brand voice across all languages, ensuring uniformity in messaging and building trust with global audiences.

Embitel’s Solution:

Embitel’s AEM development and integration team created a custom Google Translation Workflow integrated with AEM. This solution uses the Google Translate API to automate the translation of AEM pages, saving time, reducing manual effort and improving efficiency.

Here’s a breakdown of the solution and how it works step by step:

  1. Google Translate API Integration
    • Objective: The Google Translate API is integrated into the AEM workflow to translate page content from one language to another automatically, with no manual input required.
    • Benefit: This streamlines the translation process, ensuring fast, accurate, and automated content translation across multiple languages.
  2. AEM Workflow Automation
    • Objective: A fully automated AEM workflow was designed to handle page duplication, translation, and storage of the translated content in the correct language folder.
    • Benefit: The automated workflow eliminates errors and significantly reduces manual overhead, making content localization more efficient.
  3. Multi-Language Support
    • Objective: The solution supports multiple languages, enabling businesses to manage content in various regional languages with minimal manual intervention.
    • Benefit: This enhances the scalability of content across global markets, allowing businesses to expand their digital reach effectively.
  4. Content Exclusion Logic
    • Objective: The solution excludes specific system properties, such as cq:template, jcr:createdBy, and other metadata fields, from translation.
    • Benefit: This ensures the integrity of the page’s underlying structure, preventing accidental changes to core content while still translating user-facing content.
  5. Recursive Translation
    • Objective: The workflow ensures that all nested content, including child nodes and subpages, is translated recursively.
    • Benefit: This guarantees that the entire page and its associated content are accurately translated, providing a complete localized experience.

Phase1 – AEM Translation Workflow Automation

The integration with AEM’s workflow allows seamless translation automation. Here’s how the process unfolds:

Key Components:

  • TranslationWorkflow.java: Manages the overall logic of the translation process, including content duplication, translation initiation, and storage.
  • TranslationServiceImpl.java: Facilitates communication with the Google Translate API to ensure accurate and efficient translation.
  • TranslationService.java: Defines the contract for the translation service, standardizing translation requests across different implementations.

Phase 2 – Workflow Execution Process

  1. Triggering the Workflow:
    • The user selects a page in AEM and triggers the translation by selecting the Google Translation Workflow from the available options.
  2. Page Duplication:
    • A duplicate of the selected page is created to preserve the original content. This prevents any accidental changes to the source page during the translation process.
  3. Content Translation:
    • The copied page’s content is sent to the Google Translate API via TranslationServiceImpl.java, which handles the interaction with the API. The content is translated from the source language (e.g., English) to the target language (e.g., Hindi). Non-translatable properties (e.g., cq:template, jcr:createdBy) are excluded to ensure the page’s structure remains intact.
  4. Saving Translated Content:
    • After translation, the content is saved under the appropriate language folder within AEM. This organized structure ensures that translated content is easily accessible and properly managed.

Phase 3 – Key Code Files

  1. TranslationWorkflow.java
    • Purpose: Handles the logic of the entire workflow, including page duplication, translation initiation, and content storage.
    • Key Methods:
      • execute(): The main entry point for triggering the workflow, fetching page paths, validating pages, and coordinating content duplication and translation.
      • copyPage(): Creates a copy of the page to preserve the original content.
      • translatePageContent(): Sends the copied page’s content to TranslationServiceImpl.java for translation.
  2. TranslationService.java
    • Purpose: Defines the methods needed to interact with the translation system.
    • Key Method:
      • translate(): Translates the content, taking in the text, source language, and target language, then returns the translated output.
  3. TranslationServiceImpl.java
    • Purpose: Implements the logic for interacting with the Google Translate API.
    • Key Method:
      • translate(): Handles communication with the Google Translate API to fetch translations and return the translated content.

Phase 4 – Considerations

  • Node Exclusions: Certain system properties, such as cq:template and jcr:createdBy, are excluded from translation to preserve the structure and metadata of the page.
  • Recursive Translation: The workflow ensures that all nested content (e.g., child nodes, subpages) is also translated. This recursive approach guarantees that no part of the page is left untranslated.

Embitel Impact:

  • Increased Efficiency: The automated translation workflow has significantly reduced manual effort in translating AEM pages, enabling faster localisation of content across multiple languages.
  • Scalability: The system is scalable, supporting translation into any language available via the Google Translate API, allowing for easy expansion as the business grows.
  • Improved Time-to-Market: Content teams can now quickly roll out localised content, reducing the time-to-market for new language versions of web pages.
  • Content Integrity: By excluding system fields and recursively translating nested nodes, the workflow ensures the integrity and functionality of the translated pages.
  • Reduced Errors: Automation of the translation process has minimized the risk of human error in translating page content, ensuring consistent and accurate translations.
  • Cost Savings: By reducing the need for external translation services, the customer achieved substantial savings, allowing them to allocate resources more effectively.
  • Consistent Branding: With automated translations, the brand’s voice and messaging remained consistent across languages, strengthening customer trust.

Tools and Technologies:

  • Adobe Experience Manager (AEM)
  • Google Translate API
  • Java
  • REST API
  • JSON
Scroll to Top