Convergence howto add a new locale: first try

I've asked David, one of our student, to apply the Adding a New Language in Convergence twiki on a locale install of Sun Convergence, and tell me how it went. It's good to see what was clear and what was not.

His first result was that he could not log in. He canceled things via "/opt/SUNWiwc/sbin/iwcadmin -u <uid> -w <password> -p 50005 -o client.enablecustomization -v false", and tried again with the whole /opt/SUNWappserver/domains/domain1/docroot/iwc_static/c11n_sample/ structure copied into /opt/SUNWappserver/domains/domain1/docroot/iwc_static/c11n/ directory. Then, he could login but did not see the possibility to change the default user's locale into the new one...

Still to be worked out...




To Add a New Language in Convergence

1. Enable customization in the Convergence Server:

/opt/SUNWiwc/sbin/iwcadmin -u <uid> -w <password> -p 50005 -o client.enablecustomization -v true

Comment: OK

2. Edit the configuration file, config.js:

In the config.js configuration file, set the i18nEnabled flag to true. /c11n/config.js

Comment: This dorectory "c11n" didn't exist. I had to create it in: /opt/SUNWappserver/domains/domain1/docroot/iwc_static/

In this directory "iwc_static", here was available a whole sample modification structure under directory iwc_sample. I took the config.js file there and copied it into:

/opt/SUNWappserver/domains/domain1/docroot/iwc_static/c11n

The i18nEnabled flag had already been set to true

3. Create an nls/new language subdirectory for the l10n module:

iwc_static/c11n/<domain>/nls/<new language>

where domain is the name of the domain in which the new language will be available and new language is the subdirectory in which the new language's resource file is located.

Comment: As domain I have chosen: allDomain and added two locale directories "ru" and "th"

4. Create a default resource file named resources.js:

iwc_static/c11n/<domain>/nls/<new language>/resources.js

Note that each language added to each domain would have its own l10n resources file ( resources.js). Depending on the end-user's language locale, Convergence loads that locale's resources file.

Comment: I was not sure howto create or where to get the files resources.js, so I have copied them from:

/opt/SUNWappserver/domains/domain1/docroot/iwc_static/c11n_sample/allDomain/nls

modified the text in compose_tab to eg.: rururu and ththth and put each to the propriate language directory.

To Add a Label for the New Language to the Global Options Language Menu

1. - 2. Already proceeded.

3. Create the following subdirectory under the customization (c11n) directory:

iwc_static/c11n/<domain>/js

Comment: OK

4. Create a customize.js file, as follows:

iwc_static/c11n/<domain>/js/customize.js

Comment: I was not sure about the correct file structure - what is nescessary etc - so I took it from the sample directory again:

/opt/SUNWappserver/domains/domain1/docroot/iwc_static/c11n_sample/allDomain/js/

5. Create a subdirectory to contain the custom widgets:

iwc_static/c11n/<domain>/js/widget

Comment: OK


6. Copy the sample version of the OptionsViewerGlobalGeneral.js file from the sample customization directory to your live customization directory:

Copy from: iwc_static/c11n_sample/allDomain/js/widget/OptionsViewerGlobalGeneral.js

to: iwc_static/c11n/<domain>/js/widget/OptionsViewerGlobalGeneral.js

Comment: OK

7. Edit the OptionsViewerGlobalGeneral.js file, adding your language.

Comment: OK


To Add a Label for the New Language to the Convergence Login Page

1. Navigate to iwc_static/layout/main.html

2. Add your language to the list of languages on the html page. Use UTF-8 for double-byte characters.

Comment: I could add the list in another file, not "main.html" but "login.html" in the directory: /opt/SUNWappserver/domains/domain1/docroot/iwc_static/layout/



Powered by ScribeFire.

Comments:

Thanks for running this task and commenting on your experience. I'll consult with the Convergence customization engineers and, on their advice, update the customization document on the wiki to incorporate your comments.

Posted by Steven Kahn on August 27, 2008 at 11:51 AM CEST #

Following is copied from Mangala's comments on http://wikis.sun.com/display/CommSuite/Adding+a+New+Language+in+Convergence , which contains much information.

++++++++++
Here is the observation of trial for Customization-adding new lang support , done with latest build.
NOTE:
-currently it worked only for "allDomain" & does not work for any other user specified domains under c11n.
-Please correct the errors in this Document which are mentioned towards end.
-Note also the bugs filed is given at end.

\*\*\*\*\*\*\*\*\*\*\*
STEPS:
\*\*\*\*\*\*\*\*\*\*\*
1)Enabled customization parameter using command:
./iwcadmin -u <uid> -W <password file> -p <port number> -o client.enablecustomization -v true

Under Convergence's deployed location i.e <container>/docroot/iwc_static : did the following steps for c11n.

2)Creating "c11n" directory using c11n_sample, under iwc_static: i.e Make a copy of "iwc_static/c11n_sample" & rename it to have "iwc_static/c11n".

3)edited : iwc_static/c11n/config.js : set i18nEnabled flag to true for allDomain in this file.

4)created "ru" as new lang directory : /iwc_static/c11n/allDomain/nls/ru

5)created resources.js file for "ru" : /iwc_static/c11n/allDomain/nls/ru/resources.js

Note: you should have hence the structure as follows:
iwc_static/c11n/allDomain/nls/
iwc_static/c11n/allDomain/nls/resources.js (default one)
iwc_static/c11n/allDomain/nls/ru/
iwc_static/c11n/allDomain/nls/ru/resources.js (this will have localization required for newly added lang "ru")

6)Edited iwc_static/c11n/allDomain/js/customize.js , as follows:
--uncomment the line
dojo.require("c11n.allDomain.js.widget.OptionsViewerGlobalGeneral");
--since i did not need services ,commented the section of helloConvergenceService & also flickrService
--also commented the : dojo.require("c11n.allDomain.js.widget.MailNew");

7)For Adding new lang in Options->General->Prefered lang drop down , did as specified in guide i.e :
Edited :iwc_static/c11n/allDomain/js/widget/OptionsViewerGlobalGeneral.js , & added new : this.language.addChild , as shown in the guide :
with : value: "ru", label: "Russian"

8)For adding label in login page :
edited :iwc_static/layout/login.html
search for div where language references are present & add the line :
<a href="/iwc_static/layout/login.html?lang=ru">Russian </a>

9)Now its done with modifications needed for c11n. So in your Browser clear the Cache. Access the Convergence URL/login page

10)link "Russian" on login page was present & when accessed it changed URL as
http://host:port/iwc_static/layout/login.html?lang=ru & showed the login page

11)login as existing english user

12)Go to Options->General->Language . Here in language drop-down , you can see "Russian" . Choose that . Save Preferences & logout

13)Login again as same user . It now picks the localized content that was given in iwc_static/c11n/allDomain/nls/ru/resources.js file.(note:login page strings will not be impacted & there is bug filed as mentioned below)

RESULTS:
So it worked as per above steps.
But following needs to be noted w.r.t one missing info in guide & also the bugs filed below

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
CORRECTION NEEDED IN DOCUMENT
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
Please add this below lines to the above guide(the uncommenting info is missing in guide):

Edit: iwc_static/c11n/allDomain/js/customize.js :
--uncomment the line: dojo.require("c11n.allDomain.js.widget.OptionsViewerGlobalGeneral");

\*\*\*\*\*\*\*
BUGS
\*\*\*\*\*\*\*
1)6745757
2)6745765
3)6745772(BiDi langs specific)
++++++++++

Posted by Zhen Jenny Huang on October 29, 2008 at 01:32 AM CET #

Thanks for running this task and commenting on your experience. I'll consult with the Convergence customization engineers and, on their advice, update the customization document on the wiki to incorporate your comments.

http://www.gifico.com
http://www.lv-cheap.com

Posted by louis vuitton on November 18, 2009 at 11:39 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Members of the EMEA Globalization Center are blogging about the products that comprise the Java Enterprise System stack.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today