LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Chinese input in English environment (http://www.linuxquestions.org/questions/slackware-14/chinese-input-in-english-environment-525179/)

satimis 02-03-2007 03:10 AM

Chinese input in English environment
 
Hi folks,

Slackware-11.0
KDE 3.5


Please advise;
1)
How to read Traditional/Simplified Chinese in English environment

2)
How to add Traditional Chinese input in English environment


I have been googling around. What I can find was to change it to Chinese environment with menu in Chinese.

TIA


B.R.
satimis

David the H. 02-03-2007 05:44 AM

See here: Multilingual Text Support on Linux.

Short form: Make sure you're running a UTF-8 language environment, then install scim and a supported Chinese IME program.

diskoe 02-04-2007 09:28 PM

Quote:

Originally Posted by satimis
Hi folks,

1)
How to read Traditional/Simplified Chinese in English environment

Look at my response in this thread:
http://www.linuxquestions.org/questi...d.php?t=520151

Quote:

Originally Posted by satimis
2)
How to add Traditional Chinese input in English environment

I have not had to do any input, so I can't answer this one.

satimis 02-12-2007 04:46 AM

Hi David the H.

Tks for your advice and link.

The above refers to Debian. The files mentioned there can't be found on slamd64-11.0. I made full installation of slamd64-11.0

ls /usr/X11/lib/X11/locale/
Code:

C                iso8859-1  iso8859-6    ko_KR.UTF-8      microsoft-cp1256  zh_CN
armscii-8        iso8859-10  iso8859-7    koi8-c            mulelao-1        zh_CN.UTF-8
compose.dir      iso8859-11  iso8859-8    koi8-r            nokhchi-1        zh_CN.gb18030
el_GR.UTF-8      iso8859-13  iso8859-9    koi8-u            pt_BR.UTF-8      zh_CN.gbk
en_US.UTF-8      iso8859-14  iso8859-9e  lib              tatar-cyr        zh_HK.UTF-8
georgian-academy  iso8859-15  ja          lib64            th_TH            zh_HK.big5
georgian-ps      iso8859-2  ja.JIS      locale.alias      th_TH.UTF-8      zh_HK.big5hkscs
ibm-cp1133        iso8859-3  ja.SJIS      locale.dir        tscii-0          zh_TW
iscii-dev        iso8859-4  ja_JP.UTF-8  microsoft-cp1251  vi_VN.tcvn        zh_TW.UTF-8
isiri-3342        iso8859-5  ko          microsoft-cp1255  vi_VN.viscii      zh_TW.big5

Code:

# ls /usr/X11/lib/X11/locale/zh_CN
Compose  XI18N_OBJS  XLC_LOCALE

Quote:

Short form: Make sure you're running a UTF-8 language environment, then install scim and a supported Chinese IME program.
# slackpkg search scim
Code:

No package contains the selected pattern.
scim is not on the repositories.

Where can I get scim. TIA

B.R.
satimis

satimis 02-12-2007 05:00 AM

Hi diskoe,

Quote:

Look at my response in this thread:
http://www.linuxquestions.org/questi...d.php?t=520151
Tks for your URL.

Where can I downloamd zh-arphicttf-2.11.tar.gz?

The sites "ftp://freebsd.sinica.edu.tw/pub/keith/" seems not working. Tks.


B.R.
satimis

titopoquito 02-12-2007 05:26 AM

Google is your friend. There are many FreeBSD mirrors.

ftp://ftp.freebsd.org/pub/FreeBSD/po...tf-2.11.tar.gz

satimis 02-12-2007 09:51 AM

Hi titopoquito

Tks.

satimis

satimis 02-12-2007 09:59 AM

Hi diskoe,

# which mkfontscale
Code:

which: no mkfontscale in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
# which mkfontdir
Code:

which: no mkfontdir in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
They are not installed.

I suppose mkfontscale, mkfontdir, etc. coming from xorg-x11-font-utils

# slackpkg search xorg-x11-font-utils
Code:


No package contains the selected pattern.

not available on repositories.

Where can I find the package xorg-x11-font-utils for slamd64. Googling did not find it. Tks.


B.R.
satimis

titopoquito 02-12-2007 10:12 AM

You find those applications in /usr/X11R6/bin -- in stock Slackware and in Slamd64.

lchxr 02-14-2007 02:29 PM

Suppose you need an English environment with Chinese support.

For chinese display
1. install kdei (in slackware-11.0-CD3)
Code:

kde-i18n_kde-i18n-zh_CN-3.5.4-noarch-1.tgz  <--- for Simplified Chinese suuport.
kde-i18n-zh_TW-3.5.4-noarch-1.tgz  <--- for Tranditional Chinese support.

2. install fonts. There are many options.
(a) Copy TTF fonts from Windows to Slackware (sim*.ttf)
(b) Download TTF fonts from http://www.ctan.org/tex-archive/fonts/arphic/
Code:

gbsn00lp-20050720.tar.gz  <--- simplified Chinese fonts
gkai00mp-20050720.tar.gz  <--- simplified Chinese fonts
bkai00mp-20050720.tar.gz  <--- BIG5 fonts for traditional Chinese
bsmi00lp-20050720.tar.gz  <--- BIG5 fonts for traditional Chinese

(c) Download WQY fonts from
http://wqy.sourceforge.net/cgi-bin/enindex.cgi

Install Chinese fonts as TTF fonts as other post discussed.
Then you can read Chinese without problems.

For Chinese input
3. Install SCIM,
Code:

wget http://downloads.sourceforge.net/scim/scim-1.4.5.tar.gz
tar zxvf scim-1.4.5.tar.gz
./configure --prefix=/usr
make && make install

4. Install IME engine
Code:

wget http://downloads.sourceforge.net/scim/scim-pinyin-0.5.91.tar.gz
tar zxvf scim-pinyin-0.5.91.tar.gz
./configure --prefix=/usr
make && make install

Configure SCIM
5. setup locale
Code:

export LANG=en_US.UTF-8
or if you would like to set up locale globally, edit /etc/profile.d/lang.sh if you are using bash.
Code:

#File /etc/profile.d/lang.sh

#export LANG=en_US
export LANG=en_US.UTF-8

6. setup environment variables
Code:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

7. invoke Chinese input method. From a console, type
Code:

scim -d
8. If you edit file in kedit or kate, you can hit Ctrl+SPC to active pinyin input.

I cannot active "Pinyin Input" in vim or emacs. If you have a solution for vim and emacs editor, please post here.

I have created scim.Slackbuild, scim-pinyin.SlackBuild, scim-fcitx.SlackBuild, and *-.tgz for my own use. I don't know how to upload.

BCarey 02-14-2007 08:37 PM

Hi,

I followed your instructions, and everything seems okay, just that when I press Ctl-Space nothing happens. (I have tried to do Chinese input in the past, and always get stuck on this point.) Can you help me? Is there any other way to invoke the input method other than Ctl-Space?

Thanks,
Brian

satimis 02-17-2007 04:27 AM

Hi lchxr,


Tks for your advice.

Following diskoe's advisce above Traditional Chinese can be displayed without problem.

Now I'm prepared to install Traditional Chinese input

Quote:

Suppose you need an English environment with Chinese support.

1. install kdei (in slackware-11.0-CD3)
Code:

kde-i18n_kde-i18n-zh_CN-3.5.4-noarch-1.tgz  <--- for Simplified Chinese suuport.
kde-i18n-zh_TW-3.5.4-noarch-1.tgz  <--- for Tranditional Chinese support.


IIRC I made full installation of slamd64-11.0 except Game. Is there any way to recheck them?

Quote:

3. Install SCIM,
Code:

wget http://downloads.sourceforge.net/scim/scim-1.4.5.tar.gz
tar zxvf scim-1.4.5.tar.gz
./configure --prefix=/usr
make && make install


I have scim-1.4.5.tar.gz download on the box.

Quote:

4. Install IME engine
Code:

wget http://downloads.sourceforge.net/scim/scim-pinyin-0.5.91.tar.gz
tar zxvf scim-pinyin-0.5.91.tar.gz
./configure --prefix=/usr
make && make install


What package shall I download for Cangjie and Easy Traditional Chinese input? Where can I find them? Tks

Do I need to install;
scim-gtk2-immodules
scim-modules-socket
scim-tables-zh

If YES where can I download them. TIA


B.R.
satimis

lchxr 02-19-2007 03:51 PM

Quote:

when I press Ctl-Space nothing happens. (I have tried to do Chinese input in the past, and always get stuck on this point.)
This can usually happen. Please check your locale and XMODIFIERS
Code:

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ echo $XMODIFIERS
@im=SCIM
$

You can also try LANG=zh_CN.UTF-8 to see if it helps.

Quote:

Is there any other way to invoke the input method other than Ctl-Space?
No, to my knowledge. But you can run scim-setup to change the hot-key.

lchxr 02-19-2007 04:25 PM

Quote:


What package shall I download for Cangjie and Easy Traditional Chinese input? Where can I find them?
You need scim-tables, download from http://downloads.sourceforge.net/sci...s-0.5.7.tar.gz

I am not sure if scim-gtk2-immodules and scim-modules-socket are necessary. I have installed Dropline Gnome. In my Slackware 11.0 I have
Code:

$ ls /etc/gtk-2.0
gdk-pixbuf.loaders  gtk.immodules
$


satimis 02-19-2007 10:31 PM

Hi lchxr,


Tks for your advice and URL. Performed following steps;

# ls /etc/gtk-2.0
Code:

gdk-pixbuf.loaders  gtk.immodules
Download
scim-1.4.5.tar.gz
scim-tables-0.5.7.tar.gz

Ran
# tar zxf scim-1.4.5.tar.gz
# tar zxf scim-tables-0.5.7.tar.gz

# cd /path/to/scim-1.4.5
# ./configure --prefer=/usr
# cd /path/to/scim-tables-0.5.7
# ./configure --prefer=/usr
Both went through without complaint.

# export LANG=en_US.UTF-8
# export XMODIFIERS="@im=SCIM"
# export GTK_IM_MODULE=xim
# export QT_IM_MODULE=xim
# scim -d
Code:

scim: error while loading shared libraries: libscim-1.0.so.8: cannot open shared object file:
No such file or directory

# find / -name libscim
No printout

Which package provides "libscim-1.0.so.8"? Where can I download it? Tks.

What is the difference between
- running "export LANG=en_US.UTF-8"
and
- adding it on /etc/profile.d/lang.sh

Tks


B.R.
satimis


All times are GMT -5. The time now is 03:11 PM.