Mac修改单个应用程序默认语言

背景

Mac系统语言设置的是英文,安装的QQ语言默认也是英文。由于习惯了中文QQ的使用,想把QQ的语言设置成中文,方法之一就是直接修改系统的默认语言设置,但并不希望直接修改系统语言,仅想修改QQ的默认语言

实现

1 获取App的Bundle Identifier

Bundle Identifier是应用软件的标识,以Microsoft Word为例,Terminal中输入命令:

mdls -name kMDItemCFBundleIdentifier /Applications/qq.app

得到结果:

kMDItemCFBundleIdentifier = "com.tencent.qq"

2 修改应用程序默认语言

该操作需要用到第一步查到的应用程序Bundle Identifier,本例中是com.tencent.qq,Terminal中输入命令:

defaults write com.tencent.qq AppleLanguages '("zh\_CN")'

3 常用语言设置选项

第二步操作中用到了zh_CN,代表了简体中文,其他常用的语言项如下:

ar = Arabic
cs = Czech
da = Danish
de = German
el = Greek
en = English (US)
es = Spanish
fi = Finnish
fr = French
he = Hebrew
hu = Hungarian
id = Indonesian
it = Italian
ja = Japanese
ko = Korean
nl = Netherlands
no = Norwegian
pl = Polish
pt_PT = Portuguese
pt = Portuguese Brazil
ru = Russian
sk = Slovak
sv = Swedish
th = Thai
tr = Turkish
zh_CN = Chinese Simplified
zh_TW = Chinese Taiwan

你可能感兴趣的:(macos)