Skip to Content
Author's profile photo Former Member

Why you shouldn’t use resource bundles with similar names

In this blog I would like to discuss a simple work around for a program limitation.


Using resource bundles enables portal applications to be displayed in different languages, you can create resource bundles that hold all language- or country-specific text strings or other resources.

In addition, you can create different resource bundles for each locale-country combination that you want to support, and then add these resource bundles to your WAR file. Your components can retrieve strings or other resources from these files.

Adding resource bundles to war file:

To add your resource bundles to a war file you need to:

  • Place resource bundles in PORTAL-INF/private/lib (when packaged in JAR files) or in PORTAL-INF/private/classes (as individual files). The file extension is .properties.


  • Define the name of the runtime resource bundle in the ResourceBundleName profile property in the portalapp.xml file.


For more information about using resource bundles please refer to


Limitation description:

When loading two resource bundle files that one of the file names contains the name of the other file, the system will load the values from the last loaded file only.

For example:  If one of the file’s name is “”, and the other file’s name is “”, and the second one was loaded last,


Only values from will be used.

Suggested Workaround:

In order to avoid this situation, make sure that the names of your resource bundle files are different and avoid situation where one file name contains the name of the another file name.

As demonstrated below – none of the file’s names contains the name of another file.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Tobias Hofmann
      Tobias Hofmann

      Thanks for sharing.

      This limitation is because of Java or NetWeaver specific?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Tobias

      This is a NewWeaver specific limitation