Internationalization

Creating the survey

To conduct a survey in multiple languages, you create one survey in each language, following a naming convention. The English language survey may be named any way you like, such as "Service_Satisfaction". The surveys in other languages are named using the same name plus a suffix, which consists of two underscores and the lower case two letter language code, such as Service_Satisfaction__es, Service_Satisfaction__fr, Service_Satisfaction__de for Spanish, French and German, respectively. It's easiest to develop the first survey and finalize it before translating it. Once the questionnaire has been agreed upon, create the translated surveys by copying the original one. You will always refer to the English survey, Service_Satisfaction.

The Survey portlet will determine the user's language from the user's Locale, and if it is other than English, will append the two underscores and the two letter language code to the survey so that the properly translated survey will be displayed to the user. If there is no translation for the survey, it will not be shown to the user at all and the user will instead see "no survey scheduled" in the portlet.

If you want to analyze survey data by language, include a hidden question in the survey and set it to the language code, eg "en", "es", and use the hidden question as the control variable in Cross Tabulations.

Translating messages

Messages shown by the portlet like "Take Survey" and "Survey already completed" are translated using resource bundles located in the portlet's /WEB-INF/classes/com/cogix directory. English messages are in Portlet.properties and other languages are in files named Portlet_xx, where xx is the language code, such as "es" for Spanish. Copy and translate these files into other languages as needed.

Other messages such as the Submit button text, which are used by both portlets and stand-alone surveys outside a portal, are translated using resource bundle files in ViewsFlash's WEB-INF/classes/com/cogix/vwflanguage. English messages are in Text.properties and other languages are in files named Text_es, etc. Copy and translate these files into otherlanguages as needed.

Activating internationalization

To enable internationalization, go to the Portlet Configure page, select the survey without a language designation such as "Service", check the Use language from Locale box, and press Save.
Check use language from locale