Full introduction to Chinese language in RedHat Linux 7.1

Source: Internet
Author: User
Tags i18n

Full introduction to localization in RedHat 7.1

Text/clinuxer

For many Chinese users who want to learn and learn Linux, ugly Chinese support is the main reason for their continued use. If you are disappointed, you may choose to install a Chinese version such as bluepoint, red flag, and turbolinux. However, in the Linux camp, RedHat has to be involved, the overwhelming materials and software on the Internet are for Redhat. If there are incompatibility problems with other versions, or you cannot find the commands you need ...... At this time, I really felt the meaning of "the bear's paw and the fish cannot have both sides!
However, with the release of RedHat 7.1, these problems have finally been solved. The core used by RedHat is kernel 2.4.2, xfree86 is 4.03, Kde is 2.1.1, and glibc is 2.2.2, the underlying operating system is well supported for internationalization. If you only need to display Chinese characters or browse Chinese webpages, you do not need to install any additional software.
Linux internationalization and Localization
To enable Linux to support multiple languages, there are two problems involved: Internationalization and localization, i18n and l10n.
1. i18n
"Internationalization": internati-onalization is an international English word. The first letter of an English word, I, and the last letter, contains 18 letters. Therefore, it is often referred to as i18n. I18n is a concept used to provide an architecture so that the same Code can be applied to various language habits and coding systems. Programmers only need to use the mechanisms and guidelines of this architecture to write applications, you can support a wide variety of languages without creating new Code (especially the C library and the X graphical interface's internationalization design ).
2. l10n
"Localization". The English language is localization. Because there are 10 characters between l and N, it is also often referred to as l10n. The main function of l10n is to process software to meet the special requirements of users on specific markets for languages and functions. Software Quality Assurance activities involving Text Translation, user interface layout adjustment, localization feature development, production of online documents and printed manuals, and the normal operation of localized versions, of course, input methods should also be supported.
That is to say, i18n provides underlying support for the operating system and l10n provides local support. As we have seen, Win2000 is developed in this mode. The kernel of Win2000 in different languages is exactly the same (i18n), but the operating interface and documentation are different (l10n ).
Built-in Chinese support
RedHat uses the locale technology to provide multilingual support. We only need to set the corresponding locale.
It should be noted that the Redhat 7.1 of the "typical installation" does not support simplified Chinese. You must manually select Simplified Chinese support. If you are a newbie and do not know how to choose it, it is also very simple, selecting "Everything (fully installed)" in the custom type during installation can help you solve this problem, but you need enough disk space (2.5 GB required ).
1. Set Chinese locale
The Locale switching of RedHat is very simple: Enter the Linux window interface, execute locale_config to bring up a select local language window, select "Chinese (CN. gb2312) zh_cn.gb2312 "to set locale to" simplified Chinese ". If you want to try" Traditional Chinese ", you can also select" Chinese (TW. big5) zh_tw.big5 ".
2. Chinese locale application
Open a console and run the date command. How can we see a line of garbled characters? Yes, it should be garbled, but it indicates that you have set the Chinese locale correctly.
(1) GNOME Environment
Run startx to enter the default GNOME Desktop. You will see that the time on the taskbar has been displayed in Chinese, and the menu in the footboard in the lower left corner also has Chinese characters (note: here I am talking about "yes" rather than "yes". This is because gnome's "simplified Chinese" is not completely completed yet, and the menus you see are actually mixed in Chinese and English ).
Maybe many of my friends are more familiar with the KDE environment. It doesn't matter. You can select your preferred Operating Environment (gnome, Kde, FVWM, etc.) by running switchdesk )......
(2) KDE Environment
Compared with Gnome, Kde is more localized, at least the menu is completely displayed in Chinese. But I don't know why. I still haven't installed the KDE Simplified Chinese package for Redhat 7.1. I need to manually add the first CD of RedHat 7.1 to the optical drive, and then execute the following command:
Mount/mnt/CDROM
CD/mnt/CDROM/RedHat/RPMS
Rpm-IVH kde-i18n-Chinese-2.1.1-2.noarch.rpm
Rpm-IVH kde-i18n-Chinese-Big5-2.1.1-2.noarch.rpm
In this way, Kde's simplified/Traditional Chinese display support has been installed, and you need to set the Display language and font.
Open the control center of KDE and select "personalization"/"Country & Language". The settings are as follows:
Country: Asia & Oceania/China
Language: Simplified Chinese (zh_cn.gb2312)
Chars: gb2312.1980-0
(3) display the Chinese directory/file name
RedHat can display Chinese directories and file names. You only need to add the-O codePage = 936, iocharset = cp936 parameter after Mount. For example:
Mount-T vfat/dev/hda1/mnt/dosc-O codePage = 936, iocharset = cp936
There is also a permanent way to modify/etc/fstab. below is my fstab file:
There are many Chinese Input Methods in Linux, but not every input method can be used in RedHat 7.1. Generally, you need to make some adjustments, this adjustment is definitely difficult for beginners.
In Linux, there are two common input methods: chinput and xcin, which are difficult to install. For the sake of simplicity, we use tailism and use the rfinput Input Method in redflag Linux to implement Chinese Input in RedHat 7.1.
User popwander will redflag Linux Input Method transplanted to Redhat 7.1, we can go to http://go3.163.com /~ Download popwander/software/rf-xim-input-2.1-2.i386.rpm and run the following command to install:
Rpm-IVH -- force rf-xim-input-2.1-2.i386.rpm
Rfinput comes with a Chinese dot matrix font and automatically sets environment variables. in RedHat 7.1, no other settings are required. It is started with KDE/gnome startup, you only need to press Ctrl + space to call up the Chinese Input Method. For KDE users, you can also click the icon in the lower-right corner of the desktop to select the input method.
Rfinput includes smart ABC and five input methods, which can be used to directly input phrases. Moreover, rfinput supports Association and memory of input methods in windows, making it easy to use. If you are five users, you can also edit the five-stroke input code table file in rfinput. This is a text file. You can add your own phrases and each phrase occupies one line, for details about the format, see/usr/local/rfinput/lib/wbx. MB.
Note: In customized Linux, the input method version is 2.0.1, and the latest version of the optical disk version is 2.2-2. Neither of them can be directly used under Redhat 7.1. If you want to compile it yourself, download the source code file.
Port windows Fonts
After xfree86 4.0, TrueType fonts can be well supported. TrueType fonts can be scaled infinitely, and the display effect is naturally comparable to that of non-dot matrix fonts. If you want to achieve a nice font effect in Windows, you must install the Chinese TrueType font. Of course, the simplest thing is to use the Chinese TrueType font that comes with windows. For convenience, we only use the simsun font as an example.
Note: xfree86 3.x has a problem with TrueType support. Therefore, before installing the font, you must first confirm that xfree86 4.03 is used. Use xdpyinfo to view the version number of xfree86:
Xdpyinfo | grep release
Make sure that the displayed number is 4003.
1. font installation
I installed the TrueType font in the/usr/share/fonts/zhfonts directory. You can set it according to your preferences. Note that TrueType fonts are installed in/usr/share/fonts/default/TrueType on many websites. This directory already exists in RedHat 7.1, the TrueType font is installed, so select a directory as follows:
Mkdir/usr/share/fonts/zhfonts
CP/mnt/dosc/Windows/simsun. TTF/usr/share/fonts/zhfonts
CD/usr/share/fonts/zhfonts
Ttmkfdir> fonts. dir
Ttmkfdir does not recognize windows TrueType fonts very well. We need to edit fonts. dir and change it to the following content:
4
Simsun. TTF-MISC-simsun-Medium-r-normal -- 0-0-0-0-p-0-ascii-0
Simsun. TTF-MISC-simsun-Medium-r-normal -- 0-0-0-0-p-0-gbk-0
Simsun. TTF-MISC-simsun-Medium-r-normal -- 0-0-0-0-p-0-iso8859-1
Simsun. TTF-MISC-simsun-Medium-r-normal -- 0-0-0-0-p-0-gb2312.1980-0
Then copy fonts. dir to fonts. Scale (set the font to be scalable ):
Cat fonts. dir> fonts. Scale
2. Support setting TrueType fonts
We already have the TrueType font that xfree86 can use, and now we want to edit the xfree86 4.03 configuration file XF86config-4, add the simsun font path (in section "Files" section), as shown below:
Section "Files"
Fontpath "UNIX/: 7100"
Fontpath "/usr/share/fonts/zhfonts"
Endsection
Add the TrueType font support module xtt to the modules section (the FreeType module can also support TrueType fonts, but the display speed is not as high as xtt, and the two cannot be used at the same time), as shown below:
Section "module"
......
Load "xtt"
......
Endsection
3. Use TrueType font
After the preceding settings, the use of TrueType fonts is very simple.
(1) KDE Environment
"KDE control center (KDE Control Center)" → "Perception" → "font", set all fonts to simsun, with a size of 16 and a nice UI (different situations may vary for everyone, set the size on your own ).
(2) GNOME Environment
The use of TrueType Chinese fonts in GNOME is troublesome. We must manually modify the resource configuration file of gnome.
Edit the/etc/GTK/gtkrc. zh_cn file and set the fontset as follows:
Fontset = "-MISC-simsun-Medium-r-normal -- 16-0-0-0-p-0 -*-*"
Edit the/etc/gnome/gtkrc. zh_cn file and set all fontsets:
Fontset = "-MISC-simsun-Medium-r-normal -- 16-*-gb2312.1980-0"
Start KDE/gnome now and you will surely see the beautiful TrueType font ......
4. display Chinese Characters in Konqueror
Konqueror is the combination of resource manager and browser in Kde, but many of my friends have reported that browsing Chinese Web pages in Konqueror cannot be displayed normally, because Konqueror uses the GBK font, remember that we are on fonts. is there such a line in Dir:
Simsun. TTF-MISC-simsun-Medium-r-normal -- 0-0-0-0-p-0-gbk-0
This is used to provide GBK font support. With this line, your Konqueror should be able to display Chinese webpages normally.
Chinese Language Environment in Character Mode
Just like in Windows 9x, we also need a pdos95 to support Chinese. In character mode, we also need a Chinese environment. Compared with the built-in Chinese support in window mode, in character mode, some third-party software may be used to provide Chinese support.
Common Chinese Console software includes CCE, wzole, and unicon. The first two are external running Chinese platforms and do not need to re-compile the kernel. unicon needs to patch and re-compile the kernel. We recommend that you use wzole. Although this is a commercial software, it is free for our individual users.
To http://www.floppycenter.com/Guest.asp? Shrid = 280145322 download two software wzole-4 [1]. 1n. linux. x86.tgz & wzole-4 [1]. 1n. GB. tgz (the former is the Chinese support environment, and the latter is the input method). Then, go to http://wzis.xoasis.com/applic.htmlto apply for a personal license (sent to your mailbox via e-mail) and perform the following steps to install it:
Tar xzpf wzole-4 [1]. 1N. Linux. x86.tgz
Tar xzpf wzole-4 [1]. 1N. GB. tgz
./Wzole_config
Finally, place the licenses sent to you in the/usr/lib/wzole. Lic file, and execute GCE to enter the Chinese environment in character mode.
Now, all Chinese support for Redhat 7.1 has been completed. I hope this article will help you ......
Good luck :)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.