%20%E4%B8%8A%E7%9A%84%E6%89%8B%E5%86%8A%E9%A0%81%E6%9C%AC%E5%9C%B0%E5%8C%96.png)
是否可以選擇以不同語言輸出手冊頁?我不想完全改變電腦語言,而只想改變特定的手冊頁。例如
$ 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.