Override a provided resource bundle to modify the text that is displayed on
your storefront widgets.For this customization example, the storefront header widget
text is changed from "Sign In" to "Log In". To change this text, you must locate the resource bundle
key and assign it a new value within the custom store web archive.
Procedure
-
Locate the default resource bundle key for the text that you want to change.
-
Open the widgettext.properties within the IBM provided store web archive
(crs-web.war) with a text editor.
-
Find the key for the text that you want to change.
For example, GLOBALLOGIN_SIGN_IN_OR_REGISTER
.
-
Override the default text for this key by including a substitution in the custom store web
archive (crs-web.war)
- In the custom store web archive, navigate to
/src/com/ibm/commerce/stores/widget/properties/ directory.
- Open the widgettext.properties property file with a text editor.
- Add the new key-value pair:
GLOBALLOGIN_SIGN_IN_OR_REGISTER = Log on /
Registry
.
Note: widgettext.properties is the default resource bundle for the widget. To
add or change translatable text, use a locale-specific property file. For example, if your store is
available in three different languages, including US English and French, you must ensure that the
appropriate key values are included in both widgettext_fr_FR.properties and
widgettext_en_US.properties.
-
Restart the Store server.
Results
When you visit the modified storefront, the header widget now displays the custom text that
was added to the overriding resource bundle in the custom store web archive.