Zum Hauptinhalt springen
Version: 6.18

Automatic translation (#665385, #666180)

The Web Admin Suite now includes a feature for automatic translation of localized names and descriptions for all entities which have these attributes and for portal configurations. This feature requires an LLM or DeepL as translation provider. It facilitates localizing ConSol CM into other languages as the user does not have to type in all translations manually anymore.

warnung

The translation provider is not part of the ConSol CM delivery. You need to provide your own API keys.

Web Admin Suite changes

If a translation provider is configured, the Translate button is shown next to fields which hold localized text. Clicking the button will automatically generate a translation of the field value into the other configured languages.

warnung

If the other languages already contain values, the existing values will be overwritten.

In addition, the Translate button is shown next to the field holding the internal / technical name. If clicked, the translation provider will provide a user-friendly label for the technical name and use it as a localized name in the default language. In addition, this text will be translated into the other languages.

On the Portal configurations page, the Translate icon is available on the Files tab of the portal configuration. It opens a modal window where the user can select the source language and one or several target languages. It is recommended to use English as a source because this usually yields a better translation quality. Using DeepL is quicker than using an LLM for translation. The JSON files for the selected language are created automatically. The multilingual JSON files, such a public.json and welcome.json are extended by attributes in the new language.

Configuration

For configuring the feature, you need to set the new system property translationService.provider of the module cmas-core-server to LLM or DEEPL.

If DeepL is used:

  • The current URL of the DeepL API is added by default to the system property translationService.deepl.apiUrl. You only need to modify it if there are changes on DeepL side.
  • Provide your API key in the system property translationService.deepl.apiKey.
warnung

The Privacy Purger is not used with DeepL.

If an LLM is used:

  • Configure the LLM on the LLM connections page.
  • If you do not want to use the default connection, enter the connection name in the system property translationService.llm.configurationName.
  • The prompt used for translating the text with the LLM is called translation prompt. It is created automatically as a system prompt on the Prompts page. You can fine-tune the prompt or use a custom one by creating a prompt and setting it in the new system property translationService.llm.promptName of the module cmas-core-server.
  • The system properties translationService.llm.debugEnabled and translationService.llm.jsonSchemaEnabled are used for troubleshooting only. You do not need to modify them.

Scripting enhancements

The ConSol CM API has been extended by a method to generate automatic translations. This method can be used to implement workflow activities or visualizations to translate text, e.g. incoming emails.

The class TranslationService with the method translate has been added for this purpose. There are two signatures of the method which can be used to translate a string into one or several target languages.

The following example translates some text from English to German:

translationService.translate("my text", "en", "de")