This chapter explains how to configure JavaStation computers that will be used in countries other than the United States.
You will need to change the following settings for JavaStation computers that will be used outside the United States.
Table 11-1 Description of Settings to be Changed for Localization
Setting |
Description |
---|---|
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 |
Font |
Controls the appearance of characters typed by the user |
Input Method |
Controls how the user composes characters; 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 |
Many of the settings are delivered in JavaOS properties to the JavaStation. For instructions on setting JavaOS properties, see Chapter 9, Setting JavaOS Properties .
You can set the user's locale to a language other than English in the JavaStation user interface, help text, and error messages.
JavaOS supports the locales listed in Table 11-2.
Table 11-2 JavaStation Locale Settings
Language |
Locale Setting |
---|---|
German |
de |
English |
en |
Spanish |
es |
French |
fr |
Italian |
it |
Japanese |
ja |
Korean |
ko |
Swedish |
sv |
Chinese |
zh |
JavaOS also supports the language variants American English and Simplified Chinese, shown in Table 11-3.
Table 11-3 JavaStation Country Settings
Country |
Country Setting |
---|---|
United States |
US |
Republic of China |
TW |
locale is one of the locale settings listed in Table 11-2.
country is one of the country settings listed in Table 11-3.
For instructions on setting JavaOS properties, see Chapter 9, Setting 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 will need to modify the login.LocaleList property.
Set the following JavaOS system property:
-Dlogin.LocaleList=locale-1 ;locale-2; ... ;locale-n
The default value of this property is:
-Dlogin.LocaleList=en_US;de;es;fr;it;ja;ko;sv;zh;zh_TW
Font sets must reside on a network directory that is accessible to JavaOS via NFS. By default, this directory is /export/root/javaos/fonts. To install a font, go to the fonts directory and perform the following tasks:
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 JavaOS to the font filenames on the server.
Modify font property files in the subdirectory lib.
You then make the font available to the JavaStation computers by setting the javaos.mountlist property to enable JavaOS 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 JavaOS 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 JavaOS 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. The font file names in the font_dir directory are:
HG-GothicB.ttf
HeiseiMin-W3H.ttf
HG-MinchoL.ttf
They are being aliased to the names for use by JavaOS:
hggothicb
heiseimin
hgminchol
They are all of style PLAIN.
font_name is case-insensitive. JavaOS 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
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 JavaOS.
Section 2 makes it possible for JavaOS to recognize the new font by its name, in addition to supplementing one of the default fonts. 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 JavaOS:
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 Table 11-4.
Encoding |
Locales |
---|---|
8859-1 |
West European locales |
8859-2 |
East European locales |
8859-5 |
Russian |
GB2312 |
Chinese (PRC) |
CNS11643 |
Chinese (Taiwan) |
BIG5 |
Chinese (Taiwan) |
Ja-EUC |
Japanese |
EUCJIS |
Japanese |
KOI8 |
Korean |
Unicode |
Large, universal character set (all languages) |
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 Table 11-4. 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 JavaOS in addition to the system fonts. Thus both English and Japanese can be used on the JavaStation computers.
# Copyright (c) 1994-1996 by Sun Microsystems, Inc. # # AWT Font Properties for handling Japanese in JavaOS # 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
You can make new fonts available to JavaStation computers using the javaos.mountlist property.
This procedure can be performed automatically by the Netra j 2.0 software. See "Defining Boot Server Global Parameters".
Set the javaos.mountlist property.
This property setting tells JavaOS to mount the fonts directory at startup:
-djavaos.mountlist=host :font_dir|/FONTS
For example, to mount the fonts directory/export/root/javaos/fonts, which resides on the server sunroom, you would type:
-djavaos.mountlist=sunroom:/export/root/javaos/fonts|/FONTS
Reboot JavaStation computers that need access to the new fonts.
To reboot a JavaStation, turn it off and then on.
If you install a native keyboard but do not install the fonts to support it, text that is typed does not appear on the screen.
JavaOS supports a number of PS/2 keyboards that may not have been supplied with your JavaStation. The following keyboards are supported:
This procedure can be performed automatically by the Netra j 2.0 software. See "Defining Boot Server Global Parameters".
Connect the keyboard to the JavaStation.
Set the javaos.mountlist property.
This property setting tells JavaOS to mount the locale directory at startup.
-djavaos.mountlist=host :localization_top_dir |/REMOTE
By default the locale directory is /export/root/javaos/locale. If you set javaos.mountlist as follows:
-djavaos.mountlist=sunroom:/export/root/javaos/classes|/REMOTE
JavaOS 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:
-djavaos.mountlist=sunroom:/export/root/javaos/fonts|/FONTS; /export/root/javaos/classes|/REMOTE
This property setting tells JavaOS 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 Netra j 2.0 software and reside in the locale directory.
-djavaos.kbd= keyboard
The syntax of keyboard is namePS2, where name is one of the countries listed on the previous page. For example, to add the Swedish keyboard:
-djavaos.kbd=SwedishPS2
The compose.deadkeys property allows you to modify the characters typed at the U.S. English keyboard. When this property is set to true, the following keys can be used in combination with other keys to produce special 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 a special character key twice produces its normal value.
An input method controls how users in Chinese, Japanese, and Korean locales will compose characters at the keyboard. Localized versions of Solaris offer language engines to support the input methods listed below.
Table 11-5 Input Methods by Language
This procedure can be performed automatically by the Netra j 2.0 software. See "Defining Boot Server Global Parameters".
Set the javaos.im.url property.
If your network has a Solaris machine running an Asian language engine, you can provide access to the engine from the JavaStation computer by setting the following JavaOS property:
-djavaos.im.url=iiimp:// iiimphost:port/ input_method
where:
hostname is the Solaris host that is running the Asian language engine. port is 9010 by default. input_method is one of the input methods listed in Table 11-5.
The following JavaOS property 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.
The following JavaOS 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 will negatively impact the performance of user input.
-djavaos.im.lookup.button=true
Reboot the JavaStation.
To reboot a JavaStation, turn it off and then on.
If the locale you have chosen does not use the 8859-1 character set (Roman alphabet), you need to change the file.encoding property to describe which character set will be used when files are saved. Supported character sets are listed in Table 11-4.
where encoding is one of the settings listed in Table 11-4.