In this article
Customers who have licensed the Translation add-on also have access to menu options enabling the export and import of XML files containing texts from the Survey. This functionality is an alternative to using the translator interface, and it allows you to perform translations off-line and import them back into the survey’s survey definition. Access to the XML export/import function is controlled by a user-permission when setting up the license so that customers can control which users can access the feature.
Note: Email invitations and Email node objects created in Forsta Designer are not included in the Export Translation XML, but can be translated via the Translator module instead (or within Designer).
- When you have created the survey definition in the base language, for example English, go to the Translation menu and select Export Translation XML - .
- Specify the email address to which the XML file is to be exported.
- Select the language from the Target language drop-down.
- Select the language that the translator is to use as the base language. Ensure that you choose a language in which the survey definition is complete!
- On completion, click OK.
Figure 1 - Selecting Export Translation XML
Note: You do not have to select the other survey languages in Survey Management > Overview > Languages. These will be added automatically when you import the XML translations for these languages.
The Export Translation XML overlay opens - .
Figure 2 - The Export Translation XML overlay
Existing survey languages (added in Survey Management > Overview > Languages, but not necessarily containing texts in the survey definition) are displayed in the Base language drop-down.
If not all texts have been translated/filled in for the base language you have selected, the fallback language offers to fill in where there are blanks in the base language (provided that these texts exist for the fallback language).
The following are some general guidelines to help you avoid errors and to ensure the best result when using the Translation XML functionality:
- Before translating a survey, always complete it in one language first.
- Changing the survey while it is being translated may disturb the translation process. You may then have to translate the entire survey, or parts of it, again. It will also be very difficult to keep track of which parts of the survey have been translated and which have not. For example: if while someone is translating your survey from English to German you change the answers to a question, once the completed translation is uploaded, the answers will mean something entirely different in German than in English because the German translation is based on an earlier revision of the English version.
- If you need to change the survey while in translation mode, you are recommended to make a new Translation XML export after all the changes have been completed.
- If possible, avoid duplicating a survey that will later be translated, and avoid basing your new survey on a duplicate of another survey.
- Once a survey is duplicated, it will share survey elements with the duplicate. This means that the Object IDs of the various parts of the original version of the survey will be the same as those of the duplicate (these are the same as the Object IDs used in the TranslationXML). However, once an object in either the original or the duplicate changes, it will be assigned a new Object ID as it can no longer share this object with the original/duplicate. If you were translating a survey in TranslationXML at this point, the Object ID of that object would now be invalid. This is not a major concern as the primary identifier for a survey element is its name. However there are a few survey elements (answers, scales, predefined list elements) that do not have their own names, and if these elements’ Object IDs have changed, they will try to use the code attribute as the identifier. So, if you need to duplicate the survey, make sure all answers and scales use codes.
- An alternative to duplicating the survey is to export the survey definition and then import it back. This has exactly the same effect, but avoids the above-mentioned problem.
- Use only one translation tool for one survey; do not use Translation XML, Translator, and direct translation in the designer at the same time. This will introduce undesired side effects and make it very difficult to keep track of which part of the survey has the latest translation in a given language.
- Always use codes on Answers, Predefined Lists, and Scales when building the survey. This will reduce the possibility of undesired side effects when making changes in the survey while it is being translated.
- Script nodes are not included in TranslationXML. Any language-transparent text in script nodes must be avoided. Script nodes are not set up to have a different version for each language (as for example a question title is). It is therefore very difficult and cumbersome to maintain language-sensitive texts in script nodes.
- Never translate the name attribute of an element in the Translation XML. This is the primary element identifier and if this is changed you may experience problems during the import.
- Validate and verify the TranslationXML before uploading it.
- Review the survey log to see the changes that were applied on a TranslationXML import.
- The simplest way to add a new language to the survey is to order a TranslationXML export with the new desired language as the target language, translate this, and import it back in.
When the translator receives the XML file, he/she can start translating the base language texts into the target language. The name of the XML file indicates the target language. It usually consists of the survey ID and the Forsta language code, for example pXXXXXXXX_20.xml, where 20 is the code for Norwegian.
When translating, the translator simply writes over the base language texts. The example below shows the translator overwriting the original Norwegian text with the English translation.
Figure 3 - Translating in XML
When the translator has finished the translation, the XML file can be uploaded into the survey to add the new language. To achieve this, activate the survey then go to Translation and choose the Import Translation XML option, browse to the file, and upload it into the survey. The upload file may have any title, and it may be uploaded as an .xml file or a .zip file that contains an .xml file.
Note: If you leave a field blank in the Translation XML file and import it, this field may not be blank after the import. This is because during the import your Translation XML file is merged into the survey version of the base language you selected. Therefore if you have a Translation XML file where English is the base language and Norwegian is the target language and you leave, for example, the title of the first question blank before importing it back, it will use the English title. The title of that question will in other words never be overwritten with the text of the target language because the text of the target language is empty.