Translations (Localization)

Digital supports localizing surveys into multiple languages and displaying the appropriate translation based on the user's locale. Localized surveys define a default language for the elements and then any text is translated into as many languages as necessary. A localized survey's structure remains identical for all languages, only the text shown in survey form elements is changed. A single localized survey is preferred over duplicating surveys for each language.

Note: If localization for reporting is not set up in Experience Cloud using the Localization screen, Experience Cloud defaults the reporting language to English. If surveys in Digital are set to Spanish, for example, and localization is not determined in Experience Cloud, comments for a survey in Spanish would appear in English in reporting.

Reporting translations have limitations related to ad hoc fields. See your Digital expert for details.

Use the Digital Command Center to export all of the text strings from a survey in Microsoft Excel or CSV format. This localization file contains a table with the strings required for translation, and the equivalent translated strings are added to a new column in the file. Medallia recommend working with a professional translator when localizing. Import the file with the translated strings back into Digital and the localized survey is immediately available. One major advantage is that the website where Digital is embedded does not need to be changed to add the new language because the survey's FormID remains the same. This simplifies managing surveys, and how they are targeted.

Important: If you change and update the default language version of a survey, you also need to update the questions in the corresponding translations. When updating translations, make sure to keep the question identifier the same and only change the translation wording. This identifier is integral to the strategic surveys being imported to Medallia.

Defining languages

By default, the Digital survey localization feature identifies languages based on IETF language tags in the format language-country, where language and country are each a two letter code separated by a dash. For example en-uk is English language from the country United Kingdom, or pt-br is Portuguese language from Brazil, and so on.

Each localized survey has a default language that defines the initial version that is displayed if no other matching language is detected. By default, when a localized survey is the candidate to be displayed, Digital selects a translation depending on the language and country reported by the respondee's locale. For example, if the locale language is set to Spanish and there is a Spanish translation, Digital displays the survey text in Spanish. The country is used as a secondary identifier, a survey with translations into Portuguese from both Portugal and Brazil is shown to users in each country as appropriate.

If a localized survey is triggered and there is not a matching country, but there is a match to a language then this translation is used. For example, a suppose a survey has a translation into the Spanish language (sp) but there is not a Spanish Argentinian (sp-ar) translation. If the locale is sp-ar then although the translation does not match the country, it first falls back to using the matching country - the Spanish translation, before falling back to using the default language.

Because there are inconsistencies in how different countries and regions are returned, it cannot always be guaranteed that Digital matches the language and country desired. An alternative solution is to use a custom parameter that specifies the desired translation.

Text direction

Tip: Optionally, Digital can automatically detect the text direction of a translation. See your Digital expert for details.

When translations exist for languages which are both right-to-left (RTL) or left-to-right (LTR), Digital detects the text direction and the survey elements are aligned correctly. This checks that all text related to fields, labels, descriptions, error indications and so on are correctly aligned. Buttons, the close "X" and so on are also aligned correctly to the left when using different translations of the survey.

Note: Automatic text direction applies to Digital Web properties only.

For example, this survey defaults to using Hebrew, an RTL language, and the form elements have been aligned to reflect this:

Survey editor with a survey in RTL language.

A survey that has been translated into an RTL language is displayed in the following ways:

  • Text for an always-on button is flipped in RTL languages.

  • An example invitation in a desktop web browser.

    Desktop browser with an invite in RTL language.
  • An example invitation in a mobile web browser.

    Mobile browser with an invite in RTL language.

Survey localization settings

Open the localization settings by clicking the options menu for a specific survey in either the card or list view and selecting Translate.

Translate option for a survey.

The localization settings configure the default language, how a translation is determined and the list of available languages that this survey has been translated into.

Localization settings.
Important: Changes are not persisted until you click Save.

Use the options to work with localization files and to add a language to this survey.

Localizing a survey

To localize a survey, follow these steps:

  1. Configure a default language.

  2. Add the new language, optionally based on an existing translation.

  3. Configure how the translation is chosen. Either use the default that relies on the respondee's locale settings or optionally add a custom parameter.

  4. Export the survey to a localization file.

  5. Translate the strings and add them to the localization file.

  6. Import the file back to Digital.

Selecting the default language

The default language for a survey is used when Digital determines that a survey has not been translated into the language reported by the respondee's locale. The default language for a survey is determined during survey creation. For old surveys, the default language is English (United States).

On the Form Localization screen select an option from the Default Language dropdown.

Default language dropdown.

The languages defined within Digital must contain a country and language (for example, 'en-us').

Note: The default user interface language in Digital Command Center is English, but there is no requirement to have English as the default language for surveys.

See defining languages for more information.

Language determination method

When a localized survey is the candidate to be displayed, Digital chooses from the available translations. By default this is based on the browser's locale, which consists of language and country settings. Select from the following methods to determine a survey's language:

  • Browser's locale settings

  • Custom parameter

Language determination method options.

If you select User's browser locale, Digital uses the browser's settings.

Language settings for Chrome browser.

If you select Custom parameter, the custom parameter must be of type Text attached to the survey or to all surveys. The custom parameter's value must be an IETF language tag in the format described at defining languages. See Custom parameters for additional information.

Languages table

The languages table contains a list of translations supported by the survey.

Languages table.

Add language (1)
Click Add language and select the language to add in the dialog that opens. It is also possible to copy an existing translation into the new language. For example, if you are adding the 'French (Canada)' language, select French (Canada) from the Form Language dropdown and select French (French) from the Duplicate Translations from Language dropdown.
Delete language (2)
To delete a language from the table, hover over that language and click the delete icon. Confirm the deletion in the message that opens.
Note: The default language cannot be deleted from the table.
Export (3)
Click Export and select either Export to CSV or Export to Excel (.xlsx). The localization file can be sent out for translation.
Import (4)
Click Import to select the localization file that contains the translated content. The survey can contain one or more languages for translation. After the import process has completed successfully, a message appears. Click Save to persist the changes. If any errors occurred, a message appears listing those errors. See Importing the localization file.

Adding a language

Before exporting a localization file to work with a translator, add the new language. Use the Duplicate Translations from Language option to copy the values from an existing translation. When this option is selected, the new language column in the localization file is automatically populated with the values of an existing translation. Use this option when adding a new translation such as a specific dialect of English, where only certain words need to be translated, for example the difference between "color" and "colour".

  1. In the Translation Settings dialog, under Available languages click +Add language. The Add language dialog opens.
  2. Under Language, select a language from the menu. The list of languages shows the name and the IETF language code.
  3. Optionally, under Duplicate Translations from Language select a language from the menu to use an existing translation as the base for the new translation.
  4. Click Add. The Add language dialog closes and the new language is visible in the list of languages.

Exporting a survey's fields

Use the Export button in the languages table to export all of the text strings from a survey in Microsoft Excel or CSV format. This localization file contains a table with the strings required for translation.

Open the localization file in an editor and identify the column which contains the newly added language. Each populated row represents one of the fields in the survey that has a text element. In the column for the new language, add the equivalent translated strings for each of the rows in the file.

Localization files

The localization process relies on a file that you export and import to Digital. Observe the following while using localization files:

File format

Using CSV with Microsoft Excel can result in issues because it only imports CSV in an ANSI format and this can negatively impact moving the file between Excel and Digital. Medallia recommend using Microsoft Excel .xlsx format for both export and import, maintaining UTF-8.

File structure

The structure of a localization file that has been exported as Microsoft Excel format and opened in a spreadsheet program looks similar to this:

Localization file opened in a spreadsheet program.
Settings (1)
Contains the description the translated area or internal field ID. This column should not be modified.
Translated fields (2)
Describes the translated field (for example, the Close Button label). This column should not be modified.
Default language column (4)
Contains all the source strings required for translation in the defined default language ('US English' by default). This column should not be modified.
Additional language columns (3,5,6)
The column header contains the relevant language locale (for example, ja-jp or pl). The rows contain the translated strings. When adding a new language, use one of these columns and add the translated strings to it. The strings in these columns can be modified.

HTML encoded strings

Depending on the survey that is being localized, some of the cells in the translation table could contain encoded HTML. For example if a survey contains a privacy policy notice or an introduction text, this is also part of the exported text which should be translated. Such text appears in the translation table using HTML encoding, for example:

&ltp&gt&ltspan style="font-size:18px"&gt&ltstrong&gtWe value your feedback!&lt/strong&gt&lt/span&gt&lt/p&gt

When adding a new language, the text in this kind of cell must also be translated, but the HTML structure must not be changed. In the example shown, only the text "We value your feedback!" should change in the translated cell - the surrounding encoded HTML must remain the same. For example adding a translation to the Czech language requires a cell with:

&ltp&gt&ltspan style="font-size:18px"&gt&ltstrong&gtCeníme si vaší zpětné vazby!&lt/strong&gt&lt/span&gt&lt/p&gt

Importing the localization file

Once a new language has been added to the correct column in a localization file, in the Digital Command Center's Translation Settings dialog, use the Import button to import the file. When importing a localization file back into Digital observe the following:

  • The structure of the localization file must match the current state of the survey. Do not add more columns, change the order of rows, and so on. Click Export again to save the original version and compare the files.
  • File encoding should be UTF-8 if using a CSV file.
  • The language code in the file must exist within the languages table in the dialog. It should be in the language-locale format (for example 'en-uk'). Importing a translation without adding the language to the survey results in an error.
  • No script or embed tags within rich text fields are allowed.
  • All fields contain a translation. Empty fields are reflected within the survey.
  • The import process validates the file initially, but do not forget to click Save in the form localization screen to persist the changes.