CTSX AT Language Solutions
Content management Incubator Version 4.1.3 Magnolia 6.3 compatible
The CTSX AT Language Solutions module performs translations using the AT Language Solutions APIs. Translations are handled synchronously or asynchronously.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
In order to start the ATLS translation process, please make sure that the core and apps modules in the Content Translation Extended have already been installed. |
<dependency>
<groupId>info.magnolia.translation</groupId>
<artifactId>magnolia-content-translation-support-ext-atls</artifactId>
<version>4.1.3</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 ATLS service provider is handled in the module config. This provider should be configured with the following path:
modules
└── magnolia-content-translation-support-ext-atls
└── config
└── translationProviders
└── altsTranslationProviderConfigFile.yaml
For users upgrading from version 4.0.0 to version 4.1.0 , ensure you move your existing translation provider configuration to the correct path.
|
YAML configuration
ATLS service provider configuration is defined within its provider module (magnolia-content-translation-support-ext-atls
) under the following directory structure:
/src/main/resources/magnolia-content-translation-support-ext-atls/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/magnolia-content-translation-support-ext-atls/translationProviders
Below is an example of how to decorate ATLS service provider configuration within a light module:
light-modules/
└── my-module/
└── decorations/
└── magnolia-content-translation-support-ext-atls/
└── translationProviders/
└── syncAtls.yaml
Configuration properties
This provider can be configured with the following properties.
Property | Description |
---|---|
|
required Definition class for the translator to be used. See |
|
required The display name of the configuration in 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 ATLS. See |
Property | Description |
---|---|
|
required Definition class for the translator to be used. See info.magnolia.translation.ext.provider.definition.AtlsAsynchronousProviderDefinition |
|
required The display name of the configuration in 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 AT Language Solutions. See |
restClients Configuration
The AT Language Solutions module is integrated using the REST Client module. The configuration in YAML is.
Expand to see sample
baseUrl: https://rts.at-ls.com
restCalls:
ping:
method: GET
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /atrts/restapi/ping
synchronous:
method: POST
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /atrts/restapi/translateSynchronous
body: '{"sourcelang": "{sourcelang}", "filename": "{filename}", "targetlang": "{targetlang}", "base64": "{base64}"}'
headers:
X-ATRTS-API-Key: "-- API KEY FROM ATLS --"
Host: "rts.at-ls.com"
Content-Type: "application/json"
asynchronous:
method: POST
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /atrts/restapi/translateAsynchronous
body: '{"sourcelang": "{sourcelang}", "filename": "{filename}", "targetlang": "{targetlang}", "base64": "{base64}"}'
headers:
X-ATRTS-API-Key: "-- API KEY FROM ATLS --"
Host: "rts.at-ls.com"
Content-Type: "application/json"
fileByToken:
method: POST
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /atrts/restapi/getFileByToken
body: '{"token": "{token}"}'
headers:
X-ATRTS-API-Key: "-- API KEY FROM ATLS --"
Host: "rts.at-ls.com"
Content-Type: "application/json"
Required decorations
You have to decorate "magnolia-content-translation-support-ext-atls" in order to add the "X-ATRTS-API-Key" and "Host" values provided by AT Language Solutions.
Expand to see sample
restCalls:
synchronous:
headers:
X-ATRTS-API-Key: "978cd5fa-1e82-xxxx-adc1-0242ac120002"
Host: "rts.at-ls.com"
asynchronous:
headers:
X-ATRTS-API-Key: "978cd5fa-1e82-xxxx-adc1-0242ac120002"
Host: "rts.at-ls.com"
fileByToken:
headers:
X-ATRTS-API-Key: "978cd5fa-1e82-xxxx-adc1-0242ac120002"
Host: "rts.at-ls.com"
Usage
After registration and starting, The Content Translation Support Extended (CTSX) module will bind the AT Language Solutions translator, to Configuration field.
You can test the connection to the translator API before using. |

How it works
The same steps with CTSX Google Translator but you will choose "Sync Atls Translate" or "Async Atls Translate" instead of "Google.com" in the Configuration depending on whether you want a synchronous or asynchronous translation.
In addition, if you have chosen an asynchronous translation, at "Step 2" after submitting the batch you must wait for the response from AT Language Solutions translator. |
You would be able to see the Task notification for translation result as soon as the submission has been delivered.