You can customize the blog, blog library, or wiki template to add NLS strings.
1. Click
Applications > Content > Web Content Management.
2. If the blog, blog library, or wiki portlet has not been configured, click
Edit Shared Settings.
3. Expand the Library Selection area to select the appropriate template to add to the library. Select
Blog Solo Template,
Blog Template, and
Wiki Template, and click
Add.
4. Click
OK.
5. In the Library drop-down menu, select the template that corresponds to the Web Content Library that you would like to customize. For example, select the
Blog Template for a blog library,
Blog Solo Template for the blog, or
Wiki Template for a wiki.
6. Expand
Site Areas > By Site. Choose the topmost site that is shown, and edit this site.
7. Click
Edit > Manage Elements.
8. If the new string is plain text that you plan to add, select
Short Text from the Element type drop-down menu. If the new text string uses HTML or Web Content Management components to create the text, select
HTML from the Element type drop-down menu.
9. Enter a name for the new text in the Name field. You will use this name later in the instructions to look up this element as a key in the properties file.
10.
(Optional) Enter an optional Display title for the new element.
11. Click
Add > OK.
12. Find the text field for the element that you just created and enter the desired text string. The blog or wiki templates contain English text by default. When you are finished, click
Save and close to save the changes to the template site.
13. Modify the Web Content Management presentation template or component that will use the new text to reference the element that you just created. The element syntax is as follows:
where the key name needs to be replaced with the name that was used in step 9 when creating the new element.
For example, return to the
Web Content tab, select
Wiki Resources as the library, and click on
Presentation Templates. Select
Wiki Page and review the HTML entered in for the Presentation Template to view an element reference for the LastUpdated string.
14. Enter the translated version of the new string. Locate the wp.wcmbw.feed.jar typically installed on your IBM® WebSphere® Portal server in the following directory:
install_directory/portalserver/base/wp.wcmbw.feed/shared/app
Note: Create a backup copy of the jar file before updating it.
15. Extract the properties files from this jar using a zip archive utility program. The bwcontent.properties file is the default fallback file that needs to have the new string added to it.
Note:
- For any other languages that you wish to support, you will need to modify the properties file that correspond to the correct locale designation. For example, to support Spanish users you need to add the new string to the bwcontent_es.properties file. To support French users, the new string needs to be added to the bwcontent_fr.properties files.
- The new string needs to be added in typical Java properties file key/value fashion where the key is entered first. followed by an equals sign, and then the actual string to display in that locale. For example, the text for the Create Blog button in English is entered:
NewBlog=Create Blog
where NewBlog is the element name (key) used back in step 9 and "Create Blog" is the text (value) to display.
15. After all of the strings have been added to the matching properties files for all the locales that you plan to support, update the wp.wcmbw.feed.jar file. Use the zip archive tool to update the changed properties files located inside the jar. Ensure that the path name on the updated files remains com\ibm\wps\wcm\blog\resources.
16. Replace the wp.wcmbw.feed.jar file on your WebSphere Portal server with the updated version, and restart the WebSphere Portal server. New instances of the blog, blog library, or wiki template added to pages will display the customization that you added for modified locales.
18. If you already have instances of the blog, blog library, or wiki that you would like to have the same updates, you will need to select that library instance in the Web Content Authoring portlet and repeat steps 6-12 with the following changes:
Step 6 - No changes. Follow the directions selecting the existing library instance.
Step 7-11- You must choose HTML as your element type and follow the remainder of the instructions.
Step 12 - The text string must be entered inside an HTML span element as follows:
text
where name in the class attribute must be replaced with the key name used in step 9 and text is replaced with the new string value.
Here is an example of the Create Blog button text:
Create Blog
Optionally to see the correct text string that should be used, you can create a new instance of your modified template using the theme customizer, and review the site elements to see the span formatted value that needs to be used. Delete the new library instance after examining its site elements if the new library instance is not needed.