Communications Express allows you to localize Calendar, Address Book and Options as per your requirements.
To localize text, you need to change the i18n.properties file that is located in <domain-dir>/domain/<locale> directory. If the deployment is configured to work with multiple domains and multiple locales, then a directory by that domain name is created under <domain-dir>/domain
For example, if there is a domain called example.com, perform the following steps.
Create <domain-dir>/domain/example.com
Copy <domain-dir>/domain/<locale>/i18n.properties to <domain-dir>/domain/example.com./locale directory
Create directories for each supported locale (en_US, ja, de_FR etc) under that domain, copy i18n.properties to the domain, and change it accordingly
The localization of the Date/Time formats for Calendar should be performed by constructing locale-specific patterns for certain symbols, delimitters and hard-coded strings that are enclosed in single quotes. These symbols are converted into locale specific strings by Communications Express
Localizing Date/Time Formats for Calendar contains the information on localizing Date/Time Formats for Calendar.
Table 9–1 Localizing Date/Time Formats for Calendar
Symbol |
Meaning |
Presentation |
Example |
---|---|---|---|
y |
year |
Number |
1996 |
M |
month in year |
Text&Number |
July & 07 |
d |
day in month |
Number |
10 |
h |
hour in am/pm (1-12) |
Number |
12 |
H |
hour in day (0-23) |
Number |
0 |
m |
minute in hour |
Number |
30 |
s |
second in minute |
Number |
55 |
S |
millisecond |
Number |
978 |
E |
day in week |
Text |
Tuesday |
D |
day in year |
Number |
189 |
F |
day of week in month |
Number |
2 (2nd Wed in July) |
w |
week in year |
Number |
27 |
W |
week in month |
Number |
2 |
a |
am/pm marker |
Text |
PM |
z |
time zone |
Text |
Pacific Standard Time |
” |
escape for text |
Delimiter |
(none) |
” |
single quote |
Literal |
. |
Characters that are in the above table are treated as quoted text. These characters appear in the formatted text even if they are not enclosed within single quotes.
The number of symbol letters you specify also determines the format. For example, if the “zz” pattern results in “PDT,” then the “zzzz” pattern generates “Pacific Daylight Time.” Localizing Date/Time Formats for Calendar summarizes these rules.
Table 9–2 Localization Rules
Presentation |
Number of Symbols |
Result |
---|---|---|
Text |
1-3 |
”abbreviated form, if one exists |
Text |
>=4 |
full form |
Number |
minimum number of digits is required |
shorter number are padded with zeros(for year, if the count of ”y’ is 2, then the year is truncated to 2 digits) |
Text & Number |
1-2 |
text form |
Text & Number |
3 |
number form |
You may want to use the ”native2ascii’ utility provided by JDK to convert non-ascii characters into escaped unicode values. This utility is available at <jdk-install-dir>/bin
To use the ”native2ascii’ utility, enter non-ascii characters for the corresponding values in the properties file and save it.
Use the command, native2ascii -encloding <native_encoding> <src_filename> <target_filename>
where,
native_encoding represents the encoding used to create the source file, src_filename represents the source file and target_filename represents the i18n.properties file.
Communications Express allows you to localize any feature of Mail. Different pages can be created for different languages. When you create language-specific static pages, you need to group them in subdirectories under the main document directory. The code automatically detects the client’s language preference and fetches the pages from the appropriate subdirectory.
When you change common sections for static pages, you must make the changes in multiple locale (languages) directories, if modifications are desired across languages (for example, if changes are required to modify JavaScript behavior). Conversely, you can also make language-specific modifications selectively throughout the application.
Localizing Mail lists the specific locales and their abbreviations that are supported by Communications Express services. The default language is English.
Table 9–3 Communications Express Specific Locales
Locale |
Abbreviation |
---|---|
English |
en |
Japanese |
ja |
Spanish |
es |
French |
fr |
German |
de |
Russian |
ru |
Arabic |
ar |
Localizing Mail shows the changes to be made to the ru/i18n.js file for modifying 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[\qfontface\q] = \qPrimaSans BT,Verdana,sans-serif i18n[\qfontface1\q] = i18n[\qfontface\q] i18n[\qfontface2\q] = \qTimes New Roman,Times,serif\q i18n[\qfontface3\q] = \qCourier New,Courier,mono\q i18n[\qnbsp\q] = \q \q |
Communications Express allows you to customize text that is displayed on web pages. This text is both customizable and localizable. The system also allows you to configure text on a per domain basis.
To add a locale, perform the following steps.
Edit the uwcdomainconfig.properties file. This file is available in the <uwc-deploy-dir>/WEB-INF/domain directory>
Add a keyword for the new locale that needs to be added. For example, if you need to add a new locale, “Afrikaans”
supportedLanguages=en;es;de;fr;ja;ko;zh-CN;zh-TW;Afrikaans |
Add a localized string for the locale name in different locales. This could be done by adding a new line in i18n.properties file of each locale. For example, let us add a key in i18n.properties file for en locale.
uwc-common-options-preferredLanguage-Afrikaans=Afrkaans Locale |
To localize address book, the xml file that needs to be modified is the dictionary- <lang>.xml file that is located under <uwcinstalldir>/WEB-INF/ui/html/abs directory.
You can customize the Address Book UI either for a specific locale and not under a specific domain and also for a locale under a specific domain.
Create a directory with the locale name(e.g., ja under <uwcinstall>/WEB-INF/ui/html/abs
Copy all files from <uwc-deploy>/WEB-INF/ui/html/abs to <uwc-deploy>/WEB-INF/ui/html/abs/<locale>
Make the required changes in XSL files as explained in the previous sections.