[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: URL for an English site describing how to enable Chinese



frank zhao wrote:

Dear Bengt:

To enable Chinese input method with X11/gnome, one of
the good approaches what I am using is make the system
and X11 aware of the following environment variables.
1)  export LC_CTYPE="zh_CN.UTF8"
2) export XMODIFIERS=@im=fcitx
where fcitx is a popluar Chinese input method, I found
it is quite stable and simple comparing to SCIM,
especially adapting to a multi-monitor environment.

As an example, I would like to give my solution at
here as your references:

1)Run "apt-get install fcitx" to obtain the fcitx
program.
2)Here I would suppose you are using gdm as your login
shell.  Then on my box I just modify /etc/gdm/Xsession
to insert a few lines after localisation:

....
 else
   unset LINGUAS
 fi
fi

# PLEASE ADD THE FOLLOWING TEXT
# Include the script inside the user own directory
if [ -f ~/.gdm_profile ]; then
   . ~/.gdm_profile
fi

# The default Debian session runs xsession first, so
we just do that for
# "custom"
...

and 3) then you can edit ~/.gdm_profile like this :

 export LC_CTYPE="zh_CN.UTF8"
export XMODIFIERS=@im=fcitx
Note: surely you can modify ~/.xsession file to
achieve the same goal.  But personally I dont like
this change to bother other shells :-)  Furthermore I
suppose that the others such as KDE, xfce etc. can
apply a similar approach.  Additionally, if your X11
is launched by a login console with startx etc., you
might want to perform the change to .bashrc.
4) add fcitx daemon to gnome->Desktop
Preferences->Advanced->Sessions as a auto-load program
when gnome is loading.
5) restart gnome and try to open a gnome application
like gedit and hit C-SPC see what happened.

There are several advantages to configure like above. The most important one is that every user can
customise their own language options in their own
directory and this would not effect other shells.  If
another particular shell like KDE/kdm requires the
same thing, guide the first kdm session to that
configurtion file.
If you have any other problem and good suggestion,
please let me know.  I would be very gald to discuss
with you. Enjoy Chinese, Frank
From Manchester, UK

I guess these steps are also very important.
1. edit /etc/locale.gen, add this line
zh_CN UTF-8
2. locale-gen

Be care switch to root when do them.

--

                Liu Chang

                   Tel: +8610-82317640
                   Addr: 1-72#, BeiHang Univ, Beijing, China



Reply to: