CTSX AI Accelerator Translator
Content management Incubator Version 5.0.0 Magnolia 6.4 compatible
The AI Accelerator translation module performs translations using the AI Accelerator module. Translations are handled synchronously.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
| In order to start the AI accelerator translation process, ensure the core and apps modules for Content Translation Extended are already installed. |
<dependency>
<groupId>info.magnolia.translation</groupId>
<artifactId>magnolia-content-translation-support-ext-aiaccelerator</artifactId>
<version>5.0.0</version>
</dependency>
Configuration
The configuration can be done using JCR or YAML.
-
Refer to the JCR Configuration for the JCR configuration.
-
Refer to the YAML configuration for instructions on how to define settings using YAML.
JCR Configuration
Configuration of the AI Accelerator translation provider is handled in the module config. This provider should be configured with the following path:
modules
└── content-translation-support-ext-aiaccelerator
└── config
└── translationProviders
└── aiacceleratorTranslationProviderConfigFile.yaml
YAML configuration
AI Accelerator translation provider configuration is defined within its provider module (magnolia-content-translation-support-ext-aiaccelerator) under the following directory structure:
/src/main/resources/content-translation-support-ext-aiaccelerator/translationProviders
Required decorations
This configuration can also be decorated to override or extend the default configuration. Decoration file should be placed under the following path:
<light-module-name>/decorations/content-translation-support-ext-aiaccelerator/translationProviders
Below is an example of how to decorate AI Accelerator translation provider configuration within a light module:
light-modules/
└── my-module/
└── decorations/
└── content-translation-support-ext-aiaccelerator/
└── translationProviders/
└── AiAccelerator.yaml
Configuration properties
Set the modelId property using the model configuration defined in the AI Accelerator module that will be used for translation.
|
| Property | Description |
|---|---|
|
required Definition class for the translator to be used. See |
|
required Model configuration ID defined in the AI Accelerator module. |
|
required Identifies the configuration within Magnolia. |
|
optional The default configuration used by the system in the case of multiple translation services being used. |
|
required Enable or disable the configuration using this flag. |
|
required Implementation class for interfacing with Ai Accelerator Translator. See |
|
optional You can adjust the character limit in one request. Default is |
|
optional You can adjust on which index the partition is made. Default is from the 1500th character. |
Setting system prompt
In the Hyper Prompt app of the AI Accelerator module, a new prompt used for translation is automatically created upon installation of the CTSX AI Accelerator Translator module. The path of this prompt is '/AI-content-translation/Translation'.
Editors can modify the existing prompt as needed; however, for the translation module to function correctly, the prompt at this path must exist and include the ${Source language} and ${Target language} properties.
Sample JCR configuration
'config':
'translationProviders':
'AIAccelerator':
'class': 'info.magnolia.translation.ext.provider.aiaccelerator.definition.AiAcceleratorProviderDefinition'
'modelId': 'xxxxxx' (1)
'configName': 'AI Accelerator module'
'enabledFlag': 'true'
'implementationClass': 'info.magnolia.translation.ext.provider.aiaccelerator.translator.AiAcceleratorTranslator'
| 1 | Your Model configuration ID. |
Usage
After registration and starting, the Content Translation Support Extended (CTSX) module binds the AI Accelerator translator to the Configuration field.
Choose Pages
-
Choose the pages that contain the i18n items before starting the process.
-
Click to 'Add to translation batch' action on action bar.
-
In the 'Add to translation batch' dialog:
-
Input the batch name or select an existing batch.
-
Check to include Dependencies and include Sub-nodes if necessary.
-
Select AI Accelerator module in the Configuration.
-
Click Save Changes.
-
Submit Batch
-
Open the Translation Extend app (under the Tools menu).
-
From the 'Batches' tab:
-
Select your batch.
-
Edit the batch information if you want.
-
Click to 'Submit batch' action on action bar.
After The retrieveTranslationResultFromExternalServiceJobhas run, you will get notification for the translation result.You can bypass this step (auto import translated content) if you set "autoTranslationAllowed=true".
-
-
In the 'Translation Review' dialog:
-
Click to 'Assign to me' on action bar.
-
Can be 'Approve & Import' or Reject the task.
-
Click to 'Review' action for comparing the different.
It can also be 'Import' or "Reject" in the 'Comparison' tab. After importing the translated content, you can open the selected page again for checking the result.
-