This chapter explains how to configure JavaStation computers that will be used in different languages.
Most language settings can be configured quickly using Netra j. For information on Netra j, go to http://www.sun.com/netra-j or refer to the Netra j 3.0 Administrator's Guide.
You must configure some or all of following features for JavaStation computers that will be operated in languages other than the default language, U.S. English.
Table 10-1 Localization Features
Feature |
Description |
Configuration Procedure |
---|---|---|
Mount Directories |
Contain the resources required by the JavaOS software to support alternate locales. | |
Locale |
Controls the language and font that appears in the user interface, help text, and error messages | |
Keyboard |
Controls the mechanical input of each character when it is typed by the user | |
Font |
Controls the appearance of characters typed by the user | |
Input Method |
Controls how the user composes characters; must be configured for Chinese, Japanese, and Korean languages only; requires a localized version of Solaris | |
File Encoding |
Controls the character set used in files that are saved and the default character set for web pages displayed in a browser | |
Document URL |
Provides access to documentation for the HotJava Browser running on the JavaStation (not applicable if another application is used). |
Localization configurations are set using JavaOS properties, which are delivered to the JavaStation computer when it boots. The following sections describe the JavaOS properties used for localization. For complete instructions on setting JavaOS properties, see Chapter 4, JavaOS Properties .
The following JavaOS properties are required for all locales:
javaos.mountlist
user.language
javaos.loginLocaleList
The following property is required for all locales except West European locales:
-Dfile.encoding
The following property is required for all Asian locales:
-djavaos.im.url
The following property is required if you are running HotJava Browser on the JavaStation computers:
-Ddoc.url=file:/REMOTE/hotjava
Other properties may also be required for the locale you intend to support. Each feature description in this chapter indicates the associated property settings and the locales that require them.
This section shows some sample locale configurations.
To enable localization for a French-speaking Swiss user:
-djavaos.loginLocaleList=fr;de;it -Duser.language=fr -Dfile.encoding=8859_1 -djavaos.kbd=SwissFrenchPS2 -djavaos.im.compose.deadkeys=false -ajavaos.mountlist=server:/export/root/javaos/classes|/REMOTE
To enable localization for a Czech user:
-Duser.language=cs -Dfile.encoding=8859_2 -djavaos.kbd=CzechPS2 -djavaos.im.compose.deadkeys=false -ajavaos.mountlist=server:/export/root/javaos/classes|/REMOTE
To enable localization for a Korean user:
-Duser.language=ko -Dfile.encoding=KSC5601 -djavaos.kbd=KoreanPS2 -djavaos.im.compose.deadkeys=false -ajavaos.mountlist=server:/export/root/javaos/classes|/REMOTE; server:/export/root/javaos/fonts|/FONTS -ajavaos.im.url=iiimp://server:9010
To enable localization for a Thai user who enters text at a U.S. keyboard:
-Duser.language=th -Dfile.encoding=TIS620 -djavaos.im.compose_th=TIS620 -djavaos.im.compose.deadkeys=false -ajavaos.mountlist=server:/export/root/javaos/classes|/REMOTE; server:/export/root/javaos/fonts|/FONTS
You must set at least one mount directory to enable support for a locale other than U.S. English on the JavaStation computer.
When the JavaOS software boots on the JavaStation computer, it can mount some or all of the following directories on a server to obtain localization resources:
Translations and localized property files are in /export/root/javaos/classes. This directory is mounted by the JavaStation computer as /REMOTE.
Keyboard classes are in /export/root/javaos/classes/sun/javaos. If the /REMOTE directory above is mounted, then the JavaStation computer can access the keyboard class files also.
Fonts for Asian localizations are in /export/root/javaos/fonts. This directory is mounted by the JavaStation computer as /FONTS.
Use the javaos.mountlist property to tell the JavaStation computer to mount the /REMOTE and /FONTS directories, as in this example:
-ajavaos.mountlist=myserver:/export/root/javaos/fonts|/FONTS; myserver:/export/root/javaos/classes|/REMOTE
javaos.mountlist should be set using the -a (append) flag so that no previous settings for this property will be overridden.
A locale setting is required to enable a language other than U.S. English to be used in the JavaStation user interface, help text, and error messages.
The JavaOS software supports the locales listed in the table below.
Table 10-2 JavaStation Locale Settings
Language |
Locale Setting |
---|---|
Arabic | ar |
Catalan | ca |
Chinese | zh |
Czech | cs |
English | en |
French | fr |
German | de |
Hebrew | iw |
Hungarian | hu |
Italian | it |
Japanese | ja |
Korean | ko |
Polish | pl |
Portuguese | pt |
Russian | ru |
Spanish | es |
Swedish | sv |
Thai | th |
The JavaOS software also supports the language variants shown in the table below.
Table 10-3 JavaStation Country Settings
Country |
Country Setting |
---|---|
Israel | IL |
Republic of China | TW |
Thailand | TH |
United States | US |
Set the user.language property:
-Duser.language=locale
where locale is one of the JavaStation locale settings listed in the first table above.
If needed, set the user.country property:
-Duser.country=country
where country is one of the JavaStation country settings listed in the second table above.
For complete instructions on setting JavaOS properties, see Chapter 4, JavaOS Properties .
The localized version of the JavaStation software supports all the locales described in "Setting the Locale". At login, the user is asked to choose one of these locales.
If you want to restrict or add to the locales presented at login, especially if you will be running an application that is localized for a language not listed in "Setting the Locale", you must modify the javaos.loginLocaleList property.
where each locale is defined using one of the two-letter codes that define user.language followed by (in some cases) an underscore character and one of the two-letter codes that define user.country.
The default value of this property is:
-djavaos.loginLocaleList=en_US
Thus by default U.S. English is the only language choice available at login.
Font support is automatic in JavaOS for all the languages in Table 10-2 except the following:
Arabic
Chinese Simplified
Chinese Traditional
Hebrew
Japanese
Korean
Thai
Font sets for the above languages are provided in the JavaStation client software. To make any of these font sets available to JavaStation computers, you must set the javaos.mountlist property, as described in "To Make Fonts Available to JavaStation Computers ".
You do not need to install new fonts for any of the locales supported on the JavaStation computer, unless you would like to change the look of characters typed by the user. To install new fonts, use the procedure described in this section.
The Arabic, Hebrew, and Thai locales also require keyboard support. The Chinese (Simplified and Traditional), Japanese, and Korean locales require keyboard and input method support. See "Overview and Examples", "Adding a Keyboard", and "Setting the Input Method ".
Font sets must reside on a network directory that is accessible to the JavaOS software via NFS. By default, this directory is /export/root/javaos/fonts. To install a font, you will go to the fonts directory and do the following:
Add the font files (.ttf files). You can install any TrueType or TrueType-compliant font.
Modify the file FONTS.LST, which maps font names recognized by the JavaOS software to the font file names on the server.
Modify font property files in the subdirectory lib.
You then must make the font available to the JavaStation computers by setting the javaos.mountlist property to enable the JavaOS software to mount the fonts directory during boot-up.
Install the font files in the fonts directory.
By default, this directory is /export/root/javaos/fonts on the fonts server.
Follow the instructions that accompany the font package.
Modify the FONTS.LST file, which maps font names recognized by the JavaOS software to the font file names you have installed.
FONTS.LST contains a list of one-line entries, each of which contains:
font_name style truetype file_name
where:
font_name is the alias that the JavaOS software uses for the font. style is one of PLAIN, BOLD, ITALIC, and BOLDITALIC. file_name is the font file you have installed.
hggothicb PLAIN truetype HG-GothicB.ttf heiseimin PLAIN truetype HeiseiMin-W3H.ttf hgminchol PLAIN truetype HG-MinchoL.ttf
In this example, three TrueType fonts have been installed. They are all of style PLAIN. The font file names in the font_dir directory are aliased to the names for use by the JavaOS software, as shown in the following table:
Table 10-4 Font Name-to-JavaOS Alias Mapping in Above Example
Font Name |
Name for Use by JavaOS Software |
---|---|
HG-GothicB.ttf |
hggothicb |
HeiseiMin-W3H.ttf |
heiseimin |
HG-MinchoL.ttf |
hgminchol |
font_name is not case-sensitive. The JavaOS software recognizes HGGothicB, hggothicb, and HggothicB as the same name.
In the lib subdirectory, modify the font.properties.locale file.
locale is the locale that the font properties file is relevant for. For the English locale, the name font.properties (without a locale specification) is used.
The font properties file has four sections.
Section 1 defines where the new fonts are to be used in place of default system fonts.
The server provides five default system fonts to JavaStation computers: serif, sansserif, monospaced, dialog, and dialoginput. Section 1 contains up to one line for each default system font, where each line uses the following syntax:
system_font.suffix=JavaOS_font_name
This line specifies that the font is available to JavaOS. If you want a new font (identified by its JavaOS font name) to override the system font, set suffix to 0. If you want the new font to be available in addition to the system font, set suffix to any other number (1 is a good choice).
The following example makes the hgminchol font available in addition to the serif font:
serif.1=hgminchol
The serif font will be used for all English characters. The hgminchol font will be used for all Kana and Kanji characters.
Section 2 makes each new font name available to the JavaOS software.
Section 2 makes it possible for the JavaOS software to recognize the new font by its name, so that the font can be identified and used. Section 2 contains up to one line for each new font, where each line uses the following syntax:
JavaOS_font_name.0=JavaOS_font_name
The following example makes the hgminchol font name available to the JavaOS software:
hgminchol.0=hgminchol
Section 3 (optional) enables you to further alias the new font names.
Section 3 contains up to one line for each new font, where each line uses the following syntax:
alias.new_name=JavaOS_font_name
The following example aliases the hgminchol font to the name "mincho."
alias.mincho=hgminchol
Section 4 specifies the character set encoding of each font. Supported encodings are listed in the table below.
Encoding |
Locales |
---|---|
8859_1 |
West European locales |
8859_2 |
East European locales |
8859_5 |
Russian |
8859_6 | Arabic |
8859_8 | Hebrew |
GB2312 |
Chinese (PRC) |
CNS11643 |
Chinese (Taiwan) |
BIG5 |
Chinese (Taiwan) |
Ja-EUC |
Japanese |
EUCJIS |
Japanese |
KSC5601 |
Korean |
TIS620 | Thai |
Unicode |
Large, universal character set |
For each font, you must add a line with the following syntax:
fontcharset.font.1=sun.io.CharToByteencoding
Where encoding is one of the values in the table below.
The following example is for the monospaced font that is Unicode-encoded:
fontcharset.monospaced.1=sun.io.CharToByteUnicode
The following is an example font properties file for a server that has two new Unicode-encoded Japanese fonts. The new fonts will be available to the JavaOS software in addition to the system fonts. Thus both English and Japanese can be used on the JavaStation.
# Copyright (c) 1994-1996 by Sun Microsystems, Inc. # # AWT Font Properties for handling Japanese in the JavaOS # environment using disk-based fonts serif.1=hgminchol sansserif.1=hggothicb monospaced.1=hggothicb dialog.1=hggothicb dialoginput.1=hggothicb hgminchol.0=hgminchol hggothicb.0=hggothicb alias.mincho=hgminchol alias.gothic=hggothicb fontcharset.serif.1=sun.io.CharToByteUnicode fontcharset.sansserif.1=sun.io.CharToByteUnicode fontcharset.monospaced.1=sun.io.CharToByteUnicode fontcharset.dialog.1=sun.io.CharToByteUnicode fontcharset.dialoginput.1=sun.io.CharToByteUnicode
Set the javaos.mountlist property.
This property setting tells the JavaOS software to mount the fonts directory at startup:
-ajavaos.mountlist=host:font_dir |/FONTS
The default fonts directory is /export/root/javaos/fonts. To mount this directory on a server called sunroom, you would type:
-ajavaos.mountlist=sunroom:/export/root/javaos/fonts|/FONTS
Reboot JavaStation computers that need access to the new fonts.
To reboot a JavaStation computer, turn it off and then on.
The JavaOS software supports a number of PS/2 keyboards that may not have been supplied with your JavaStation computers. To support most locales, you must configure a new keyboard to replace the default keyboard, USPS2. As an exception, Latin accent characters and Arabic, Hebrew, and Thai characters can be typed at any supported keyboard if one of the javaos.im.compose properties has been set. This document refers to the U.S. keyboard. See "Enabling Special Characters on the U.S. Keyboard".
The Arabic, Hebrew, and Thai locales also require font support. The Chinese (Simplified and Traditional), Japanese, and Korean locales require font and input method support. See "Overview and Examples", "Adding Fonts", and "Setting the Input Method ".
JavaOS supports the following keyboards:
Connect the keyboard to the JavaStation.
Set the javaos.mountlist property.
This property setting tells the JavaOS software to mount the locale directory at startup.
-ajavaos.mountlist=host:localization_top_dir |/REMOTE
By default, the locale directory is /export/root/javaos/classes. If you set javaos.mountlist as follows:
-ajavaos.mountlist=sunroom:/export/root/javaos/classes|/REMOTE
The JavaOS software mounts the directory /export/root/javaos/classes/sun/javaos. Note that if you are specifying a FONTS directory as well as a REMOTE directory, the javaos.mountlist property is a list delimited by semicolons. For example:
-ajavaos.mountlist=sunroom:/export/root/javaos/fonts|/FONTS; sunroom:/export/root/javaos/classes|/REMOTE
Set the javaos.kbd property.
This property setting tells the JavaOS software the name of the keyboard file, which contains the keyboard mapping table. Keyboard files for all of the countries listed on the previous page are included in the JavaStation client software.
-djavaos.kbd=keyboard
The syntax of keyboard is namePS2, where name is one of the countries in the preceding list. For example, to add the Swedish keyboard:
-djavaos.kbd=SwedishPS2
Four javaos.im.compose properties enable you to modify the characters typed at the U.S. English keyboard. You can enable input of Latin accent characters or Arabic, Hebrew, or Thai characters.
Latin accent characters - When the javaos.im.compose.deadkeys property is set to true, the following keys can be typed in combination with other keys to produce Latin accent characters.
` (single quote)
` (back single quote)
" (double quote)
^ (circumflex)
For example, pressing the ` key plus the "a" key produces an á. This feature is commonly used in European locales.
Pressing one of the above keys twice produces its normal value.
Arabic, Hebrew, or Thai - The following properties enable Arabic, Hebrew, or Thai characters to be produced at the U.S. English keyboard:
javaos.im.compose_ar=ISO8859_6
javaos.im.compose_iw=ISO8859_8
javaos.im.compose_th=TIS620
These properties also enable a status window on the JavaStation screen that shows the current direction of text input (right-to-left or left- to-right).
You can use one of these properties and also use the javaos.kbd property to set up a native keyboard. For example, you can set -djavaos.kbd=ArabicPS2 to enable the Arabic keyboard and also set the -djavaos.im.compose_ar property to enable Arabic characters to be typed at a U.S. keyboard. If the javaos.kbd property is set, the Alt-Graph key sequence is used to toggle the input direction. If the compose property is set, the Ctrl-t key sequence is used to toggle the input direction. If both properties are set, both key sequences are enabled.
The Arabic, Hebrew, and Thai locales also require font support. See "Overview and Examples" and "Adding Fonts" for more information.
-djavaos.im.compose.deadkeys=true
-djavaos.im.compose_ar=ISO8859_6
ISO8859_6 is the code for the Arabic character set. Once this property is set, the Ctrl-t key sequences toggles the JavaStation keyboard between U.S. and Arabic modes.
-djavaos.im.compose_iw=ISO8859_8
ISO8859_8 is the code for the Hebrew character set. Once this property is set, the Ctrl-t key sequences toggles the JavaStation keyboard between U.S. and Hebrew modes.
-djavaos.im.compose_th=TIS620
TIS620 is the code for the Thai character set. Once this property is set, the Ctrl-t key sequences toggles the JavaStation keyboard between U.S. and Thai modes.
An input method controls how JavaStation users in Chinese (Simplified and Traditional), Japanese, and Korean locales will compose characters at the keyboard. The input method is administered by a language engine running on a Solaris system in the JavaStation network. Localized versions of Solaris offer language engines to support the input methods listed below.
To fully support one of the preceding locales, you must also set up keyboard and font support. See "What You Must Configure", "Adding Fonts" and "Adding a Keyboard" for more information.
Arabic, Hebrew, and Thai characters are also composed using an input method. However, support for these input methods is automatic in the JavaOS software and does not require additional configuration.
Set the javaos.im.url property.
This property enables JavaStation computers to access to the Solaris machine running the language engine for the input method. To support multiple input methods for all the JavaStation computers in your network, use a semicolon-delimited list of Solaris machines. Set this property as follows:
-djavaos.im.url=iiimp://hostname:port;hostname:port...
where:
hostname is the Solaris host running the language engine. port is the port at which the engine is located. By default, the JavaStation computers use port 9010.
To make an input method server accessible to only a subset of the JavaStation computers in your network, you will need to create a unique macro for these computers in the dhcptab file. See "Sample dhcptab File ".
(Optional) Set the javaos.im.status.fixpopup property.
Setting this property to true, as follows, enables a pop-up window with input method status information to appear on the JavaStation monitor.
-djavaos.im.status.fixpopup=true
(Optional) Set the javaos.im.lookup.button property.
This property controls how the JavaStation user selects characters when using an input method. If false, when the list of candidate characters is displayed, letters are used to indicate each choice. If true, letters are replaced with buttons so that the user must click on a button to pick a choice. Note that enabling this option degrades the performance of user input.
-djavaos.im.lookup.button=true
Reboot the JavaStation computer.
To reboot a JavaStation computer, turn it off and then on.
If the locale you have chosen does not use the 8859_1 character set (Roman alphabet), you must change the file.encoding property to describe which character set will be used when files are saved. Supported character sets are listed in Table 10-5.
-Dfile.encoding=encoding
where encoding is one of the settings listed in Table 10-5.
If Sun's HotJava Browser will run on the JavaStation computers, you must set the doc.url property to make HotJava Browser documentation accessible to JavaStation users.
-Ddoc.url=file:/REMOTE/hotjava
HotJava Browser documentation is translated for all locales. If the doc.url property is set exactly as above, HotJava Browser automatically locates the translation for the current locale.