日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux图形界面为英文,Linux下“英文控制台 中文图形界面”的实现

發布時間:2025/3/12 linux 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux图形界面为英文,Linux下“英文控制台 中文图形界面”的实现 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

以Slackware12.2為例:

首先安裝好slackware12.2,裝好后敲入startx,進入圖形界面。第一次登錄圖形界面時會提示你是哪國人(查下戶口先^_^),堅定的選擇中國,默認語言就是簡體中文,確定后就進入了全中文圖形界面。然而進去后就看到很不舒服的中文,看到的中文界面詞組基本都是缺胳膊少腿的,必須要從頭設置了。

打開終端(鼠標右鍵點運行,輸入konsole,就出來了),輸入locale來看看語言設置,我的結果如下:

LANG=en_US.UTF-8

LC_CTYPE="en_US.UTF-8"

LC_NUMERIC="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_TIME="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=en_US.UTF-8

意義如下:

1、語言符號及其分類(LC_CTYPE)

2、數字(LC_NUMERIC)

3、比較和排序習慣(LC_COLLATE)

4、時間顯示格式(LC_TIME)

5、貨幣單位(LC_MONETARY)

6、信息主要是提示信息,錯誤信息,狀態信息,標題,標簽,按鈕和菜單等(LC_MESSAGES)

7、姓名書寫方式(LC_NAME)

8、地址書寫方式(LC_ADDRESS)

9、電話號碼書寫方式(LC_TELEPHONE)

10、度量衡表達方式 (LC_MEASUREMENT)

11、默認紙張尺寸大小(LC_PAPER)

12、對locale自身包含信息的概述(LC_IDENTIFICATION)

下邊的設置都是對/etc/profile.d/lang.sh的改動,改動前將文件中都注釋掉(加#,可別習慣加//^_^):

一).如果你需要一個純中文的GUI的話,寫入LC_ALL=zh_CN.UTF-8,或者LANG=zh_CN.UTF-8都可以。那12個LC_**不寫。

二).如果你也和我一樣想要英文CLI,中文GUI,那么就寫入LC_CTYPE=zh_CN.UTF-8,LANG=en_US.UTF-8就可以了。其他的不寫。

三).假如你高興的話,可以把12個LC_**一一設定成你需要的值,打造一個古靈精怪的系統: LC_CTYPE=zh_CN.GBK/GBK(使用中文編碼內碼GBK字符集); LC_NUMERIC=en_GB.ISO-8859-1(使用大不列顛的數字系統) LC_MEASUREMENT=de_DE@euro.ISO-8859-15(德國的度量衡使用ISO-8859-15字符集) 羅馬的地址書寫方式,美國的紙張設定……。估計沒人這么干吧- -!

下邊是我改動前的lang.sh:

#!/bin/sh # Set the system locale. (no, we don't have a menu for this ;-) # For a list of locales which are supported by this machine, type: # locale -a # en_US is the Slackware default locale: export LANG=en_US # 'C' is the old Slackware (and UNIX) default, which is 127-bit # ASCII with a charmap setting of ANSI_X3.4-1968. These days, # it's better to use en_US or another modern $LANG setting to # support extended character sets. #export LANG=C # There is also support for UTF-8 locales, but be aware that # some programs are not yet able to handle UTF-8 and will fail to # run properly. In those cases, you can set LANG=C before # starting them. Still, I'd avoid UTF unless you actually need it. #export LANG=en_US.UTF-8 # Another option for en_US: #export LANG=en_US.ISO8859-1 # One side effect of the newer locales is that the sort order # is no longer according to ASCII values, so the sort order will # change in many places. Since this isn't usually expected and # can break scripts, we'll stick with traditional ASCII sorting. # If you'd prefer the sort algorithm that goes with your $LANG # setting, comment this out. export LC_COLLATE=C # End of /etc/profile.d/lang.sh

這個是我設置后的lang.sh:

#!/bin/sh # Set the system locale. (no, we don't have a menu for this ;-) # For a list of locales which are supported by this machine, type: # locale -a # en_US is the Slackware default locale: # export LANG=en_US export LC_CTYPE=zh_CN.UTF-8 export LANG=en_US.UTF-8 # 'C' is the old Slackware (and UNIX) default, which is 127-bit # ASCII with a charmap setting of ANSI_X3.4-1968. These days, # it's better to use en_US or another modern $LANG setting to # support extended character sets. #export LANG=C # There is also support for UTF-8 locales, but be aware that # some programs are not yet able to handle UTF-8 and will fail to # run properly. In those cases, you can set LANG=C before # starting them. Still, I'd avoid UTF unless you actually need it. #export LANG=en_US.UTF-8 # Another option for en_US: #export LANG=en_US.ISO8859-1 # One side effect of the newer locales is that the sort order # is no longer according to ASCII values, so the sort order will # change in many places. Since this isn't usually expected and # can break scripts, we'll stick with traditional ASCII sorting. # If you'd prefer the sort algorithm that goes with your $LANG # setting, comment this out. # export LC_COLLATE=C # End of /etc/profile.d/lang.sh

如果想知道更多的LC_**知識,請去 http://hi.baidu.com/edeed/blog/item/2e99a14440bd8884b2b7dcb1.html看看。

至于其他的linux發行版,我想原理應該差不多,大家研究研究吧。與君共勉!!

總結

以上是生活随笔為你收集整理的linux图形界面为英文,Linux下“英文控制台 中文图形界面”的实现的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。