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 |