# kde + simplfied chinese + chinese input e.g. xcin

## Linux-Spielkind

Hello everybodoy!!!

Is it generaly possible to input chinese in KDE. I searched everywhere for HOWTOS but the were mostly in chinese and actually my chinese is very very limited.  :Confused: 

So is there anyboy who can show my step by step how do do it??

While playing around with the kde language pack I was able to switch to what they call simplyfied chinese, but i looks differen from gvim started with LANG=zh_CN.gb2312  

Thank you for any help!!!

----------

## Hauser

To input Chinese in KDE, it's not necessary to install kde-i18n, that's for Chinese interface.  You need to specify "LC_CTYPE" in ~/.xinitrc (if you startx) or ~/.bashrc (if you use xdm), and also the input method (fcitx, scim, etc), this is a sample .xinitrc:

```
export LC_CTYPE=zh_CN

export XMODIFIERS="@im=fcitx"

export XIM=fcitx

export XIM_PROGRAM=fcitx

exec fcitx&

exec startkde

```

If you use xdm, you may need to append "fcitx &" to ~/.bash_profile for the program to start automatically or alternatively make a link to /usr/bin/fcitx in ~/.kde/Autostart.

----------

## Linux-Spielkind

Hello

I modifiied the as you told me, but I still can't input chinese . i can press ctrl + space and get a input. but its kind of useless i can't see anything just blank boxes. Programs still start in standart  C . my guess would be that i use kdm instead of xdm

thanks for helping

----------

## EricHsu

Linux-Spielkind, to make things short:

 build glibc with Chinese locales support:

 echo "sys-libs/glibc userlocales" >> /etc/portage/package.use

 edit /etc/locales.build, comment out any locales you don't want, and add the following Chinese locales (assume that you want Simplified Chinese support - since you've mentioned zh_CN.GB2312  :Smile:  )

```

zh_CN/GB18030

zh_CN.GB2312/GB2312

zh_CN.UTF-8/UTF-8 

```

 emerge --oneshot glibc

 emerge fcitx (or scim-chinese) set LC_CTYPE to zh_CN as Hauser suggested (or you could set those variables via /etc/env.d/99local which will result in system-wide Chinese locale support)

HTH  :Smile: 

If you need any further explaining, please keep posting and I will go into details  :Very Happy: 

----------

## sunmoon1997

i have written a script to auto-launch XIM with desktop environment. may it can help you:)

http://www.magiclinux.net/~sunmoon/download/xim-config.tar.bz2

download & unpack this package to your root file system

 *Quote:*   

> 
> 
> wget http://www.magiclinux.net/~sunmoon/download/xim-config.tar.bz2
> 
> tar jvxf xim-config.tar.bz2 -C /
> ...

 

then 

 *Quote:*   

> 
> 
> #ln -s /usr/bin/xim-launcher  /etc/X11/Xsession.d/00xim-launcher
> 
> 

 

last, restart X, the script will lauch the XIM for you, but you should install some chinese input methods such as fcitx, scim and set LC_CTYPE to correct locale the input method support(maybe zh_CN) firstly.

 :Smile: 

----------

## Linux-Spielkind

hello = 你好 

I managed to get chinese inputsupport runnubg in a kde- konsole by changeing the ENV-Vars

like hauser told me. maybe i try to but put scribt for theese vars to the ~./kde/Autostart folder!!

Does anyone know how i get more than the 5 chinese letters in fcitx or how can i switch trough the sevral posibilities after entering pin jin???

thanks for helping

 谢谢

----------

## lanb

I use Debian, But I believe the configuration files should be the same, edit ~/.fcitx/config, there should be a line looks like this:

候选词个数=5

change that 5 to the number you want, then you can see more than 5 characters. To go to next set of characters, just press - or = in your keyboard

if you cannot see any characters in the input bar, specify a chinese font in the same file:

显示字体=SimSun

mine is SimSun, a font I use illegally (from M$), so help yourself.

Hope it would help

----------

## Linux-Spielkind

你好,  hello

I worked around with the glibc like EricHsu told me, but I don't see any effects it's the same like before, please explain to me what i did!!!  :Shocked: 

 I'm still not succesfull in getting kde autoloaded with chinese support, with the exeption of the startx command. I wonder if someone knows how to get kde's displaymanager kdm or anyohter *dm to do the same.

I also need some chinese fonts for X ,because sometimes letters are not proper displayed or missing.

By the wa can some help me with learnig chinese. I'm looking for an app which helps learnig chinese letters hanzi i guess. Currently I use hanzim but it's very difficult to use, sometimes i don't find what i'm looking for. 

  thanks and bye

  谢谢       再见

----------

## akar

 *Linux-Spielkind wrote:*   

> 你好,  hello
> 
> I worked around with the glibc like EricHsu told me, but I don't see any effects it's the same like before, please explain to me what i did!!! 
> 
>  I'm still not succesfull in getting kde autoloaded with chinese support, with the exeption of the startx command. I wonder if someone knows how to get kde's displaymanager kdm or anyohter *dm to do the same.
> ...

 

May sunmoon1997's message found in this page will help you, the script he provided auto detect and launch the Chinese Input method app for you!!

 *Linux-Spielkind wrote:*   

> 
> 
> I also need some chinese fonts for X ,because sometimes letters are not proper displayed or missing.
> 
> 

 

install a bitmap fontset which covered most of the CJK ideographs

```
# emerge unifont
```

for hi-quality Chinese fonts, may you can try to install the APL licensed TrueType font manually, improved version by Firefly, which have embeded Bitmap fonts and contain both two Chinese fontset(Big5+GB2312):

ftp://cle.linux.org.tw/pub2/fonts/FireFly/

 *Linux-Spielkind wrote:*   

> 
> 
> By the wa can some help me with learnig chinese. I'm looking for an app which helps learnig chinese letters hanzi i guess. Currently I use hanzim but it's very difficult to use, sometimes i don't find what i'm looking for. 
> 
>   thanks and bye
> ...

 

This online resources might not what you are looking for, but i think it is worth to introduce here:

《林語堂當代漢英詞典》網絡版

Lin Yutang's Chinese-English Dictionary

of Modern Usage (Online Version) 

http://www.arts.cuhk.edu.hk/Lexis/Lindict/

 *Quote:*   

> 
> 
> eg:
> 
> 1. input 'thanks', then search, results:
> ...

 

It may also aid you on the difficult chinese word, you are hard to find a way to input by a chinese IM.

 :Wink: 

----------

## EricHsu

 *Linux-Spielkind wrote:*   

> 你好,  hello
> 
> I worked around with the glibc like EricHsu told me, but I don't see any effects it's the same like before, please explain to me what i did!!! 
> 
> 

 

你好  :Smile: 

The glibc thing is just to make your system support chinese locales, it's necessary for the chinese input methods to work (correct me if I'm wrong  :Smile:  )

You shouldn't "see any effects" unless you set your system's locale to zh_CN which will result in a chinese system (if your apps have built with "nls cjk" support)  :Smile: 

 *Quote:*   

> 
> 
>  I'm still not succesfull in getting kde autoloaded with chinese support, with the exeption of the startx command. I wonder if someone knows how to get kde's displaymanager kdm or anyohter *dm to do the same.
> 
> 

 

Sorry that I didn't quite catch it, do you want a chinese system or just want to display/input chinese in a english system?

For the former, you will need to set your LC_ALL=zh_CN;

For the latter, this link might be helpful for you:

View and input Chinese in an English System

To autoload the input method, let's take fcitx for example, you may try to:

```

ln -s /usr/bin/fcitx ~/Desktop/Autostart/

```

This is one of the freedesktop's specs, it should work on any DE/WMs which follow the specs. I use xfce4 and gnome only, so maybe someone who's familiar with kde could help you more  :Smile: 

 *Quote:*   

> 
> 
> I also need some chinese fonts for X ,because sometimes letters are not proper displayed or missing.
> 
> 

 

Well, there is a chinese font which is widely used which named simsun (simsun.ttc or simsun.ttf), IIRC, it supports at least GBK charset which covers almost all of the commonly used hanzi. 

However, it's a font from windows, if you don't mind using it, you could get a copy of it from a windows which supports chinese...  :Twisted Evil: 

 *Quote:*   

> 
> 
> By the wa can some help me with learnig chinese. I'm looking for an app which helps learnig chinese letters hanzi i guess. Currently I use hanzim but it's very difficult to use, sometimes i don't find what i'm looking for. 
> 
>   thanks and bye
> ...

 

akar has provided a good dictionary for you. 

From my experience of learning english (though it's still very poor, I can feel my limit when I try to express something...), the best way to learn a language is to read/write extensively! (That's why I keep using my poor english and read english in gentoo forum, slashdot... everyday  :Wink:  )

For reading chinese, maybe you could visit google's chinese news? And if you would like to write chinese...umm, I'm thinking about openning a thread for people like you who can practise their chinese there, how do you think? (Or you can open it yourself  :Wink:  )

----------

## dundas

That's great Hauser and EricHsu, after combining many things u mentioned (not necessarily all), I got all chinese worked on the system and on the input.

thx a lot! u are the best!

----------

