| Oracle® Java Micro Edition Connected Device Configuration Runtime Guide Release 1.1.2 for Oracle Java Micro Edition Embedded Client A12345-01 |
|
![]() Previous |
![]() Next |
The CDC Java runtime environment can be localized to support different languages and cultures. The following sections provide CDC-specific information for localization procedures:
In the CDC Java runtime environment, the locale system properties described in Table 5-1 are set before cvm can parse its command-line arguments. Thus, it is not possible to change the locale by specifying these system properties on the cvm command-line with the -Dproperty=value option.
Table 5-1 Locale System Properties
| System Property | Description |
|---|---|
user.language |
Two-letter language name code based on ISO 639. |
user.region |
Two-letter region name code based on ISO 3166. |
file.encoding |
Default character-encoding name based on the IANA Charset MIB. |
On Linux, these properties are extracted from the LANG locale environment variable using the format language_region.encoding. The user.language property is obtained from the language code. The user.region property is obtained from the region code. The file.encoding property is obtained from the encoding suffix. For example, to change the locale behavior of cvm on Linux, simply change the LANG locale environment variable to set the locale system properties.
% setenv LANG en_US.ISO8859_1
Therefore,
user.language = en user.region = US file.encoding = ISO8859_1
The lib/zi directory contains a small set of example timezone information files. Additional files can be generated and placed in this directory. See the javadoc comments for the sun.util.calendar.ZoneInfoFile class for information about generating alternate timezone information files.
In the CDC Java runtime environment, font management is a subset of the functionality provided by Java SE technology and is described below in Table 5-2.
Table 5-2 Font Management Comparison
| Feature | Java SE | CDC |
|---|---|---|
|
Default font mapping between Java logical fonts and platform logical fonts is specified at build-time. |
yes |
yes |
|
Logical font mapping in |
yes |
no |
|
Bundled Lucida fonts in |
yes |
no |
|
Application-specific fonts in an application's |
yes |
no |
The six logical fonts available to a Java application are described in Table 5-3.
In practice, the only way to specify alternate fonts is to remap the platform logical fonts. TrueType fonts are mapped to logical platform fonts used by the CDC Java runtime environment for the Java logical fonts described in Table 5-3.
Table 5-3 Logical Font Names
| Java Logical Font | Qt Logical Font | Example | Description |
|---|---|---|---|
default |
Sans Serif |
Courier |
The default font is used when no other font is specified or if an attempt to match a font fails. |
dialog |
Sans Serif |
Lucida Sans |
A font for displaying fixed information within a dialog box or form. |
dialoginput |
Courier |
Lucida Sans Typewriter |
A font that is used for text fields within dialog boxes and forms that represent user input. |
monospaced |
Courier |
Lucida Sans Typewriter |
A non-proportional font where each character has the same width. This simplifies string width calculations for dialog boxes and forms. |
sanserif |
Sans Serif |
Helvetica |
A streamlined font that is simpler to render on low-resolution devices like computer monitors and faxes. |
serif |
Serif |
Times Roman |
A font with short lines at the end of the main strokes of a character to ease visual character recognition. |