Opinio can be configured to support any language. There are two parts in Opinio localization:
Texts in the administration module
All the screen texts/labels in the system can be displayed in a language selected by the user. Users can set the language from the user profile screen. Only supported languages will be shown in the list. To add a new language you will need to create a resource file to hold your localized texts.
The resource files are located in the OPINIO_HOME/WEB-INF/classes/i18n folder.
Copy ApplicationResources.properties into a new resource file. Add your language code to the file name:
If your language uses other than latin characters, add '_native' to the end of the file name. Example: ApplicationResources_ru.properties_native
Translate all messages in the file to your language. The resource file is a text file and can be edited in any text editor. For non-latin characters the editor must support UTF-8 and the file must be saved with UTF-8 encoding.
The file contains key-value pairs. Only values must be translated.
English version:
menu.surveys=Surveys menu.userAdmin=Users menu.systemInfo=Setup
Norwegian version:
menu.surveys=Spørrenundersøkelser menu.userAdmin=Brukere menu.systemInfo=Konfigurasjon
Resource files must be saved in ASCII. For non-latin characters you will need to convert the file from native encoding to ASCII. Use built-in native2ascii Java tool to do this (it must be in one line only, but due to space limitations, it was broken up in two lines here):
native2ascii -encoding UTF-8 ApplicationResources_ru.properties_native ... ApplicationResources_ru.properties
Update file OPINIO_HOME/admin/include/supportedLanguages.jsp. Add a new line for your language:
languages.add(new OptionBean("Russian", "ru"));
System character encoding
System character encoding is the encoding for texts entered in all input fields. It can be set from the setup screen. Latin-1 (ISO-8859-1) is default. Select UTF-8 (Unicode) for non-latin characters.
If using UTF-8 encoding, check that the database supports Unicode. You might need to configure it to make it work.
MySql does not support Unicode yet. But it is possible to configure the JDBC driver to use Unicode when handling texts. You will need to add two parameters to the jdbcURL in WEB-INF/opinio.properties (it must be in one line only, without spaces, but due to space limitations, it was broken up in two lines here):
objectplanet.persistence.jdbcURL=jdbc:mysql://localhost:3306/opinio? ... useUnicode=true&characterEncoding=UTF-8
Starting in version 4.1 the MySql server will support Unicode.