Translating workflows
You can translate workflows in any of the supported languages by adding custom strings for those languages and leveraging the workflows Java API translation bean. This enables users with a language preference that matches the translation to see the workflow tasks that are assigned to them in their selected language.
To use custom strings, you must prepare your workflow for translations:
Task name*
Field: Name
Value: A string that identifies the task name
Example: user.task1.name
user.task1.name=The translated name of the task
Task description*
Field: Documentation
Value: A string that identifies the task description
Example: user.task1.description
user.task1.description=The translated description of the task
Form fields
Field: Form component fields in the General section, such as:
Label
Label tooltip
Default value
Description
Value: The expression
{{translation.getMessage('translation.key')}}Example:
{{translation.getMessage('text.area.label')}}
text.area.label=The translated label of the field
Form buttons
Field: Form outcome Label
Value: The expression
{{translation.getMessage('translation.key')}}Example:
{{translation.getMessage('button.name')}}
button.name=The translated name of the button
Email task
Field: Email properties, such as:
Subject
Body
Value: The expression
${translation.getMessage('translation.key')}Example:
${translation.getMessage('email.body')}
Emails are translated into the preferred language of the user who completes the task, not the recipient.
email.body=The translated body of the email
Field: The Script of a script task
Value:
translation.getMessage('translation.key')Example:
import com.collibra.dgc.workflow.api.exception.WorkflowException
def customError = new WorkflowException("translation.getMessage('error.description')")
customError.setTitleMessage("translation.getMessage('error.title')")
throw customError;
error.description=The translated description of the error
* Start forms display the process name instead of the task name and description. You cannot translate the process name.
If you are not yet using the Workflow Designer, you can achieve similar results with the Eclipse plug-in by changing the expression format to ${translation.getMessage('translation.key')}.
Last updated
Was this helpful?