Existing Translations

The OpenClinica community provides translations for multiple locales. Each translation is comprised of a series of properties files with the translated text for the language in question, as well as other localized properties like date formats. Existing translations are accessible at https://www.transifex.com/projects/p/openclinica/.

Only English properties files are installed in OpenClinica by default. The additional translations have been contributed by community members. These translations are not all fully tested and may not have all the strings translated.  To determine if the localized files you are interested in are complete, please compare them to the files in CATALINA_HOME/webapps/OpenClinica/Web-INF/classes/org/akaza/openclinica/i18n.

OpenClinica currently has 9 properties files:

  • admin.properties
  • audit_events.properties
  • exceptions.properties
  • format.properties
  • notes.properties
  • page_messages.properties
  • terms.properties
  • words.properties
  • workflow.properties

Starting with version 3.1.3, there is an additional properties file, licensing.properties file.  Please do not translate this file.

First, you need to duplicate each of 9 properties files and renaming them by appending the locale string.  For example, in case of French, this is how the file list should look like:

  • admin.properties
  • admin_fr.properties
  • audit_events.properties
  • audit_events_fr.properties
  • exceptions.properties
  • exceptions_fr.properties
  • format.properties
  • format_fr.properties
  • notes.properties
  • notes_fr.properties
  • page_messages.properties
  • page_messages_fr.properties
  • terms.properties
  • terms_fr.properties
  • words.properties
  • words_fr.properties
  • workflow.properties
  • workflow_fr.properties
  • licensing.properties (3.1.3 or above – do not translate this file)

Pre-3.1.3, please do not translate License infomation under ‘footer.license’ in words.properties file where it notes “# DO NOT CHANGE ANY OF THE TEXT BELOW”.

Installing a Translation

Once you are satisfied with your translation, place the localized properties files in your i18n folder (CATALINA_HOME/webapps/OpenClinica/Web-INF/classes/org/akaza/openclinica/i18n) and restart Tomcat. When a user changes the preferred language in the user’s web browser to match the locale in the format_xx.properties file, the user will see the translation into that language.

Please note: even though you have no intention of using the original English strings and wish to use only translated GUI, OpenClinica may break if you modify the original properties files.  Instead, you need to create localized versions with ‘_xx’ i18n marker as described above.

Which Language will be displayed in the User Interface (UI)?

OpenClinica determines the locale/language to be displayed based on two conditions: user language preferences and the availability of nine OpenClinica properties files in the desired language.

English (en) language is the default language.

The user’s browser language setting determines the language priority for OpenClinica. For locale lookup, OpenClinica adhere to W3C rules which are based on RFC 4647. And also this locale must have all of nine OpenClinica properties files available in the i18n folder.

Browser Language Preferences

Installed Localized Properties files

Displayed Language

  1. English [en-us]
  2. French [fr]
  3. German [de]
  4. English [en]

English (default)

_fr.properties (French)

_en-gb.properties (United Kingdom)

English [en]

Even though ‘en-us’ is not installed, you “progressively truncate” the user’s top priority language range until you get a match, which would be en = en.

  1. German [de]
  2. French [fr]
  3. English [en]

English (default)

_fr.properties (French)

_en-gb.properties (United Kingdom)

French [fr]

German [de] is not installed so French [fr] is taking effect that is the 2nd on the list.

  1. Chinese [zh]

English (default)

_fr.properties (French)

_en-gb.properties (United Kingdom)

 

English [en]

Chinese [zh] is not installed so the default, English is taking effect.

  1. United Kingdom [en-gb]

English (default)

_fr.properties (French)

_en-gb.properties (United Kingdom)

United Kingdom [en-gb]