Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
The CTS Common module defines the API and basic configurations which support the CTS Auto Translation, CTS Workflow and CTS Translations.com modules.
<dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-module-content-translation-support-extend-common</artifactId> <version>2.0.0</version> </dependency>
The module is configured in /modules/content-translation-support-extend-common
.
Node name | Value |
---|---|
modules | |
content-translation-support-extend-common | |
config | |
commands | |
fieldTypes |
Translators connect Magnolia to external translation services. The translator configurations contain access credentials and are discussed in the individual module documents.
Translators for all supported CTS modules are registered in the CTS Common module.
Google
and Microsoft
translator.TranslationsCom
translator. Node name |
---|
config |
translators |
Microsoft |
TranslationsCom |
The Languages select field allows the user to select target languages for translation. All configured languages (except fallback) are available for selection automatically. The field is used in dialogs in the supported CTS modules. See Enabling mulitlanguage content for how to set up languages.
The field
is registered in /modules/content-translation-support-extend-common/fieldTypes/languageSelectField
.
Node name | Value |
---|---|
fieldTypes | |
languageSelectField | |
definitionClass | info.magnolia.module.contenttranslationsupport.extend.common.field.LanguagesSelectFieldDefinition |
factoryClass | info.magnolia.module.contenttranslationsupport.extend.common.field.LanguagesSelectFieldFactory |
Here's an example of its use.
Example: Translation request dialog in the CTS Auto Translation module configured in /modules/content-translation-support-extend-auto-translation/dialogs/autoTranslationRequest/form/tabs/translation/fields/targetLangs
.
Node name | Value |
---|---|
fields | |
targetLangs | |
class | info.magnolia.module.contenttranslationsupport.extend.common.field.LanguagesSelectFieldDefinition |
label | Target languages |
leftColumnCaption | Configured languages |
required | true |
rightColumnCaption | Selected languages |
Properties:
<field name> | required Field name. | ||||
| required/optional Field properties. LanguagesSelectFieldDefinition supports all:
|
The module includes a number of custom translation command classes (see list below), many of which are registered in the supported CTS modules.
Two commands, ImportTranslationCommand
and ScheduledConditionCommand
, are registered in the CTS Common module in /modules/content-translation-support-extend-common/commands/common
.
Node name | Value |
---|---|
commands | |
common | |
importCommand | |
class | info.magnolia.module.contenttranslationsupport.extend.common.command.ImportTranslationCommand |
scheduleImportCommand | |
config | |
expectedStatuses | |
Translated | Translated |
catalogName | common |
commandName | importCommand |
class | info.magnolia.module.contenttranslationsupport.extend.common.command.ScheduledConditionCommand |
Properties:
common | required Common catalog. |
| required Import command. |
| required ImportTranslationCommand imports translated content in XLIFF format. |
| required Schedule Import command. |
| required Configuration node. |
| required Expected statuses node. |
| required Expected status. |
| required Catalog where the triggered command resides. |
| required Name of triggered command. |
| required
ScheduledConditionCommand
executes another command when a |
List of commands:
Command | Description | Registered in |
| Cancels a translation task. | CTS Workflow |
| Executes another command when ExpecedStatuses condition is met. | CTS Translations.com |
| Converts translatable content into XLIFF format | |
| Imports translation result in XLIFF format into content. | CTS Common |
| Executes another command when CommandCondition is met | CTS Common |
| Calls external translation service to translate with selected translator. | |
| Tracks translation progress. | CTS Auto Translation |
The CTS Common module includes two custom action definition classes:
| Opens a translate dialog. See Enabling automatic translation in content apps for a usage example. |
| Translate action. Used for commit action in translate dialog. See Translate request dialog for a usage example. |