是否可以选择以不同语言输出手册页?我不想完全改变计算机语言,而只想改变特定的手册页。例如
$ man -English man
Man is a manual program
…
$ man -Russian man
Инструцтия для Unix, BSD и Linux.
…
答案1
答案2
要获取本地化的手册页,请设置LC_MESSAGES
语言环境环境变量。对于单次调用man
:
LC_MESSAGES=ru_RU man man
.bashrc
如果您总是想要俄语手册页,但希望其他命令说英语,您可以在您的或其他 shell 初始化文件中设置别名:
alias man='LC_MESSAGES=ru_RU man'
答案3
阅读man man
,看来您应该更改环境变量,然后像往常一样使用 man 。如果它没有您的语言版本,它仍会显示英文版本。
International support is available with this package. Native lan‐
guage manual pages are accessible (if available on your system) via
use of locale functions. To activate such support, it is necessary
to set either $LC_MESSAGES, $LANG or another system dependent envi‐
ronment variable to your language locale, usually specified in the
POSIX 1003.1 based format:
<language>[_<territory>[.<character-set>[,<version>]]]
If the desired page is available in your locale, it will be dis‐
played in lieu of the standard (usually American English) page.