Configure Translations in Manager

   MaestroThe UI design product.  |   Form Builder |  All versions This feature is related to all versions.

For forms that support multiple languages, you have an option to store their translation files in Journey Manager, as opposed to keeping them with the forms, inside FAR files. The end result is the same - form users are able to switch between different languages, but behind the scene, the forms pull a required translation file file from Manager, depending on a language selection.

You can create and even edit a language definition in Maestro, but then upload it to Manager as a CSVCSV is a comma-separated values fil, which s a delimited text file that uses a comma to separate values. A CSV file stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. file. This gives you a great flexibility in providing translated versions of forms without redeploying them and even in real-time. Also, you can use a third party to generate or translate a CSV file.

When a form user switches between available languages, the form pulls a CSV file of a selected language from the server. Even though translations are configured outside of Maestro, the form still needs to have the Select Language dropdown or the Select Language component with the correct language options configured, and the new languages must be created in the Translation window. However, you don't need to enter any translation values in Maestro as that will be done directly in the CSV file.

Once the translation file is prepared, you need to store it in Manager in one of the following locations:

  • Form Space resources directory
  • Organization reference data
  • Form property

Let's look at each of these approaches in more detail.

Form Space Resources

This is the default and the most straightforward way to host translations and access them via the Maestro API. All translation files will be available to all forms hosted on this form space.

To store and use a translation CSV file:

  1. Add a translation CSV file as a new resource, for example, /resources/locale-de.csv, to a form space where a multi-lingual form is hosted.
  2. Drag and drop the Select Language component on the form.
  3. Configure the component's rule as Translation.fetch("de", false, "/web-plugin/resources/locale-de.csv").
  4. Build and deploy the form.

Now, you can test the translation by selecting a language to render the form with, which will retrieve the correct language and refresh the form automatically.

If you need to modify a form's translation, all you need to do is to upload the updated translation CSV file and test the form.

Organization Reference Data

You can store a translation CSV file as a reference data of an organization that a multi-lingual form belongs to. All translation files will be available to all forms belonging to this organization.

To store and use a translation CSV file:

  1. Add a translation CSV file as a new reference data using the following configuration:
    • Name - a name of a translation CSV resource as <form-code>_<locale>, for example, apply_locale. A form code defines a form that this translation file is pertinent to.
    • Locale - a locale as defined in the CSV file, for example, de_DE. Each translation file has different locale code, such as ar_AE, to distinguish between them.
    • Cache Timeout - use the default one.
    • Data Type - CSV.
    • Click Choose File to upload the translation CSV file.
  2. Drag and drop the Select Language component on the form.
  3. Configure the component's rule to fetch the CSV file as a reference data. Alternatively, you can create a service populating a form with a correct translation based on a parameter passed in the URL, for example, &locale=de_DE.
  4. Build and deploy the form.

Form Properties

You can store a translation CSV file as a form property. All translation files will be available to this form only.

To store and use a translation CSV file:

  1. Create a new form property using the following configuration:
    • Name - a property name in a specified format, so the Select Language component can correctly match the CSV file with the selected option. For example, locale-de.csv, where de is the language ID used to create that language in Maestro.
    • Data Type - CSV.
    • Value - the content of the translation file or click Choose File to upload the CSV file.
  2. Drag and drop the Select Language component on the form.
  3. Configure the component's rule to fetch the CSV file as a form property.
  4. Build and deploy the form. Choose a language from the Select Language dropdown to verify the form content is displayed.

Next, learn how to configure a language in Maestro.