hg: How do I change the language of my Mercurial(hg) installation? (MacOS)

你说的曾经没有我的故事 提交于 2019-11-29 01:14:55

If you set your LANG environment variable to en_US.UTF-8 your can change the language of the Mercurial client (Hg).

export LANG=en_US.UTF-8

If you don't want to change your environment variables (as this might influence other applications you actually want to speak in your native language), you can also just rename the locale specific subdirectory (e.g. <mercurial_install_dir>/locacle/de) to something else, in which case mercurial will fall back to the default English. I admit it's a bit dirty, but I've used this trick also for other applications where the translation was crappy and the app did not allow to set the desired language explicitly!

Language is determined by the LANG, LC_ALL and LANGUAGE environment variables. And you can set the locale to the C locale to get English, since this is the default.

Setting an alias which temporarily clears the LANG and LANGUAGE environment variables before calling the hg command does it for me:

$ alias hg='LANG="" LANGUAGE="" hg'

You can add this to your ~/.bash_aliases.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!