| View previous topic :: View next topic |
| Author |
Message |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Wed Jan 18, 2006 10:45 pm Post subject: Chinese support but system in english + learn chinese |
|
|
Hi there, well i dont speak chinese neither can i understand it, but still i do have a lot of chinese music on my computer, aswell as japanese and some korean. Now i would like to be able to display that, but not quite sure how, most of the thread are for converting completly to chinese but i want to keep my english system, and just be able to see chinese in amarok gaim file manager(i use filer and gentoo), and of course i want to be able to see chinese on websites(not for me but for my frds if they want to check emails or check sth).
And secondly my girlfriend always wants me to learn chinese, just i am a very lazy person and need someone to kick me hard, so i thought maybe there is a programm out there which will slowly introduce me and then maybe after a couple of months understand a bit more, but it has to be easy at the beginning hehe.
I hope someone can help me, but I am sure someone can, from what i have read so far ( the parts i was able to understand ie english) you seem to be a bit more friendlier then the general forum.
Thx anyway
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
tysn n00b

Joined: 21 Feb 2005 Posts: 4
|
Posted: Thu Jan 19, 2006 4:56 am Post subject: |
|
|
You may simply copy a Chinese font to the right path in your system, if your locale is utf8.
But before that you must make sure your glibc was compiled to support zh_CN.UTF-8
a /etc/locales.build maybe like this: | Code: | en_US/ISO-8859-1
en_US.UTF-8/UTF-8
zh_CN/GB18030
zh_CN.GB2312/GB2312
zh_CN.UTF-8/UTF-8 |
tysn |
|
| Back to top |
|
 |
cowboy n00b

Joined: 11 Apr 2005 Posts: 37 Location: Tomorrow
|
Posted: Thu Jan 19, 2006 7:56 am Post subject: |
|
|
1. Set system encoding to UTF-8,(maybe en_GB.UTF-8 suit for you )
2. Emerge cjkuni-fonts
3. Add USE "cjk" "nls" to make.conf (optional but recommend)
4. Your girlfriend is Chinese ! ?  |
|
| Back to top |
|
 |
Hauser l33t


Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Thu Jan 19, 2006 8:08 am Post subject: |
|
|
I'm using an English system, but I can see and input Chinese fonts. Here's my /etc/locales.build:
| Code: | en_US.UTF-8/UTF-8
en_US/ISO-8859-1
zh_CN.GB18030/GB18030
zh_CN.GBK/GBK
zh_CN.UTF-8/UTF-8
zh_CN/GB2312
zh_HK.UTF-8/UTF-8
zh_HK/BIG5-HKSCS
zh_TW.EUC-TW/EUC-TW
zh_TW.UTF-8/UTF-8
zh_TW/BIG5
|
After copying some fonts into /usr/share/fonts, add the path of the Chinese font directory into /etc/X11/xorg.conf. You also need to set the locale in your ~/.xinitrc (~/.bashrc if you use xdm), like
| Code: | | export LC_CTYPE=zh_CN.GBK |
This one line is enough. Which locale to set depends on how your Chinese files were created, you may need to do some testing to find the correct locale.
You may also need to do a 'emerge -uDN world' with USE flags "cjk" and "nls" to get full Asian language support.
P.S. You may also need to add the Chinese, Korean, or Japanese charsets in kernel, they are located in File systems -> Native Language Support. _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Thu Jan 19, 2006 8:53 am Post subject: |
|
|
Oh cheers i wil try all of that out once i come back later, if i encounter any problems i will come back and ask
thx very much
Tane
edit: to set the locales i should just use the localization guide on gentoo.org?
And do i have to follow the stepts everyone mentioned or whose steps should i follow????
CHeers
tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
tysn n00b

Joined: 21 Feb 2005 Posts: 4
|
Posted: Thu Jan 19, 2006 2:59 pm Post subject: |
|
|
you should just follow the stepts metioned by Hauser:)
1, edit the /etc/locales.build to suport Chinese, and then re-emerge your glibc
2, copy some Chinese fonts into /usr/share/fonts, add the Chinese fonts' path into /etc/X11/xorg.conf
3, set your locale somewhere, like "export LC_CTYPE=zh_CN.UTF-8"
4, other things to pay attention to
enjoy it!
tysn |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Thu Jan 19, 2006 5:29 pm Post subject: |
|
|
So for 1. it is okay to just follow the localization guide http://www.gentoo.org/doc/en/guide-localization.xml and re-emerge glibc is just
for 2 which fonts should i use and how do i copy them into fonts and what line do i have to add to /etc/X11/xorg.conf
well i dont complete chinese will i still keep everything in english when i set my locals to | Code: | | export LC_CTYPE=zh_CN.UTF-8 | and just be able to see chinese?
Well i am sorry but i really would like to understand what i am doing i have a couple of other problems atm and i dont want to create anymore so id rather ask twice.
Thanks very much for your replies so far anyway
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
Hauser l33t


Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Thu Jan 19, 2006 7:44 pm Post subject: |
|
|
If you have not used "userlocales" USE flag when you built your system, maybe you don't need to recompile glibc. Type
| Code: | | $ locale -a | grep zh |
If you see things like zh_CN, zh_CN.gb18030, zh_CN.gbk, zh_CN.utf8, zh_HK, etc., skip the glibc part. If you see nothing, then you'll have to add those locales to /etc/locales.build and re-emerge glibc.
| tane_stelzer wrote: | ...
for 2 which fonts should i use and how do i copy them into fonts and what line do i have to add to /etc/X11/xorg.conf
... |
The Chinese fonts in portage include zh-kcfonts, twmoefonts, hkscs-ming, and arphicfonts. The arphicfonts are probably more useful than others because both Simplified and Traditional Chinese fonts are included. Just emerge them as usual, they should be installed in the /usr/share/fonts directory. As to /etc/X11/xorg.conf lines, they are in the "Files" Section, just look at it and you'll know how to edit it.
| tane_stelzer wrote: | ...
well i dont complete chinese will i still keep everything in english when i set my locals to | Code: | | export LC_CTYPE=zh_CN.UTF-8 | and just be able to see chinese?
... |
Yes and no. In general, your interface will be in English and you should be able to see and input Chinese in a file, browser, and so on. But if your Chinese files were created in a locale environment other than zh_CN.UTF-8 (say zh_CN.GBK as in a Simplified Chinese windows), you would not be able to see the filename correctly if it's in Chinese; that's why I said you might need to do a bit testing.
Moreover for the filenames in Chinese or other Asian languages to show themselves correctly, you may need to recompile the kernel as I mentioned. _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
|
| Back to top |
|
 |
Hauser l33t


Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Fri Jan 20, 2006 6:02 am Post subject: |
|
|
| tane_stelzer wrote: | | ...if i cant see the chinese correctly as u mentioned,is there a way to change it to utf8,so that i would be able to read it?? |
I'm not sure if there's any tools to do such things. If you can't find one, try the following. Find the correct locale first so that you can read the filenames. Copy and paste the filenames into a text file; at the same time do some indexing so that you know which filename corresponds to which file. Restart X with the utf8 locale, open the text file with an editor such as kwrite, switch to the correct 'Encoding' so that you can read those Chinese names. Rename those files by copying and pasting from that textfile. It's pretty troublesome, but since you can't input Chinese, this is the only way I can think of. _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Fri Jan 20, 2006 10:48 am Post subject: |
|
|
Okay well i hope it will work, i tried it but it didnt work, it said at boot up that it failed to load local, but i think i know the problem just haven't had time to correct it, so which is a good input method, scim is the one i used on ubuntu, but i really didnt like the fonts at all. i hope those simple trad ones are nicer to look at hehe even i dont understand, well for input maybe jsut ask my gf to write everything for me? oh i was wondering to input trad, is there sth like pinyin?? Or do you have to use that weird system where each letter key represents some symbol and you ahve to make up complex characters from those, i think that is what the standard one is on windows? is there an easier one for trad??
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
Hauser l33t


Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Fri Jan 20, 2006 11:34 am Post subject: |
|
|
| tane_stelzer wrote: | | ... scim is the one i used on ubuntu... |
You've used scim before?  _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
| Back to top |
|
 |
cowboy n00b

Joined: 11 Apr 2005 Posts: 37 Location: Tomorrow
|
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Sat Jan 21, 2006 2:28 am Post subject: |
|
|
well i had it installed, its not that i cant write single words but i cant make any sentences, but yeah just would like to have that on again with nicer fonts i think cowboy gave them to me so how do i get scim up and running? well maybe i should just do the locals first still havent corrected my mistake _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Sat Jan 21, 2006 3:34 pm Post subject: |
|
|
OK i did my best to follow your instructions, but i think i made some kind of mistake. Well here is what i did.
i checked | Code: | | ls /usr/share/locale/ | and the output was
| Code: | C cy et_EE ia mk pt ta yi
af da eu id ml pt_BR te yo
am de eu_ES is mn rm tg zh
ang de_AT fa it mr ro th zh_CN
ar el fi ja ms ru tk zh_CN.GB2312
as en fr ka my_MM ru_RU tl zh_TW
az en@boldquot ga kn nb rw tr zh_TW.Big5
az_IR en@quot gl ko ne sk ug zu
be en_AU gr ku nl sl uk
bg en_CA gu li nn sp uk_UA
bn en_GB he locale.alias no sq uz
br en_US hi lt nso sr uz@Latn
bs eo hr lug or sr@Latn vi
ca es hu lv pa sr@ije wa
cs et hy mi pl sv xh
|
then i wrote the locales into /etc/locales.build
here is what cat says
| Code: | en_US/ISO-8859-1
en_US.UTF-8/UTF-8
ja_JP.EUC-JP/EUC-JP
ja_JP.UTF-8/UTF-8
ja_JP/EUC-JP
en_HK/ISO-8859-1
en_PH/ISO-8859-1
de_DE/ISO-8859-1
de_DE@euro/ISO-8859-15
es_MX/ISO-8859-1
fa_IR/UTF-8
fr_FR/ISO-8859-1
fr_FR@euro/ISO-8859-15
it_IT/ISO-8859-1
zh_CN/ISO-8859-1
zh_CN.UTF-8/UTF-8
zh_CN.GB2312/ISO-8859-1
zh_CN.GB2312.UTF-8/UTF-8
zh_TW/ISO-8859-1
zh_TW.UTF-8/UTF-8
zh_TW.Big5/ISO-885901
|
All the zh_CN i added the i re-emerged glibc just like you said
then i emerged teh arphicfonts and added the line into xorg.conf
then i did | Code: | | export LC_CTYPE=zh_CN.UTF-8 |
then i rebooted and i still couldnt see the chinese.i checked in amarok and in filer( my file manager also in xterm and nth showed me chinese.
Tane[/code] _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
kohno Tux's lil' helper

Joined: 28 Aug 2004 Posts: 112
|
Posted: Sat Jan 21, 2006 3:55 pm Post subject: |
|
|
Do you mean to say you can't see Chinese filenames or you can't see any Chinese at all? Try this website with your brower: http://www.yahoo.com.cn/ Can you see the Chinese fonts? What does the command "locale -a" show?
BTW what filemanager are you using? Not like Gnome-terminal or Konsole, you need do some setting up to make xterm show Chinese. |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Sat Jan 21, 2006 4:03 pm Post subject: |
|
|
Well i can see the chinese on that website, but i cant see chinese filesnames in amarok and filer. Filer is the name of my file manager, and how to i setup xterm to see chinese??? Well maybe get it to work in amarok first is the most important to me then also filer. So is my /etc/locales.build right cos i thought that is where the mistake is, it kind of looks wrong or imcomplete too me. _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
kohno Tux's lil' helper

Joined: 28 Aug 2004 Posts: 112
|
Posted: Sat Jan 21, 2006 6:03 pm Post subject: |
|
|
If you can see Chinese with your browser, your fonts are installed ok. AFAIK, filer and xterm don't support Chinese very well, I don't know how to set them up. I would switch to rxvt or mlterm if I were you.
You should append your /etc/locales.build as posted by Hauser and make sure you use the "userlocales" USE flag when you recompile glibc.
As to amarok, have you done "emerge -uDN world" with "cjk" and "nls" USE flags? At the very least you should recompile xorg-x11.
If "export LC_CTYPE=zh_CN.UTF-8" doesn't work, have you tried "export LC_CTYPE=zh_CN.GBK" and others? Whenever you restart X, you should first check your locale by typing "locale | grep LC_CTYPE". |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Sat Jan 21, 2006 6:56 pm Post subject: |
|
|
Okay i will change to rxvt, as emerge -uDN world i get an error here it is
| Code: | Traceback (most recent call last):
File "/usr/bin/java-config", line 14, in ?
from java_config import jc_options
ImportError: No module named java_config
!!! ERROR: net-dns/libidn-0.5.15 failed.
!!! Function src_compile, Line 25, Exitcode 0 |
and locale | grep LC_CTYPE just gives me POSIX what ever that is? but iw ill try to export some other.
thx a lot hope i can solve that problem soon
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
kohno Tux's lil' helper

Joined: 28 Aug 2004 Posts: 112
|
Posted: Sat Jan 21, 2006 7:37 pm Post subject: |
|
|
| tane_stelzer wrote: | and locale | grep LC_CTYPE just gives me POSIX what ever that is? but iw ill try to export some other.
|
That means you don't have zh_CN.UTF-8 built in, so probably you didn't compile glibc properly. |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
|
| Back to top |
|
 |
kohno Tux's lil' helper

Joined: 28 Aug 2004 Posts: 112
|
Posted: Sun Jan 22, 2006 3:31 am Post subject: |
|
|
| Please post the result of "locale -a" and the content of your ~/.xinitrc. |
|
| Back to top |
|
 |
tysn n00b

Joined: 21 Feb 2005 Posts: 4
|
Posted: Sun Jan 22, 2006 7:06 am Post subject: |
|
|
maybe you have not used the "userlocales" USE flag when you recompiled glibc? | Code: | | echo "sys-libs/glibc userlocales" >> /etc/portage/package.use |
|
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Sun Jan 22, 2006 5:26 pm Post subject: |
|
|
Okay, well due to a big problem with portage i had to reinstall gentoo now, i emerged glibc before i emerged anything else, and i watched i closly so i think i got it working now but first have to get everything runnig i will get back too you once i am able to judge this, thx very much
oh yeah one last question, what is a good music player to play chinese and it should be as light as possible thx very much for everything
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
|