文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>中文化

中文化

时间:2005-07-28  来源:constanceni

中文化:1.字符集 2.locale 3.输入法 4.字体美化

1.中文语言字符集
   ttfonts-zh_CN_2.12-1.noach.rpm
      ttfonts-zh_TW_2.11-19.noach.rpm
      如果不安装这个语言包,就会无法显示网页上汉字


=======================================================================


2. locale 系统语言的设置
       运行locale可看到系统语言环境变量的设置情况

       重要的环境变量:
                LANG="zh_CN.GB18030"      中文
                LANG="en_US.UTF-8"          英文

                LC_CTYPE="zh_CN.GB18030"   除此外其他设置成英文似乎都可以
                LC_MESSAGES="zh_CN.GB2312" 
                LC_TIME
 



       在文件 /etc/sysconfig/i18n 中设置这些变量
       或文件 ~/.i18n

       存在的字符集合似乎有
                 zh_CN.GB2312
                 zh_CN.GBK
                 zh_CN.UTF-8
                 en_US.UTF-8
                 en_US  ISO-8859-1
       也许存在一个 /etc/locale.gen 文件用于设置
=======================================================================
3. 输入法相关

       安装输入法:
               fcitx                    fcitx-3.1.1.tar.gz
               chinput
               scim

       一些原理: xim        有关输入的服务?
                               iiimf      ?       

       
               
        配置输入法(以fcitx为例)
               重要需要修改的环境变量:
                          export XIM = fcitx
                          export XMODIFIERS = "@im=fcitx"
                          export XIM_PROGRAM=fcitx

              这些变量可以在文件.bash_profile中设置,但这样一来即使在文本界面下也会设置,不合适
              故将之在 /etc/X11/xinit/xinitrc.d/xinput脚本程序中设置,应当是在XWindows启动的时候才执行吧

             ------------------------------------------------------------------------------------------------------
             |  存在的问题:                                                                                                          |
             |           每次结束XWindows时,都会显示 locale 不被 Xlib 支持的错误。|
             |           且仍存在一些文件名显示为乱码。                                                         |
             |----------------------------------------------------------------------------------------------------|

        启动输入法
                          fcitx &
                         在~/.gnomerc 中设置, 这个文件可以在gnome启动时执行

3.1  控制台的中文环境  zhcon
                         http://zhcon.sourceforge.net/zhcon-0.2.1.tar.gz

             (我还没有安装,待续)

4.  字体安装与美化
               (由于我的系统字体不算难看,所以这个只是试了试,没有深入)
             拷贝Windows下的字体文件到Linux中间
                  C:/windows/Font/    -->      /usr/share/fonts/windows/
            字体文件有
                  SimSun18030.ttc
                  simsun.ttc
                  tahomabd.ttf
                  tahoma.ttf
           然后在字体文件所在目录下执行:
                  ttmkfdir                                                                          生成font.scale
                  cp fonts.scale fonts.dir
                  chkfontpath --add /usr/share/fonts/windows         将字体的路径加入配置文件


相关阅读 更多 +
排行榜 更多 +
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载