Pre 6.1 Usage

Content Translation Support Extended (CTSX) enables you to translate content automatically over a translation provider ensuring a more accurate translation. Translation is done from a base language, typically English, to a target language. The base language should exist as content within your website or content app as properties. The target languages should be configured in your site definition. See Enabling multilanguage content for more information.

The Configuration showed here reflects usage with Magnolia 6.1 and earlier. If you use a newer version of Magnolia, see Content Translation Extended module.

Configuration

Parameter Description

supportedFieldDefinitions

required

Defines the field types that are going to be translated. Default is text and richText; possible values are composite and multiValue.

propertiesToTranslateFinder

required

The class that finds the properties to be translated. Default is info.magnolia.translation.ext.core.finder.AdaptivePropertiesToTranslateFinder; finds the properties by processing the fields in the dialogs.

sourceLanguages

optional

From version 2.9.7, 3.0.3 Defines the source languages. The default is the value in the site definition fallbackLanguage; you can define as many languages as your 3rd party translator supports. The dialog will display only the ones supported in the current site definition.

configuration structure older

Translation providers

There are three translation providers to choose from: Google, Microsoft Translator and Translations.com. To make use of the translation functionality, a user account is required for the chosen provider.

A translator module connects Magnolia to translation services. The behavior of the service depends on the translation service selected.

Service Notes

Synchronous

Directly returns the translated result for each translation request.

  • Google

  • Microsoft

No support yet for translating languages which contain country information.

  • Translating from "English" to "German" is supported but

  • Translating from "English, United Kingdom" or "Germany" is not supported yet

Asynchronous

Does not return the translated result for each translation request. A second request is required to get the translated result.

  • Translations.com

Supports translating languages which contain country information.

  • Add the country information for locales in the site definition (e.g: country=GB for English, United Kingdom)

  • Mix the country information with fallbackLocale (or defaultLocale) property for setting the source language in the site definition (e.g: fallbackLocale=en_GB for English, United Kingdom)

Common properties

Property Description

autoTranslationAllowed

optional

When true the content review process (workflow) is bypassed.

class

required

Definition class for the translator to be used.

configName

required

The display name of the configuration in Magnolia.

defaultFlag

required

Set the translator to be the default.

enabledFlag

required

Enables or disables the configuration with true or false.

implementationClass

required

Implementation class for the translation service.

Translation Extend app

The module comes with the Translation Extend app which can be found under the tools menu of the applauncher. This app extends the functionality of Content Translation in the sense that translations can now be automatized. It is still possible to export the automatized translations from the Content Translation app after receiving them.

Translation subapps

The app is made up of several subapps for managing translation files and submissions.

  • Batches: In the Batches subapp users can

    • Add a new or edit an existing batch.

    • Submit a batch for translation.

    • Get the history of the batch.

    • Cancel a batch submission.

    • Reload an existing batch.

  • Histories: Allows for viewing and managing the batch histories.

  • Queues: Allows for managing the translation submission.

  • Comparison: Allows you to compare original and translated values before importing or rejecting.

Translation status

Once a batch is created it has a status. The status is visible from Batches subapp.

Status Description

OPEN

Created and not yet submitted.

PROCESSING

Processing and waiting to be submitted or imported.

SUBMITTED

Submitted to the translation provider.

TRANSLATED

Translated by the translation provider and was received.

APPROVED

The translation has been approved by the reviewer.

IMPORTED

The content was imported.

REJECTED

The translation has been rejected by the reviewer.

CANCELLED

Cancelled.

REOPENED

Reopened after going through review step.

EMPTY

The resource has no i18n items.

Workflow

This module provides a workflow for users to review and approve translated content. If the setting autoTranslationAllowed is true then the content is imported directly without a review step. Otherwise the content review workflow process is started.

The workflow is identical in nature to the 4-eye content approval workflow used for the Pages app. In this case the editor is the translation provider and the reviewer can be any person in the group. To configure your desired group, change the property here: /modules/content-translation-support-ext-core/tasks/reviewTranslation/groups@publishers.

Message views

Workflow message views define how messages display in Pulse during translation workflow. See Message view definition for more details.

Message views are configured here: /modules/content-translation-support-ext-core/messageViews.

message view definition oldUI

Work item handlers

The mapping is based on the work item name which is added to the jBPM process definition. There are two handlers configured for the workflow process.

  • approve: Handles importing translated content after approval

  • reject: Handler for content rejection

Work item handlers are configured here: /modules/content-translation-support-ext-core/workItemHandlers.

Translation jobs

The core module installs three scheduled jobs to automate the translation process. The translation is submitted to the translation provider. In the case of Translations.com, a second request is required to retrieve the translation results. Finally, the translation is either directly imported or the workflow process is initiated.

The jobs are configured under: /modules/scheduler/config/jobs.

Submitting

The executeSubmissionTranslationCommand sends translation submission requests to the provider.

# Configuration shown in YAML but must exist as a JCR Node.
executeSubmissionTranslationCommand:
  catalog: workflowTranslation
  command: threadPoolSubmissionCommand
  cron: 1/60 * * * * ? # set to execute every minute at 1 second past the minute
  description: Output, Send, Update translation batch
  enabled: true
  params:
    batchSize: 100 # define how many tuples we retrieve at each execution of the job
    maxAttempt: 10 # define the max retry for each item
    poolSize: 10 # define the size of the thread pool

Retrieving

The executeGetTranslationCommand is for asynchronous translation. You will also need to use this job for translation services that require a second request to retrieve the translations.

# Configuration shown in YAML but must exist as a JCR Node.
executeGetTranslationCommand:
  catalog: workflowTranslation
  command: threadPoolGetTranslationCommand
  cron: 5/60 * * * * ? # set to execute every minute at 5 seconds past the minute
  description: Get translation from provider
  enabled: true
  params:
    batchSize: 100 # define how many tuples we retrieve at each execution of the job
    maxAttempt: 10 # define the max retry for each item
    poolSize: 10 # define the size of the thread pool

Importing

The executeImportTranslationCommand imports the translation immediately or starts the workflow. The behavior is set by autoTranslationAllowed property in the translator configuration.

# Configuration shown in YAML but must exist as a JCR Node.
executeImportTranslationCommand:
  catalog: workflowTranslation
  command: threadPoolImportCommand
  cron: 0/30 * * * * ? # set to execute every 30 seconds
  description: Import or create import workflow
  enabled: true
  params:
    batchSize: 100 # define how many tuples we retrieve at each execution of the job
    maxAttempt: 10 # define the max retry for each item
    poolSize: 10 # define the size of the thread pool

What is exported and imported

By default, text and rich text fields are included in export files. Additional field types may be registered here: /modules/translation/config/supportedFieldDefinitions. Add another property with the value set to the definition class of the field that should be included.

what is exported imported older

In addition to registration, the child fields of the composite field should have an i18n property set to true.

form:
  tabs:
    - name: tabText
      fields:
        - name: composite
          label: Sample Composite
          class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
          fields:
            - name: title
              i18n: true
              label: Title
              class: info.magnolia.ui.form.field.definition.TextFieldDefinition
            - name: subtitle
              label: Subtitle
              class: info.magnolia.ui.form.field.definition.TextFieldDefinition

Notification Email

Magnolia uses Mail module to send a notification email to submitter in case of errors. The template provided is here. The notification email template is configured here: /modules/mail/config/templatesConfiguration/translationNotificationTemplate.

core email notification

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Content Translation Extended module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules