Configuring the Translations Add-on
The Translations Add-on uses main configurations in three locations of the repository:
- Settings: namespace, enabled languages, document types, fields.
- Services daemon: contains connector service configuration.
- Scheduler jobs: job store cleaner and results processor.
Also there are some parts installed on behalf of the UI, see User Interface Configurations.
After installation, please run by these configurations and change them to the project's requirements. Normally, changes from the defaults should be propagated from the local development environment to the various environments you have, using the bootstrapping mechanism. Manual reconfiguration of your environment is also an option.
The configuration regarding your projects supported languages and document types resides here in the repository.
The first thing that needs to be configured is to make the add-on aware of your project's namespace. To do this, open the CMS console and set this property:
The configuration value is a JSON object holding an array of your project's namespaces. The property "value" type String. Multiple namespaces are possible, using comma separation between multiple quoted values.
Enabled languages, document types and fields
As admin, use Control Panel > Manage Settings, translations tab for the remaining settings. Usage of the Settings Management plugin is recommended, but not mandatory.
- In the "Languages" section, select the languages that documents can be translated to. The section contains the available CMS languages from the localeProviderService,.
- In the "Document types" section, select the document types you wish to create translations for.
- In the "Fields of enabled document types" section, select per enabled document type the fields that are enabled for transaltions. Read more about which fields to enable for translation.
Don't forget to click Save to store the settings.
Please note: Compound fields can only be enabled or disabled as a whole, so not at the individual subfield level. This also goes for fields using the Content Blocks plugin.
The configuration of a services daemon that instantiation multiple services, of which the connector is to be configured in the project, resides here in the repository:
All subnodes represent services that are instantiated by the daemon. The one that needs project specific configuration is the connector, in subnode translationsaddon:connector.
It is possible to set up environment specific configurations for the services, most notably for the connector. It means that if repository data has moved from the production environment to another environment, no adjustments need to be made on the target environment configuration.
The daemon determines a system property name by the environment.system.property property from above daemon configuration node, defaulting to hippo.environment. If a system property by that name exists, its value will point to an optional subnode of the service configuration, of type hipposys:moduleconfig, which may contain overriding configuration properties.
For instance, if -Dhippo.environment=production, the following Livewords set up will connect to a live Livewords API only on production. Other environments will connect to the test Livewords API.
/hippo:configuration/hippo:modules/translation-services-daemon/hippo:moduleconfig translationsaddon:connector/livewords.api.url=https://test.api.livewords.com translationsaddon:connector/production/livewords.api.url=https://live.api.livewords.com
The configuration regarding two scheduler jobs resides here in the repository:
In the subnode TranslationJobStoreCleanup a scheduler job is configured that removes completed or archived translation jobs of a certain age from the job store at /translationsaddon:jobs containing translation requests. There are its settings:
|Path below TranslationJobStoreCleanup||Default value||Description|
Value for hipposched:attributeNames/daysToLive, defining the age, in days, of translation jobs that will be deleted.
Value for hipposched:attributeNames/batchSize, defining the size of a batch of job deletions that is saved in an iteration until all are deleted.
Value for hipposched:attributeNames/searchLimit, defining the limit given to the query that searches for the jobs.
|hipposched:triggers/nightly/hipposched:enabled||true||Enables the nightly trigger.|
|hipposched:triggers/nightly/hipposched:cronExpression||0 0 5 1/1 * ? *||Trigger expression for the nightly cleanup, set at 5 AM.|
In the subnode TranslationResultsProcessor a job is configured that polls for ready translations in the external system. There are these settings:
|Path below TranslationResultsProcessor||Default value||Description|
|hipposched:triggers/every-minute/hipposched:enabled||false||Enables the every-minute trigger.
Please do enable when using the GlobalLink and Star connector!
|hipposched:triggers/every-minute/hipposched:cronExpression||0 0/1 * * * ?||Trigger expression for the processor, set at every minute.|
In the subnode RetryTranslationRequests a job is configured that searches for translation requests that failed to be sent to the external system, then tries to resend them. There are these settings:
|Path below RetryTranslationRequests||Default value||Description|
|hipposched:triggers/minutes/hipposched:enabled||false||Enables the trigger.|
|hipposched:triggers/minutes/hipposched:cronExpression||0 0/3 * * * ?||Trigger expression for the processor, set at every 3 minutes by default.|
|hipposched:attributeValues||5||Value for hipposched:attributeNames/maxRetry, indicating the maximum number of times a translation request will be tried to resend.|
Configurations regarding the editor UI reside at:
Configurations regarding the search UI reside at:
Configuration regarding the dashboard UI resides at:
/hippo:configuration/hippo:frontend/cms/cms-static/translations // number of items shown on the page - (Long) panel.pagesize=12