Customize strings sourced in JavaScript
Replace a word or string in the product user interface that is sourced in JavaScript™ as opposed to a strings resource bundle.
About this task
You cannot use the customization debugging capability to test edited strings. Do not customize calendar strings.
Procedure
1. Many strings in the user interface are represented by a key and value pair defined in a JavaScript file stored in the application WAR file. Locate the appropriate file inside of the web application directory using the table below.Common strings
Activitiesoawebui.war
Blogs
blogs.war
Bookmarks
dogear.webui.war
Communities
comm.web.war
Forums
forum.web.war
homepage.war
news.web.war
Profiles
lc.profiles.app.war
Search
search.war
Wikis
qkr.share.wiki.war
Note: Files, Media gallery, and Moderation do not specify strings using Javascript files.
2. Copy and paste the Javascript file for the application that you want to customize into the appropriate subdirectory of the customization root directory.
For example:<customizationDir>\activities\javascript\dojo-ibm\lconn\nls\act_xx.js
- <customizationDir>\blogs\roller-ui\scripts\dojo14\dojo\nls\dojo_xx.js
- <customizationDir>\blogs\roller-ui\scripts\dojo14\dojo\nls\blogs_xx.js
- Blog widget in Communities: <customizationDir>\communities\lc-widgets-communities-blogs.war\script\lconn\communitiesBlog\nls\strings.js
- Ideation Blog widget in Communities: <customizationDir>\communities\lc-widgets-ideation-blog.war\script\lconn\ideationBlog\nls\strings.js
- Bookmarks application: <customizationDir>\bookmarks\dojo_1.4\lconn\nls\dogear_xx.js
- <customizationDir>\\bookmarks\dojo_1.4\dojo\nls\dojo_xx.js
<customizationDir>\communities\javascript\dojo_1.4.1\dojo\nls\communities_xx.js
- <customizationDir>\forums\javascript\build\lconn\forums\nls\forums_xx.js
- <customizationDir>\forums\javascript\build\lconn\forums\nls\communityWidget_xx.js
- <customizationDir>\homepage\dojo_1.4\com\ibm\enabler\nls\common_xx.js: Strings displayed in several pages in the Home page application, such as Getting Started, Widgets, and Updates
- <customizationDir>\homepage\dojo_1.4\lconn\nls\updates_xx.js: Strings displayed in the Updates page
- <customizationDir>\homepage\dojo_1.4\lconn\nls\gettingstarted_xx.js: Strings displayed in the getting started page
- <customizationDir>\homepage\dojo_1.4\lconn\nls\widgetsPage_xx.js: Strings displayed in the widgets page
- <customizationDir>\homepage\dojo_1.4\base\nls\iWidgets_xx.js: Strings displayed in widgets
- <customizationDir>\homepage\dojo_1.4\dojo\nls\dojo_xx.js: Strings displayed in base widget provided by the Dojo Toolkit
<customizationDir>\news\dojo_1.4\lconn\nls\emailDigest_xx.js: Strings for dijit in email digest preferences page
- <customizationDir>\profiles\dojo_1.4\dojo\nls\dojo_xx.js
- <customizationDir>\profiles\dojo_1.4\dojo\nls\mum_enabler_connections_xx.js
- <customizationDir>\profiles\dojo_1.4\dojo\nls\profiles_xx.js
<customizationDir>\search\dojo_1.4\lconn\nls\search_xx.js
<customizationDir>\wikis\iwidgets\CommunityWidget\nls\xx\WikiWidget.jswhere _xx is the language code representing the language used in the file.
3. Specify a language code as a suffix to the JavaScript file name. If you do not provide a _<language_code> value at the end of the file name, the value you specify for the key in the properties file is used despite the locale of the web browser accessing the application.
Use one of the following language codes:
arArabic
cs
Czech
da
Danish
de
German
el
Greek
en
English
es
Spanish
fi
Finnish
fr
French
hu
Hungarian
it
Italian
iw
Hebrew
ja
Japanese
ko
Korean
no
Norwegian
nl
Dutch
pl
Polish
pt-BR
Brazilian Portuguese
pt
Iberian Portuguese
ru
Russian
sl
Slovenian
sv
Swedish
tr
Turkish
zh
Simplified Chinese
zh-TW
Traditional Chinese
4. Open the copied JavaScript file for editing. Find the key and value pair that you want to overwrite, and replace the value with your custom text.
5. Repeat the previous step until you have replaced all of the strings that you want to change.
6. Remove any key and value pairs that you did not edit. Those will be read from the copy of the Javascript file in the application's product directory.
7. Save and close the Javascript file.
8. Using the WAS Integrated Solutions Console, restart the application associated with the file that you have changed.
9. Test your changes by clearing your browser cache, and then refreshing the browser.
10. To force all user web browsers to refresh all cached content and display your changes, run the command that updates the product version stamp.a. Enter the following command to access the IBM Connections configuration file: execfile("connectionsConfig.py")
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored. This information is not used by the wsadmin client when you are making configuration changes.
b. Check out the IBM Connections configuration files:
LCConfigService.checkOutConfig("<working_directory>","<cell_name>")
where:
- <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft™ Windows™ operating system.
AIX and Linux™ only: The directory must grant write permissions or the command does not run successfully.
- <cell_name> is the name of the WAS cell hosting the IBM Connections application. This argument is case-sensitive, so type it with care. To obtain the cell name:print AdminControl.getCell()
For example:
- AIX or Linux:LCConfigService.checkOutConfig("/opt/temp","foo01Cell01")
- Microsoft Windows:LCConfigService.checkOutConfig("c:/temp","foo01Cell01")
c. Enter the following command to increment the value of the versionStamp property:
LCConfigService.updateConfig("versionStamp","<gmt_timestamp>") where <gmt_timestamp> is the GMT time. You can specify an empty string for the time stamp or provide a GMT value string. When you specify an empty string, the client calculates the current GMT time and updates the version stamp with that value. If you choose to provide the time, specify it using the following format: yyyyMMdd.HHmmss and specify the time in GMT. It is best to provide an empty string and let the client format the time stamp. For example: LCConfigService.updateConfig("versionStamp","").
d. After making changes, check the configuration files back in and do so during the same wsadmin session in which you checked them out for the changes to take effect. See Apply common configuration property changes for information about how to save and apply your changes.
Parent topic
Customize product strings