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.
Settings
The configuration regarding your projects supported languages and document types resides here in the repository.
/translationsaddon:configuration/
Project namespace
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:
/translationsaddon:configuration/namespaces/value={"namespaces":["yournamespace"]}
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.
Services daemon with the connector
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:
/hippo:configuration/hippo:modules/translation-services-daemon/hippo:moduleconfig
All subnodes represent services that are instantiated by the daemon. The one that needs project specific configuration is the connector, in subnode translationsaddon:connector.
For detailed configuration, see the LiveWords connector, the GlobalLink connector or the Tester connector.
Environment specific connector configurations
Since version 2.1.0, 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
Scheduler jobs
The configuration regarding two scheduler jobs resides here in the repository:
/hippo:configuration/hippo:modules/scheduler/hippo:moduleconfig/translationsaddon/
TranslationJobStoreCleaner
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 |
hipposched:attributeValues[1] |
365 |
Value for hipposched:attributeNames/daysToLive, defining the age, in days, of translation jobs that will be deleted. |
hipposched:attributeValues[2] | 100 |
Value for hipposched:attributeNames/batchSize, defining the size of a batch of job deletions that is saved in an iteration until all are deleted. |
hipposched:attributeValues[3] |
1000 |
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. |
TranslationResultsProcessor
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 connector! |
hipposched:triggers/every-minute/hipposched:cronExpression | 0 0/1 * * * ? | Trigger expression for the processor, set at every minute. |
User Interface Configurations
Configurations regarding the editor UI reside at:
/hippo:configuration/hippo:workflows/translations-workflow /hippo:configuration/hippo:frontend/cms/cms-preview/workflowPlugin/workflow.categories=translations-workflow
Configurations regarding the search UI reside at:
/hippo:configuration/hippo:workflows/translations-workflow /hippo:configuration/hippo:frontend/cms/cms-advanced-search/workflowPlugin/workflow.categories=collection-translations-workflow
Configuration regarding the dashboard UI resides at:
/hippo:configuration/hippo:frontend/cms/cms-static/translations - (Long) panel.pagesize=12 // the number of items shown on the page