XTM Connector

Summary

An out-of-the-box connector to XTM Translation Services, please see at https://xtm.cloud/.

Set up

To set up the connector, add dependency 'translations-addon-connector-xtm' as mentioned in the installation page.

Then set this property in the repository:

/hippo:configuration/hippo:modules/translation-services-daemon/hippo:moduleconfig/translationsaddon:connector-xtm/className=
    com.bloomreach.cms.translations.connector.xtm.XTMTranslationConnector

Configuration settings are to be taken from your XTM account. Apply for one if you don't have one yet.

The configuration at the translationsaddon:connector node:

String property Default value Description
xtm.apiURL   Mandatory
URL of the XTM API (eg. https://api-test.xtm-intl.com/project-manager-api-rest/)
xtm.companyName   Mandatory
Company name for XTM (eg. Bloomreach)
xtm.password   Mandatory
Password for XTM API (BASIC AUTH)
xtm.localesMap {"en":"en_US", "de":"de_DE", "nl":"nl_NL", "fr":"fr_FR", "en_GB":"en_GB"} Mandatory
A JSON string containing a mapping between locales used in the CMS and locales that XTM uses
xtm.templateId   Mandatory
XTM templateId (eg. 3669)
xtm.callbackURL   URL for callback (eg. http://somesiteurl/rest/xtm/jobFinished)
xtm.customerId   Mandatory
XTM customerId (eg. 23)
xtm.userId   Mandatory
XTM uesrId (eg. 20)

The web hook for callback

When a translation file are is submitted by a linguist in XTM, translated documents are posted back to a URL that is sent to XTM as a callaback. To support this callback, a REST resource is to be installed in the site module. The REST resource takes the GET request and creates a translation event that a backend service listens to.

Choose callback URL

A certain site URL has to be available for the outside world to post to. You may choose for instance a suburl of an existing domain, say http://www.example.com/rest/xtm/jobFinished or a new subdomain, say https://callback.example.com/xtm/jobFinished. The REST resources matches on the ending /xtm/jobFinished so that part is mandatory.

Since version 6.2.0, the REST has a configuration check on root, i.e. /xtm/.

Make sure the URL will reach the site webapp in your webservers (Apache httpd, nginx).

HST hosts configuration

The HST has to be configured to map the callback URL (without the ending /xtm/jobFinished) to the plain REST pipeline in a mount. See also the Plain JAX-RS services documentation.

So for an existing www.example.com, have this node structure below the applicable host group, say at /hst:hst/hst:hosts/production:

+ com [hst:virtualhost] 
  + example [hst:virtualhost] 
    + www [hst:virtualhost]
      + hst:root [hst:mount]
        + rest [hst:mount]
          - hst:alias: rest
          - hst:ismapped: false
          - hst:namedpipeline: JaxrsRestPlainPipeline
          - hst:types: [rest]

Note: before version 6.2.0 (see release notes), the API URL and credentials needed to be configured at the mount level, as well as on the connector level (see above):

          - xtm.apiURL: URL of XTM API (eg. https://api-test.xtm-intl.com/project-manager-api-rest/)
          - xtm.companyName: company name for XTM (eg. Bloomreach)
          - xtm.password: XTM password for BASIC auth
          - xtm.userId: XTM user id for BASIC auth (integer)

 

 

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?