How to configure an English Japanese capable Debian 

http://dspnet.fr.eu.org/~lonewolf/LinuxJapan/Howto_English_Japanese.html

This howto is a step by step guide to configure a working Debian english system, with the capability of displaying AND writing japanese.

1.Packages installation 

You need a bunch of package to be able to use japanese (from Debian Reference):

The list seems to be the minimum requirement. You may need additional fonts, and the best way to find out is to use apt-cache (such like "apt-cache search mincho" or "apt-cache search kochi")

Since I'm familiar with canna and kinput2, I suggest you use it, too.

2. Locales installation 

You must add to your system the proper locales: en_US.ISO-8859-1 ja_JP.eucJP You may need en_US.UTF8 or ja_JP.UTF8, also.

To do this, just type dpkg-reconfigure locales and follow the instructions. The tool will generate all the locale you checked in.

3. User local configuration 

You'll need to use the set-language-env script. Select the "7 : ja (Nihongo,Japanese)" and answer all questions default (it is written in japanese and I'm not able to translate it)

The set-language-env script will modify your .bashrc, .bash_profile and .Xressources files. The system is quite clever:

This system is very useful to Japanese speaking users,but it is not suitable for English speaking users who need a system which responds in english, not in japanese. Besides, if the terminal you use to launch X with startx isn't japanese capable, your X Window session won't be as well.

So you need to change a few things. add this at the end of your .bashrc:

#force EN menu and error displaying
LANGUAGE=C
LC_COLLATE=C
LC_NUMERIC=C
LC_MONETARY=C
LC_TIME=C
export LANGUAGE
export LC_COLLATE
export LC_NUMERIC
export LC_MONETARY
export LC_TIME

You'll still have Japanese locales ON, but all the common display will be in english.

4. Startx and X tuning 

Edit your XF86Config file, search for freetype, and:

#       Load    "freetype"
        Load    "xtt"

Comment freetype and add xtt driver. Warning: X will fail if freetype and xtt are loaded together

Then, search for "FontPath" and add:

FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

edit your .xinitrc file and add this, just before window manager.

# Start Japanese environment
export LANG=ja_JP.eucJP
export LC_MESSAGES=ja_JP.eucJP #change to en_US on Sarge, otherwise Mozilla will be in japanese
export LC_CTYPE=ja_JP.eucJP
LANGUAGE=C
export LANGUAGE
# Start Japanese input
XMODIFIERS="@im=kinput2"
export XMODIFIERS
kinput2 -xim -kinput -canna &
xmodmap -e 'keycode 115 = Kanji'
[window manager - mine is fvwm2]

All the locales will be set to japanese but, to keep the English menu, we add LANGUAGE set up to C locale. You can probably use your own locale as well (such as French) but you may have some problems with accents and kanji.

At this stage, we launch the kinput2 software which can handle japanese entry, and we add the left Windows Key as "Kanji Key". The default {Shift space} remains, but since the Windows key is unused…

List of the Windows Keys codes.

left Windows key: 115
right Windows key  : 116
right Window menu key : 117

8. X software 

  1. Terminal.

  2. LaTeX-CJK

  3. Various X softwares

    • Gimp 1.2.

    • Mozilla