%20%E3%81%AE%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AE%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%A9%E3%82%A4%E3%82%BA.png)
マニュアルページを別の言語で出力するオプションはありますか?コンピュータの言語を完全に変更するのではなく、特定のマニュアルページのみを変更したいのです。例えば
$ man -English man
Man is a manual program
…
$ man -Russian man
Инструцтия для Unix, BSD и Linux.
…
答え1
答え2
ローカライズされたマニュアルページを取得するには、LC_MESSAGES
ロケール環境変数。 を 1 回呼び出すと、次のようになりますman
。
LC_MESSAGES=ru_RU man man
.bashrc
マニュアル ページは常にロシア語で表示したいが、他のコマンドは英語で表示したい場合は、自分のシェル初期化ファイルまたは他のシェル初期化ファイルにエイリアスを設定できます。
alias man='LC_MESSAGES=ru_RU man'
答え3
を読むとman 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.