Install the Translations Add-on
This section assumes a standard Bloomreach Experience Manager or Bloomreach Experience Manager project using Maven with a root pom and modules CMS and site.
Please decide beforehand:
- The connector: GlobalLink, LiveWords and/or Tester (latter comes in handy for local development).
- The CMS request UI: how do you want translation requests to be made: from the document editor and/or from the advanced search? For the latter, it needs to be a Bloomreach Experience Manager project.
Note: when using Globallink, the document editor UI is not complete yet, it needs the project selection as available in the search UI.. - The CMS dashboard: do you want an overview of the translation requests available in the CMS in a new perspective?
Root POM: Repositories, Version Management
To the <properties> section of the root pom.xml, add versions for the add-on and for the settings management plugin from the Hippo Forge. It can be done without the settings management plugin, but then document type and field configuration is harder. The latest released version is visible in the release notes.
<bloomreach.translations-addon.version>4.6.0</bloomreach.translations-addon.version> <forge.settingsmanagement.version>2.0.0</forge.settingsmanagement.version>
To the <repositories> section, add the Hippo Enterprise and Hippo Forge repositories if not there already.
<repository> <id>hippo-maven2-enterprise</id> <name>Hippo Enterprise Maven 2</name> <url>https://maven.bloomreach.com/repository/maven2-enterprise/</url> </repository> <repository> <id>hippo-forge</id> <name>Hippo Forge Maven 2 Repository</name> <url>https://maven.bloomreach.com/repository/maven2-forge/</url> </repository>
It is recommended to use the <dependencyManagement><dependencies> section to set the version of all used Translations Add-on artifacts. For example, in your root pom.xml:
<dependencyManagement> <dependencies> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-bom</artifactId> <version>${bloomreach.translations-addon.version}</version> <type>pom</type> </dependency> .. repeat for all used artifacts in CMS and site poms (see below) .. <dependencies> <dependencyManagement>
CMS Dependencies Module: Mandatory, Recommended, and Optional Dependencies
There is one mandatory pom dependency to be installed in the CMS, the so called Bill Of Materials (BOM), and many optional. Please add these to <dependencies> section of the cms-dependencies module's pom.xml.
<dependencies> <!-- Mandatory: Translations Bill Of Materials pom --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-bom</artifactId> <type>pom</type> </dependency> <!-- Optional, recommended: settings management, plus the translations-addon extension --> <dependency> <groupId>org.bloomreach.forge.settingsmanagement</groupId> <artifactId>bloomreach-settingsmanagement-repository</artifactId> </dependency> <dependency> <groupId>org.bloomreach.forge.settingsmanagement</groupId> <artifactId>bloomreach-settingsmanagement-frontend-core</artifactId> </dependency> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-settings-frontend</artifactId> </dependency> <!-- Optional: document editor frontend dependency --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-editor-frontend</artifactId> </dependency> <!-- Optional: Tester connector --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-connector-tester</artifactId> </dependency> <!-- Optional: Livewords connector --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-connector-livewords-repository</artifactId> </dependency> <!-- Optional: Globallink connector --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-connector-globallink</artifactId> </dependency> <!-- Optional: Star connector --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-connector-star</artifactId> </dependency> <!-- Optional: advanced search (if not already installed), plus optional translations-addon extension --> <dependency> <groupId>com.onehippo.cms7</groupId> <artifactId>hippo-addon-advanced-search-frontend</artifactId> <type>pom</type> </dependency> <dependency> <groupId>com.onehippo.cms7</groupId> <artifactId>hippo-addon-advanced-search-repository</artifactId> </dependency> <!-- Optional: advanced search frontend --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-search-frontend</artifactId> </dependency> <!-- Optional: translations dashboard --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-dashboard</artifactId> </dependency>
Site Module: Add LiveWords Web Hook (if applicable)
To support the LiveWords system posting a translated document into the repository, add this to the <dependencies> section of the site module's pom.xml.
<dependencies> <!-- Livewords webhook --> <dependency> <groupId>com.bloomreach.cms.translations-addon</groupId> <artifactId>translations-addon-connector-livewords-webhook</artifactId> </dependency> </dependencies>
The dependency adds a TranslationResource class that is to be configured as Spring bean, as part of the plain REST resource pipeline. Please create a file "spring-plain-rest-api.xml" in src/main/resources/META-INF/hst-assembly/overrides with the following content. If there is already a "customRestPlainResourceProviders" object in your project, just add the bean to the existing list.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <import resource="classpath:/org/hippoecm/hst/site/optional/jaxrs/SpringComponentManager-rest-jackson.xml"/> <import resource="classpath:/org/hippoecm/hst/site/optional/jaxrs/SpringComponentManager-rest-plain-pipeline.xml"/> <bean id="customRestPlainResourceProviders" class="org.springframework.beans.factory.config.ListFactoryBean"> <property name="sourceList"> <list> <bean class="org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider"> <constructor-arg> <bean class="com.bloomreach.cms.translations.connector.livewords.rest.TranslationResource"/> </constructor-arg> </bean> </list> </property> </bean> </beans>