4.1. Internationalization configuration

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

Assumed Knowledge

eXo Platform is fully configurable for internationalization; however, users should have a general knowledge of Internationalization in Java products before attempting these configurations.

Oracle Java hosts a comprehensive guide to internationalize Java products at http://docs.oracle.com/javase/tutorial/i18n/TOC.html.

All eXo Platform applications contain property files for various languages. They are packaged with the portlets applications in a WEB-INF/classes/locale/ directory.

These files are located in the classes folder of the WEB-INF directory to be loaded by the class loader.

All resource files are in a subfolder named locale.

For example, the translations for the NavigationPortlet are located in web.war/WEB-INF/classes/locale/portlet/portal.

NavigationPortlet_de.properties
NavigationPortlet_en.properties
NavigationPortlet_es.properties
NavigationPortlet_fr.properties
NavigationPortlet_nl.properties
NavigationPortlet_ru.properties
NavigationPortlet_uk.properties
NavigationPortlet_ar.xml

Those files contain typical key=value Java EE properties. For example, the French one:

javax.portlet.title=Portlet Navigation

There are also properties files in the portal itself. They form the portal resource bundle.

From a portlet, you can then access translations from the portlet itself or shared at the portal level, both are aggregated when you need them.

Translation in XML format

It is also possible to use a proprietary XML format to define translations. This is a more convenient way for some languages, such as Japanese, Arabic or Russian. Property files have to be ISO 8859-1 encoded with Unicode escape sequences, while the XML file can define its encoding. As a result, it is easier for you to read or edit a translation in XML instead of handling the Unicode escape sequences in property files.

For more information, refer to Section 4.1.2, “ResourceBundleService”.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus