Resource bundles are usually stored in property files. However, as property files are plain files, issues with the encoding of the file may arise. The XML resource bundle format has been developed to provide an alternative to property files.
-
The XML format declares the encoding of the file. This avoids use of the native2ascii program which can interfere with encoding.
-
Property files generally use the ISO 8859-1 character encoding which does not cover the full unicode charset. As a result, languages, such as Arabic, would not be natively supported.
-
Tooling for XML files is better supported than the tooling for Java property files; thus, the XML editor copes well with the file encoding.
Portal support
To be loaded by the portal at runtime (actually the resource bundle service), the name of the file must be the same as a property file and it must use the .xml suffix.
For example, for the Account Portlet to be displayed in Arabic, the resource bundle would be _ AccountPortlet_ar.xml_ rather than AccountPortlet_ar.properties.