Sun Java System Messenger Express 6 2005Q4 Customization Guide

Supporting a New Locale

If the language is supported by the Messaging Server, you can add the language to the preferred language list and create the language-specific static webmail pages. These language-specific pages should be grouped in a subdirectory under the main document directory. The webmail code automatically detects the client’s language preference and fetches the webmail pages from the appropriate subdirectory.

To support a new language in Sun Java System Messenger Express:

Example—Supporting a New Locale

The example shows how to support Russian language in Sun Java System Messenger Express.

Example—Supporting a New Locale shows the changes to be made to the i18n_preferredlanguagelist() funtion in the i18n.js file for supporting Russian language.


Example 3–26 Adding a language to the 18n_preferredlanguagelist() function in the i18n.js file


function i18n_preferredlanguagelist()
{
var s = '<select name="preferredLanguage"\>' +
'<option value="ar"\>Arabic</option\>' +
'<option value="zh-CN"\>Chinese/Simplified</option\>' +
'<option value="zh-TW"\>Chinese/Traditional</option\>' +
'<option value="en"\>English</option\>' +
'<option value="fr"\>French</option\>' +
'<option value="de"\>German</option\>' +
'<option value="it"\>Italian</option\>' +
'<option value="ja"\>Japanese</option\>' +
'<option value="ko"\>Korean</option\>' +
'<option value="ru"\>Russian</option\>' +
....
'</select\>'
return s
} 

Example—Supporting a New Locale shows the changes to be made to the ru/i18n.js file for changing the charset in the i18N resource file.


Example 3–27 Changing the charset in the I18N Resource File.


// I18N Resource file
var i18n = new Array()
var fldr = new Array()
// DO NOT TRANSLATE AS STRINGS-JUST VALUES
i18n['client charset'] = 'iso-8859-5'
i18n['http charset'] = 'iso-8859-5'
i18n['fontface'] = 'PrimaSans BT,Verdana,sans-serif
i18n['fontface1'] = i18n['fontface']
i18n['fontface2'] = 'Times New Roman,Times,serif'
i18n['fontface3'] = 'Courier New,Courier,mono'
i18n['nbsp'] = '&nbsp;'