All captions and displayable static items that are displayed in the Address Book can be customized. All the labels are defined in the dictionary-<lang>.xml file which is located under <uwcinstall>/WEB-INF/ui/html/abs directory. This XML file contains definitions in the following form
<word key="_Message">Message Actual Text</word>
The key is specified in the XSL file which is used to obtain the value of the <word> XML node. This value is eventually displayed during the rendering of XSL into HTML. In the XSL file, the key is specified in the <xsl:text> tag.
To customize a particular caption or a static label, change the text corresponding to desired key. To add new text,
Add new <word> tag with the appropriate key and the prefix '_'
Add the <xsl:text> tag with the key as the tag value in the XSL file
The following example changes the label for 'New Contact' link on the Main page toolbar to 'Add Contact'. In the example ”en’ is assumed to be the language in which the label is displayed.
In search.xsl, the label is coded as following:
<a class="ToolLbl" href="javascript:void(0)"> <xsl:attribute name="onClick"> <xsl:text>javascript:openWinAutoHeight ('addcontact-main.xml?bookid=</xsl:text> <xsl:value-of select="$selectedBook/entry/@entryID"/> <xsl:text>', 'NewContact', 'scrollbars=yes,resizable=yes,width=700');</xsl:text> </xsl:attribute> <xsl:text>_New Contact</xsl:text> -----> Label Definition </a> |
Example 7–4 shows the code before modifying the default definition in dictionary-en-xml
<word key="_View Calendar...">View Calendar...</word>
Example 7–5 shows the code before modifying the default definition in dictionary -en-xml
<word key="_View Calendar...">View Schedule...</word>