Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users 中文 (Chinese)
  • Search

Chinese support but system in english + learn chinese

欢迎来到Gentoo中文论坛。
Post Reply
  • Print view
Advanced search
40 posts
  • 1
  • 2
  • Next
Author
Message
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

Chinese support but system in english + learn chinese

  • Quote

Post by tane_stelzer » Wed Jan 18, 2006 10:45 pm

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
Top
tysn
n00b
n00b
Posts: 4
Joined: Mon Feb 21, 2005 7:06 am

  • Quote

Post by tysn » Thu Jan 19, 2006 4:56 am

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: Select all

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
Top
cowboy
n00b
n00b
Posts: 37
Joined: Mon Apr 11, 2005 11:54 am
Location: Tomorrow

  • Quote

Post by cowboy » Thu Jan 19, 2006 7:56 am

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 ! ? :lol:
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Thu Jan 19, 2006 8:08 am

I'm using an English system, but I can see and input Chinese fonts. Here's my /etc/locales.build:

Code: Select all

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: Select all

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!
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Thu Jan 19, 2006 8:53 am

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
Top
tysn
n00b
n00b
Posts: 4
Joined: Mon Feb 21, 2005 7:06 am

  • Quote

Post by tysn » Thu Jan 19, 2006 2:59 pm

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
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Thu Jan 19, 2006 5:29 pm

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

Code: Select all

emerge glibc
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: Select all

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
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Thu Jan 19, 2006 7:44 pm

tane_stelzer wrote: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

Code: Select all

emerge glibc
If you have not used "userlocales" USE flag when you built your system, maybe you don't need to recompile glibc. Type

Code: Select all

$ 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: Select all

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!
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Thu Jan 19, 2006 8:43 pm

Ok that is really helpful thx just one last question, 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??
Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Fri Jan 20, 2006 6:02 am

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!
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Fri Jan 20, 2006 10:48 am

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
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Fri Jan 20, 2006 11:34 am

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!
Top
cowboy
n00b
n00b
Posts: 37
Joined: Mon Apr 11, 2005 11:54 am
Location: Tomorrow

  • Quote

Post by cowboy » Fri Jan 20, 2006 11:56 am

tane_stelzer wrote:Ok that is really helpful thx just one last question, 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??
convmv

convert filenames to utf8 or any other charset
http://packages.gentoo.org/search/?sstring=convmv

id3iconv

to convert ID3 tags in mp3 files from whatever machine encoding you have (GB2312/GBK for Chinese, etc) to Unicode
http://www.cs.berkeley.edu/~zf/id3iconv/

cjkuni-fonts

Full sized CJK unicode truetype fontset
http://packages.gentoo.org/ebuilds/?cjk ... 0.20050501
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sat Jan 21, 2006 2:28 am

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
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sat Jan 21, 2006 3:34 pm

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: Select all

ls /usr/share/locale/
and the output was

Code: Select all

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: Select all

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: Select all

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
Top
kohno
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat Aug 28, 2004 4:12 am

  • Quote

Post by kohno » Sat Jan 21, 2006 3:55 pm

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.
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sat Jan 21, 2006 4:03 pm

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
Top
kohno
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat Aug 28, 2004 4:12 am

  • Quote

Post by kohno » Sat Jan 21, 2006 6:03 pm

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".
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sat Jan 21, 2006 6:56 pm

Okay i will change to rxvt, as emerge -uDN world i get an error here it is

Code: Select all

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
Top
kohno
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat Aug 28, 2004 4:12 am

  • Quote

Post by kohno » Sat Jan 21, 2006 7:37 pm

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.
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sat Jan 21, 2006 7:49 pm

Okay i am just emerging glibc again, and how about that error when i tried to emerge world do you know anything about that?
Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sun Jan 22, 2006 1:24 am

Okay i did emerge glibc and i did use the locales Hauser gave me i still get Posix and no zh_CN or anything my useflags contained cjk and nls
Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working
Top
kohno
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat Aug 28, 2004 4:12 am

  • Quote

Post by kohno » Sun Jan 22, 2006 3:31 am

Please post the result of "locale -a" and the content of your ~/.xinitrc.
Top
tysn
n00b
n00b
Posts: 4
Joined: Mon Feb 21, 2005 7:06 am

  • Quote

Post by tysn » Sun Jan 22, 2006 7:06 am

maybe you have not used the "userlocales" USE flag when you recompiled glibc?

Code: Select all

echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
Top
tane_stelzer
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri Dec 30, 2005 6:13 pm
Location: Edinburgh, Scotland and Kempen, Germany

  • Quote

Post by tane_stelzer » Sun Jan 22, 2006 5:26 pm

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
Top
Post Reply
  • Print view

40 posts
  • 1
  • 2
  • Next

Return to “中文 (Chinese)”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic