今天,被一个朋友打电话问到了关于Linux语言支持的问题,他们的服务商需要他们准备好Linux的环境却没有提前告知中文支持,后来对口的时候发现没有中文支持,便要求我认识的那朋友重装操作系统,并选择中文语言支持。
大概的情况是如下图所示的,中文字符乱码:
Linux_Language_error_1

事实上,为Linux额外增加语言支持,没有那么麻烦。
在接下来的章节里我会分别演示在RHEL5和RHEL7中新增语言支持的方式,其实它们没有本质的差异,只不过是操作界面上的差异而已。

下面开始。
————————————————
在Linux中,为操作系统添加语言支持,需要有YUM的支持才可以。
所以,在开始本文的各项操作之前,确保你的环境里,正确配置了YUM,并且是配置的YUM可以使用的。
关于YUM的配置,请在右侧搜索栏中搜索,即可在本站找到相关的文档资料。

————————————————
如果YUM没有问题了,那么接下来添加语言支持,你有两种方案:
1.使用Gnome的GUI工具:system-config-packages
2.通过YUM命令

一、Gnome工具:
在Shell命令行中执行:system-config-packages,如下:

该命令会调出一个GUI窗口:
Linux_Language_error_2
如上图所示,你可以看到,当前系统的环境中是没有安装“Chinese Support”的。

这时候,勾选上需要安装的项目,然后“Install”,即可完成对特定语言的支持。
这里的操作,事实上,和在安装操作系统时候的勾选界面是一样的。

二、YUM:
如果想在命令行中安装,可以选择“yum”的“groupinstall”选项,具体如下:

这时候,再次查看,语言的问题就应该被解决了,如下:
Linux_Language_error_3

关于YUM安装语言支持,Fedora官方给出了说明:
http://fedoraproject.org/wiki/I18N/Language_Support_Using_Yum

I18N/Language Support Using Yum
How to Install/Remove Language Support

To install any language support in your Fedora Desktop you need to use following command
yum groupinstall -support
yum langinstall
e.g. to install Hindi language support use
yum groupinstall hindi-support
yum langinstall hi_IN

To remove any language support in your Fedora Desktop you need to use following command
yum groupremove -support
yum langremove
e.g. to remove Hindi language support use
yum groupremove hindi-support
yum langremove hi_IN

YUM支持安装的语言详细(完整)列表:
+++++++++++++++++++++++++++

Country yum language group locale code
Afrikaans(SouthAfrica) af_ZA
Albanian sq_AL
Arabic(Algeria) arabic-support ar_DZ
Arabic(Bahrain) arabic-support ar_BH
Arabic(Egypt) arabic-support ar_EG
Arabic(India) arabic-support ar_IN
Arabic(Iraq) arabic-support ar_IQ
Arabic(Jordan) arabic-support ar_JO
Arabic(Kuwait) arabic-support ar_KW
Arabic(Lebanon) arabic-support ar_LB
Arabic(LibyanArabJamahiriya) arabic-support ar_LY
Arabic(Morocco) arabic-support ar_MA
Arabic(Oman) arabic-support ar_OM
Arabic(Qatar) arabic-support ar_QA
Arabic(SaudiArabia) arabic-support ar_SA
Arabic(Sudan) arabic-support ar_SD
Arabic(SyrianArabRepublic) arabic-support ar_SY
Arabic(Tunisia) arabic-support ar_TN
Arabic(UnitedArabEmirates) arabic-support ar_AE
Arabic(Yemen) arabic-support ar_YE
Assamese(India) assamese-support as_IN
Asturian(Spain) ast_ES
Basque(Spain) eu_ES
Belarusian be_BY
Bengali(BD) bengali-support bn_BD
Bengali(India) bengali-support bn_IN
Bosnian(BosniaandHerzegowina) bs_BA
Breton(France) br_FR
Bulgarian-Български bg_BG
Catalan(Spain) ca_ES
Chinese(HongKong) zh_HK
Chinese(P.R.ofChina)-中文(简体) simplified-chinese-support zh_CN
Chinese(Taiwan)-傳統漢語 traditional-chinese-support zh_TW
Cornish(Britain) kw_GB
Croatian hr_HR
Czech-Českárepublika cs_CZ
Danish-Dansk da_DK
Dutch(Belgium) nl_BE
Dutch(Netherlands) nl_NL
English(Australia) en_AU
English(Botswana) en_BW
English(Canada) en_CA
English(Denmark) en_DK
English(GreatBritain) en_GB
English(HongKong) en_HK
English(India) en_IN
English(Ireland) en_IE
English(NewZealand) en_NZ
English(Philippines) en_PH
English(Singapore) en_SG
English(SouthAfrica) en_ZA
English(USA) en_US
English(Zimbabwe) en_ZW
Estonian et_EE
Faroese(FaroeIslands) fo_FO
Finnish finnish-support fi_FI
French(Belgium) fr_BE
French(Canada) fr_CA
French(France)-Français fr_FR
French(Luxemburg) fr_LU
French(Switzerland) fr_CH
Galician(Spain) gl_ES
German(Austria) de_AT
German(Belgium) de_BE
German(Germany)-Deutsch de_DE
LowGerman(Germany)-Deutsch nds_DE
German(Luxemburg) de_LU
German(Switzerland) de_CH
Greek greek-support el_GR
Greenlandic(Greenland) kl_GL
Gujarati(India) gujarati-support gu_IN
Hebrew(Israel) hebrew-support he_IL
Hindi(India) hindi-support hi_IN
Hungarian hu_HU
Icelandic-Íslenska is_IS
Indonesian id_ID
Irish ga_IE
Italian(Italy)Italiano it_IT
Italian(Switzerland) it_CH
Japanese-日本語 japanese-support ja_JP
Kannada(India) kannada-support kn_IN
Kashmiri(India) kashmiri-support ks_IN
Korean(RepublicofKorea)-한국어 korean-support ko_KR
Lao(Laos) lo_LA
Latvian(Latvia) lv_LV
Lithuanian lt_LT
Macedonian mk_MK
Maithili(India) maithili-support mai_IN
Malayalam(India) malayalam-support ml_IN
Malay(Malaysia) ms_MY
Maltese(malta) mt_MT
ManxGaelic(Britain) gv_GB
Marathi(India) marathi-support mr_IN
NorthernSaami(Norway) se_NO
Nepali(Nepal) nepali-support ne_NP
Norwegian-Norsk nb_NO
Norwegian,Nynorsk(Norway)-Norsk nn_NO
Occitan(France) oc_FR
Oriya(India) oriya-support or_IN
Persian(Iran) persian-support fa_IR
Polish pl_PL
Portuguese(Brasil) pt_BR
Portuguese(Portugal)-Português pt_PT
Punjabi(India) punjabi-support pa_IN
Romanian ro_RO
Russian-Русский russian-support ru_RU
Russian(Ukraine) russian-support ru_UA
Serbian sr_RS
Serbian(Latin) sr_RS.UTF-8@latin
Sinhala sinhala-support si_LK
Slovak sk_SK
Slovenian(Slovenia)-slovenščina sl_SI
Spanish(Argentina) es_AR
Spanish(Bolivia) es_BO
Spanish(Chile) es_CL
Spanish(Colombia) es_CO
Spanish(CostaRica) es_CR
Spanish(DominicanRepublic) es_DO
Spanish(ElSalvador) es_SV
Spanish(Equador) es_EC
Spanish(Guatemala) es_GT
Spanish(Honduras) es_HN
Spanish(Mexico) es_MX
Spanish(Nicaragua) es_NI
Spanish(Panama) es_PA
Spanish(Paraguay) es_PY
Spanish(Peru) es_PE
Spanish(PuertoRico) es_PR
Spanish(Spain)-Español es_ES
Spanish(USA) es_US
Spanish(Uruguay) es_UY
Spanish(Venezuela) es_VE
Swedish(Finland) sv_FI
Swedish(Sweden)-Svenska sv_SE
Tagalog(Philippines) tl_PH
Tamil(India) tamil-support ta_IN
Telugu(India) telugu-support te_IN
Thai thai-support th_TH
Turkish tr_TR
Ukrainian uk_UA
Urdu(Pakistan) urdu-support ur_PK
Uzbek(Uzbekistan) uz_UZ
Vietnamese vi_VN
Walloon(Belgium) wa_BE@euro
Welsh(GreatBritain) cy_GB
Xhosa(SouthAfrica) xh_ZA
Zulu(SouthAfrica) zu_ZA

+++++++++++++++++++++++++++
——————————————————
To Be Continue。

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒
隐藏
变装