| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 9)

Using the Japanese Language Facilities

As a part of G2, the Japanese language facilities support all system-defined G2 features, plus the ability to develop, run, and view applications in Japanese. KBs developed in Japanese are platform independent and can run without modification when the current language is not Japanese. The Japanese language facilities provide this support for developing Japanese KBs:

Feature Description
Text transliteration and conversion
Converts Romaji input to Hiragana or Katakana automatically.
Customized menus and other facilities
G2 facilities, such as the editor, have localized option buttons. Loading japanese.kl provides localized versions of the G2 system-defined menu options. Developers can localize any facility element, as described in Using Language Translations for Localization.
Knowledge engineering
Can assign Japanese names to all the items you define, including objects, workspaces, rules, procedures, and methods.
Text editing
Provides the system-defined G2 editing features, as well as special modes added to support Hiragana, Katakana, and Kanji characters.

Support for the Japanese language within G2 consists of the Kanji Front-End Processor (KFEP), which handles all Japanese keyboard input, and the knowledge library, japanese.kl, that includes translations of all G2 menu choices. Japanese outline fonts are available if you have appropriate authorization.

Accessing Japanese Menus

The Japanese menus are in G2's Japanese KL.

To merge japanese.kl into your KB:

  1. Choose: Main Menu > Merge KB.

  2. Enter the name of the KL you wish to merge into your KB: japanese.kl

The japanese.kl file is located in the kbs\utils subdirectory of the G2 product directory. Check with your system administrator if you are unable to locate the sample KBs that ship with G2.

After merging the KL into your own KB, this workspace is displayed:


The current user mode is developer. Starting the KB activates all go-to-subworkspace and other buttons.

To start the KB:

The G2 menu translations and the translated Text Editor buttons do not appear unless the current language is Japanese.

To change the current language to Japanese:

  1. Choose Main Menu > System Tables > Language Parameters

  2. Edit the Current-language attribute and select japanese.

Entering Japanese Text

When japanese is the current language in your KB, the editor includes four language mode selectors to help you entering Japanese text, as shown in the following figure:


The language modes are:

Mode: Description: Character interpretation:
Kanji
The Japanese writing system using characters borrowed from Chinese.
Hiragana, and displays Kanji choices whenever a convertible sequence occurs.
Katakana
The form of Japanese writing used for scientific and technical terms, official documents, and words adopted from other languages.
Romaji, and transliterates the characters to Hiragana.
Hiragana
A Japanese script, the second of two forms of Japanese writing.
Romaji, and transliterates the characters to Hiragana.
English
American English language.
Latin characters. This is the default mode.

Using Language Mode Selectors

Keyboard input is phonetic. The Text Editor accepts several phonetic variations for Japanese characters, including si and shi; ti and chi, and tu and tsu.

The KFEP interprets character input based on the language mode you select, as noted in the previous table. You can choose a mode by clicking an activity button directly with the mouse, or by using Control + k to cycle through the choices.

To illustrate the effect of each language mode, the next diagram shows what happens when you enter the characters chi in Kanji, Katakana, and Hiragana. Notice that, while in Kanji mode, the characters are interpreted as Hiragana, and the editor displays various Kanji choices appropriate for that input.


Entering JIS Codes

When the current language is japanese, you can input an explicit Kanji ideogram that you cannot obtain through the conversion process by entering any character from the Japanese Industrial Standard (JIS) X 0208-1990 code. G2 supports the entire code set, which consists of four-digit Hexadecimal values. If you enter a JIS code when the current language is not japanese, G2 interprets the value as a Unicode character code.

To enter a JIS code in the Text Editor:

  1. Type Alt + i to invoke a secondary text entry box.

  2. Enter the four-digit code, as shown next.

    The character appears as soon as you enter a valid four-digit code.


Alternatively, you can merge in the jiscodes.kl KL.

To merge jiscodes.kl into your KB:

The jiscodes.kl file is located in the kbs\utils subdirectory of the G2 product directory, and displays a series of text inserter workspaces, each with multiple sets of characters, a few of which are shown next.


Entering Text in the Kanji Language Mode

As noted earlier, when Kanji is the language mode and you enter text, the KFEP interprets the characters as Hiragana, displaying Kanji choices for any appropriate conversion options. As a user, you can either convert the Hiragana input to Kanji, by choosing from one of the options listed, or retain the kana form for individual characters.

To help you convert text, the Text Editor displays more activity buttons as you enter text. In addition to the system-defined Text Editor activity buttons (Cancel, Undo, Redo, End, Paste), and the Japanese language mode buttons (Kanji, Katakana, Hiragana, and English), the following activity buttons are also available in Kanji mode:

This activity button... Translates to... Which lets you...

convert
Convert the Hiragana selection to the highlighted Kanji character.

next
Highlight the next Kanji character.

previous
Highlight the previous Kanji character.

skip (Control + ' )
Move the Hiragana selection to the next possible conversion region.

accept
Accept the highlighted Kanji character to replace the Hiragana selection. If no Kanji character is selected, G2 accepts the first character.

expand (Control + >)
Expand the conversion region (if possible)

shrink (Control + <)
Shrink the conversion region (if possible)

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 9)

Copyright © 1997 Gensym Corporation, Inc.