The iNotes 8.5 forms file (Forms85.nsf) differs from previous version in that it includes all supported languages. Previous versions created a different file for each language. If it was necessary to use iNotes in more than the default language, this required the use of the mlmerge tool to install language packs for the other languages. In iNotes 8.5, any of the supported languages can be used simply by changing the preferred language in the browser. This new architecture is called resource separation.
Given this new architecture, it is quite easy to add an additional language if desired. What follows is a description of the steps involved in doing this.
Begin by using the English file, "dwa_en.properties," as a template. This is a file element in the iNotes forms file, Forms85.nsf. You can extract it using the Lotus Domino Designer. Open the forms file in Designer, look under Shared Resources, then Files. Select dwa_en.properties, then click on the Export icon and save it to your file system.
Next, you will need to choose a name for the new properties file you create. The name should be the two character code for your language, e.g., fr for French, or the five character language-locale combination. for example es-CR for Costa Rican Spanish. The code you choose should be consistent with the language codes available in the browsers you wish to support, since the iNotes code will use these codes in the browser's list of preferred languages to select the appropriate language at run time. If you wish to use an unsupported language code, you will need to have your users create a custom language in the browser with this code.
For example, assume you wish the create Costa Rican Spanish. Rename the English properties file dwa_es-CR.properties. Note that case is significant and the convention is that the locale part of the code is upper case. Now you can edit this new file to replace the strings with those appropriate to the language you are creating.
The properties file contains values for all the strings that appear in the user interface as well as constants that allow language specific variations in characteristics of visual elements, for example, the size of dialog boxes, that may be required for specific languages.
The format of entries in the file are as follows
Where <id> is the programmatic identifier used in the code, and <value> is the value of the string to be used. for example, in the entry:
L_CONTACT_GENERAL_TAB=General
the id is L_CONTACT_GENERAL_TAB and the value is "General"
The strings appear first in the file and by convention are named with a leading "L_", "L_CONTACT_GENERAL_TAB," for example. This rule in not always followed, but all lines that appear before the comment line:
# Locale dependent constants used by Shimmer applications
are strings and all lines below it represent constants. The design of the user interface tries to use dimensions and layout techniques to accommodate strings in a wide variety of languages. In general, you should change items in the constants section only to solve specific layout problems or other language specific issues.
There are some characters in the strings that serve special purposes:
%1, %2 etc
These are placeholders for replaceable parameters that are filled in with values at runtime. These must be preserved.
|
This character is used as a delimiter in lists, and must be preserved.
<...>
This is HTML Markup. In some cases, the string contains embedded markup such as:
and must be preserved.
#
Lines beginning with the hash character are comments and and are not used by iNotes. The can contain hints or descriptive text.
\
This is an escape character. Its purpose is to prevent the following character from being interpreted literally. For instance, in the JavaScript string:
"this is a double quoted string containing \"double quoted string\""
the escape characters prevent the string from ending with the second quotation mark. These must be preserved.
The new properties file can be prepared using the native code page for the language. However, the final properties files must contain Unicode escaped entities for all non-ASCII characters, which are of the form
\uXXXX
where X represents a hexadecimal digit, e.g.,
\u30a3
. To convert the properties file from native code page to this format, use the java API
native2ascii tool
. See this
Native-to-ASCII Converter
for more information.
Once the new properties file is prepared, it is added to the forms file using Designer. To do this, in the Shared Resources - Files view used to extract the English properties file, click the "New File Resource" button and select this file in the File Open dialog.
To test the language, first change the default language in your browser to point to the new language. For Internet Explorer 7, you would select the Tools - Internet Options menu item, then click the "Languages" buitton on the "General" tab, then the "Add" button:
Select your language (es-CR in our example):
Now select the languages in the Language list box, and press the "Move up" button until it appears at the top of the list:
You will need to restart the Domino server for the new language to take effect. When you next log in, iNotes should appear in the language you have created.
The string customization will provide the user with text in the new language developed as above. There are however several elements of the design that this does not cover:
Strings in the Mail Template
iNotes uses strings contained in the mail template for parts of the user interface, for example, view column names and names of standard folders ("Inbox"). These will be represented in the language of the mail template in use.
Strings in Agents
There are two agents that handle Message Recall Requests (wGenRecallReqDispStat) and Tracking Requests (wGenTrackReqDispStat) the contain strings. These strings would have to be translated for the new language. To do this, in Designer select Shared Code - Agents. Scroll to the English version, then right click on Copy then Paste. You will see a new instance of the English agent. Select the agent in the view, right click, then select "Design Properties" then the third tab:
Select your language from the dropdown:
Note that you cannot select an arbitrary language here, you can only choose from those available in the dropdown list.