If you add support for an additional language to the portal, you must add the corresponding style sheets for that language. The CSS Mill was designed to make adding languages and generating the language style sheets relatively easy.
Each language file in the \ptimages\tools\cssmill\prop-text folder has language-specific values for font style, font size, text style, etc. This design makes it easy to change the default font for each language. For example, if you want the default font for the Japanese user interface to be Tahoma, add Tahoma to the "ja" language file in the prop-text folder.
After adding a language file, you must also edit the build.xml file to generate the new language style sheets.
For example, the steps below explain how to add "Dutch" as a portal user interface language.
Navigate to the \ptimages\tools\cssmill\prop-text folder in the Image Service. Copy one of the existing files to the same folder and rename it using the language conventions in ISO-639-1 and ISO-3166. For example, for Dutch, rename the file to “nl”.
Open the new file in
a text editor and make any necessary modifications for the new language.
For example,
to add a new default font, you could change the following line:
font.largest=20px verdana,arial,helvetica,"sans-serif"
to:
font.largest=21px Tahoma,"MS PGothic",Verdana,"sans-serif"
Be sure to add the new font for each font attribute in the language
file.
Navigate to the \ptimages\tools\cssmill\prop-color folder
in the Image Service. Add the new language's translation for the name
of the color in every color properties file. For example, open the color.1.properties
file and copy the last colorscheme.name
entry. Change
the name according to the new language ID used in step 1. In
this example, we could copy the following line:
colorscheme.name.zh=\\u6DE1\\u7D2B
and change it to:
colorscheme.name.nl=Lavendelblauw
Modify the Ant build script (build.xml) to include the new language to the style sheet collection by following the steps below. (This is the only way the script knows to create versions of the new style sheet for each language supported by the portal.)
<antcall target="make_main_language_css">
entry and paste it at the end of the list. Modify
the <param name="LANGUAGE" value="pt"/>
tag by changing the value ("pt") to the language ID used in
step 1 (e.g., "nl").<antcall target="make_comm_lang_color_css">
entry and paste it at the end of the list. Modify the <param
name="LANGUAGE" value="pt"/>
tag by changing
the value ("pt") to the language ID used in step 1 (e.g., "nl").<concat destfile="${INDEX}"
append="true">mainstyle${COLOR}-pt.css=${colorscheme.name.pt}</concat>
entry and paste it at the end of the list. Change the language
id in the new line to the new language id by changing the value ("pt")
to the language ID used in step 1 (e.g., "nl"). In our example,
the new line would look like this:
<concat destfile="${INDEX}" append="true">mainstyle${COLOR}-nl.css=${colorscheme.name.nl}</concat>
Create the new style sheets by running the make_all batch file as explained in Creating New Style Sheets. To change the default style sheet used by the portal, follow the instructions under Changing the Default Style Sheet.
Verify that the new language style sheets were created based on the new language property file. Navigate to the cssmill\css directory and confirm that there are 20 new style files with the new language ID used in step 1 (e.g., “mainstyle-nl.css”). For further verification, open the community-themes.txt file (in the \css directory) and confirm that there is a new entry corresponding to the language ID used in the new language property file.
After confirming that your changes are correct, move the new style sheet files from the \cssmill\css folder to the \imageserver\common\public\css folder used by the portal.
Restart the Java Application Server. (The community-themes.txt file is loaded during ALI Publisher startup and stored in memory.)