CTSX Microsoft Translator
Content management Incubator Version 4.1.3 Magnolia 6.3 compatible
The CTSX Microsoft module performs translation via Microsoft.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
In order to start the Microsoft 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-microsoft</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 Microsoft service provider is handled in the module config. This provider should be configured with the following path:
modules
└── content-translation-support-ext-microsoft
└── config
└── translationProviders
└── microsoftTranslationProviderConfigFile.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
Microsoft service provider configuration is defined within its provider module (magnolia-content-translation-support-ext-microsoft
) under the following directory structure:
/src/main/resources/magnolia-content-translation-support-ext-microsoft/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-microsoft/translationProviders
Below is an example of how to decorate Microsoft service provider configuration within a light module:
light-modules/
└── my-module/
└── decorations/
└── magnolia-content-translation-support-ext-microsoft/
└── translationProviders/
└── Microsoft.yaml
Configuration properties
This provider can be configured with the following properties.
Property | Description |
---|---|
|
optional , default is When true the content review process (workflow) is bypassed. |
|
required Definition class for the translator to be used. See |
|
required Client secret for the client ID. |
|
required Identifies the configuration within Magnolia. |
|
optional The default configuration used by the system in the case of multiple translation services being used. |
|
required Implementation class for interfacing with Microsoft. See |
Sample JCR configuration
'config':
'jcr:primaryType': 'mgnl:content'
'translationProviders':
'Microsoft':
'autoTranslationAllowed': 'false'
'class': 'info.magnolia.translation.ext.provider.microsoft.definition.MicrosoftProviderDefinition'
'clientToken': 'xxxxxxxxxxxxxxxxxxxx'
'configName': 'Microsoft.com'
'enabledFlag': 'true'
'implementationClass': 'info.magnolia.translation.ext.provider.microsoft.translator.MicrosoftTranslator'
There might have some mismatch between supported language from Magnolia system and Microsoft translation, so we provide the default configuration for mapping between those language codes in config module.

Usage
After registration and starting, The Content Translation Support Extended (CTSX) module will bind the Microsoft translator to Configuration fields.
You can test the connection to the translator api before using. |
How it works
Use the same steps outlined with CTSX Google Translator but you will choose Microsoft.com instead of Google.com in the Configuration.
Known issues
Text too large
In case of submitting many contents (such as the whole /travel page includes dependences), an error will be thrown as below. This is known issue as number of submitted segments is over microsoft’s threshold.
ERROR info.magnolia.translation.ext.provider.microsoft.translator.MicrosoftTranslator: Error occurred while translating
java.lang.RuntimeException: TEXT_TOO_LARGE - Microsoft Translator (Translate) can handle up to 10, 240 bytes per request