CTSX Microsoft Translator

Content management Incubator

Issues

Git

Git

Latest

3.4.15

Compatible with Magnolia 6.2.

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>3.4.15</version>
</dependency>

Configuration

Configuration of the Microsoft service provider is handled in the module config. This provider can be configured with the following properties.

Please use JCR for module configuration. When using yaml, translation provider definition will not be loaded and connector will be not usable.

Property Description

autoTranslationAllowed

optional , default is false

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

class

required

Definition class for the translator to be used.

See info.magnolia.translation.ext.provider.google.definition.MicrosoftProviderDefinition.

clientId

required

Identifies the client application with Microsoft.

clientToken

required

Client secret for the client ID.

configName

required

Identifies the configuration within Magnolia.

defaultFlag

optional

The default configuration used by the system in the case of multiple translation services being used.

implementationClass

required

Implementation class for interfacing with Microsoft.

See info.magnolia.translation.ext.provider.google.translator.MicrosoftTranslator.

Sample configuration

'config':
  'jcr:primaryType': 'mgnl:content'
  'Microsoft':
    'autoTranslationAllowed': 'false'
    'class': 'info.magnolia.translation.ext.provider.microsoft.definition.MicrosoftProviderDefinition'
    'clientId': 'xxx'
    '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.

microsoft lang mapping

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.

microsoft

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
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