You can create an application that displays alert names, category names, and bookmark names as localized text by leveraging the User Resources feature.
Define property entries in a resource bundle file UserResources.properties, which is included with WebSphere Dashboard Framework. When the Alerts module displays the names, it will try to find the matched text in UserResources.properties using the stored name.
If the corresponding text is found, then it will be displayed; otherwise, the original text is displayed. The following steps describe how to localize an alert name. You would perform similar steps for a category or bookmark name.
- Create a project that includes the Alerts feature set.
- Define a new alert definition in Manage Alerts portlet, such as "my_sample_alert."
- Open the UserResources.properties file stored in the WEB-INF/work/source/com/bowstreet/solutions/alerting/admin directory.
- Add a new entry for"my_sample_alert=My Sample Alert" and save the file.
- If the project is set up to deploy automatically, the changed UserResources.properties file should deploy automatically to the portlet WAR directory. Otherwise, you need to copy the changed file manually from the project to the portlet WAR.
- Restart the WebSphere Portal server or the Web application to put the changes into effect.
- Log in to the server to see the alert definition name "My Sample Alert."
If you want to provide the names in other languages, you need to provide translated resource bundle files for each language, such as UserResources_zh.properties for Chinese.