【雞】丁酉年己酉月庚戌日 / 八月初三日
Wednesday September 20, 2017

Configure your Linux distribution

    1. You need to install Chinese fonts (or unicode fonts) and assign them. Install the following packages if you use one of the distributions:
    Debian : Arphic TT Chinese fonts, xfonts-intl-chinese, xfonts-cjk and unifont.
    RedHat : taipeifonts, ttfonts-zh_CN, ttfonts-zh_TW
    Installation guide for X, Mozilla and OpenOffice.org (Chinese)

    2. You need an input method editor (perferred is a XIM [X Input Method], specs).

    3. Set the locale right :
    if you don't have the apropiate locales : edit /etc/locale.gen to select the locale(s) you want built, and then run locale-gen.
    To enable full support also add following:
      $(HOME)/.bashrc
      alias ls="ls --show-control-chars"
      export LC_ALL=zh_TW.Big5
      // To see which locales your system supports : locale -a
      export LC_CTYPE=zh_TW.Big5 // LC_CTYPE is an environment variable which indicates how characters should be handled.
      export LANG=zh_TW.Big5
      export LC_MESSAGES=zh_TW.Big5
      export XMODIFIERS="@im=xcin"
      // XMODIFIERS is an environment variable indicating which XIM server to talk to
      stty cs8 -istrip // stty - change and print terminal line settings
      stty pass8 // pass8 same as -parenb -istrip cs8

      $(HOME)/.inputrc
      set meta-flag on
      set convert-meta off
      set output-meta on

    If you are using gnome2 (so also gtk2 en pango 1.2) and xcin, using the following commands to use it in gnome2 programs :
    export LANG=zh_TW.Big5
    export XMODIFIERS=@im=xcin
    xcin&
    program to run (i.e. xcin& gaim)
    (if you add previous lines without the 'program to run' in a .profile -file in the user home directory, xcin will run automatically on login)

Translation
Gnome and KDE (other wm might as well but i'm not sure) use a on the fly translation method making use of PO-file (gnu gettext message catalogs). So if you have the sourcecode of a program and there is a po directory with po files in, don't hesitate to translate and send it to the program maintainer.

Other tips and tricks
  • If you can't view Chinese in Xpdf, you can adjust .xpdfrc (should be in your home dir) and add reference to your Chinese fonts in there.
[ < Linux ]