Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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

Background:

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 http://help.sap.com

(http://help.sap.com/saphelp_nw73/helpdata/en/49/dba57d5dba551de10000000a42189c/content.htm)

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 "ResourceBundleFileName.properties", and the other file’s name is "NewResourceBundleFileName.properties", and the second one was loaded last,

Only values from NewResourceBundleFileName.properties 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.

2 Comments