I finally finished SCIM on Mandriva Linux today (Chinese can be entered)

Source: Internet
Author: User
Tags i18n
The article is reproduced below: (Thank you very much !)
FC3 used by the author of the original article. I used Mandriva Linux Limited Edition 2005.

Well, if you have a similar problem, I believe the reposted below will help you solve the problem.

Summary of English locale in Chinese

Finally, let's take a look. However, the settings of these environment variables are indeed tricky and anyway. Here, we will summarize the following:

I installed Fedora Core 2 (which was directly upgraded from my original Redhat 8.0). The window manager used is KDE (3.2.2), and Qt is also 3.2. FC2 is installed by default.

Step 1:

1. Run rpm-qa | grep 'ines' to check whether the kde-i18n-Chinese and kde-i18n-Chinese-Big5 language packages are installed on your machine. If not, download the installation. Search from google or use rpmfind.net to select a matching version for installation. (Note: I am not sure about the usefulness of these two language packs. I don't know if only the font file and input method are provided. If yes, this step can be omitted)

2. Run rpm-qa | grep 'scim 'to check whether scim is installed. If not, download and install the scim input method and Input Method files. (Note: You can select other Chinese input methods, such as chinput/fcitx. The setting method is similar. The following uses scim as an example)

3. Open a console, type the command locale, the default output of the English interface should be that all language environment variable values are en_US.UTF-8, and LC_ALL is empty. If so, go to step 2. If not, view several files: Shell startup files :~ /. Cshrc ,~ /. Bashrc, or/etc/sysconfig/i18n, or ~ /. I18n. check whether these environment variables are specified in these files. If yes, comment the corresponding settings or change the assignment to a en_US.UTF-8

4. enter system-config-language. A dialog box is displayed. If you have installed the two language packs, You can see three languages: Simplified Chinese, traditional Chinese, and English. Select English.

5. Open the KDE Control Center (K menu \ Preference \ Control Center), select Country/Region & Language, and retain only English in Launguage. (Note: This step and LC_ALL determine the KDE menu display language)

6. Edit the shell Startup File Based on the shell you are using. I use csh, so yes ~ /. Cshrc. If you use bash, you can edit. bashrc or. bash_profile and add the following lines at the end of the file:
Csh:
 

Setenv XMODIFIERS "@ im = SCIM"

Setenv XIM scim

Setenv XIM_PROGRAM scim

Setenv LC_CTYPE zh_CN.gbk

Bash:
 
Export XMODIFIERS = "@ im = SCIM"

Export XIM = scim

Export XIM_PROGRAM = scim

Export LC_CTYPE = zh_CN.gbk

After editing, save and exit.

Note: This is the most important step. Set SCIM as the input method server in the first three lines. The case sensitivity of SCIM is critical. The last line sets the language type to Chinese. Note that only LC_CTYPE is required here, instead of LC_ALL. On FC2, if it is set to zh_CN.gb18030, the system will say that this locale cannot be found, so zh_CN.gbk is used.

 

7. On the terminal, type echo $ LANGUAGE. If the output is zh_CN *, add the following at the end of the shell Startup File:
 

Setenv LANGUAGE en_US.UTF-8
Or
Unsetenv LANGUAGE
Otherwise, when you execute Common commands (such as df, ls-lt), the output will be a Chinese description.

8. Edit ~ /. Xinitrc. If you use KDE, this file is as follows (note that scim is started before KDE is started ):
 

Scim-d

Exec startkde

9. now, Ctrl + D is returned to the original logon interface (if you want to, restart and test the setting validity). After logging on to the console again, enter the locale command (open a console in the graphic interface) and the result is similar to the following:
 

LANG = en_US.UTF-8

LC_CTYPE = zh_CN.gbk

LC_NUMERIC = "en_US.UTF-8"

LC_TIME = "en_US.UTF-8"

LC_COLLATE = "en_US.UTF-8"

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 $ LANGUAGE again, this variable is either not defined, or en_US.UTF-8, which is normal.
You can also use setenv or env to view all environment variables.

9. If you are using KDE, right-click the K panel below and Add \ Applet \ System tray. You can see a keyboard chart, which indicates that scim has been started.

 

10. Test: open a konsole and use telnet bbs.dartmouth.edu or any other Chinese bbs to check whether Chinese is displayed on konsole. On konsole, ctrl + space to check whether the scim input can be obtained. If the environment variables are correct and the software is correctly installed, there should be no problem.

 

11. in konsole, type qtconfig, and under the interface tab, XIM input style, select over the spot (other options are acceptable, but it is said that there will be some minor issues), then select the menu File \ Save

 

12. This step has basically been set. The disadvantage is that kde's Chinese fonts are all Vector Fonts. If anti-aliasing (AA) is opened, it looks blurred. Nowadays, many people use the simsun. ttf font in windows (license may not be used in a strict sense ). Several font sizes in the simsun font are embedded with bitmap fonts, so the edges are clear. The installation method is 1. mount your windows partition to a directory under/mnt/, and then mount windows/fonts/simsun. copy the ttf file to a directory of yours. Assume It is/usr/X11R6/lib/X11/fonts/TrueType. Copy the copy and run the copy (refer to the code of a friend who posted the copy)
 

Cd/usr/X11R6/lib/X11/fonts/TrueType

Ttmkfdir.

Cp ttfonts. scale ttfonts. dir

/Usr/sbin/chkfontpath -- add/usr/X11R6/lib/X11/fonts/TrueType

Here, chkfontpath uses locate chkfontpath to find the path on your machine. You can also directly edit/etc/X11/fs/config and put/usr/X11R6/lib/X11/fonts/TrueType in the other two Chinese font directories (obtained by installing the Language Pack, the default value is/usr/share/fonts/zh_CN/TrueType and/usr/share/fonts/zh_TW/TrueType. After that, restart X.

 

The Chinese font on the KDE interface. The Chinese font on mozilla/mozilla firefox should be converted to simsun by default. If the mp3 title in XMMS is not enough, select Options \ Preference, select use fontsets on fonts, and then select
-Adobe-helvetica-medium-r-normal-*-140-*-p-*-iso10646-1,
-Misc-simsun-medium-r-normal-*-140-*-c-*-koi8-r
Write it in one line.

 

In short, FYI, no warranty of any kind.

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.