Linux(Ubuntu)에서 매뉴얼 페이지 현지화

Linux(Ubuntu)에서 매뉴얼 페이지 현지화

매뉴얼 페이지를 다른 언어로 출력하는 옵션이 있습니까? 컴퓨터 언어를 완전히 바꾸고 싶지 않고 특정 매뉴얼 페이지만 바꾸고 싶습니다. 예를 들어

$ man -English man
Man is a manual program
$ man -Russian man
Инструцтия для Unix, BSD и Linux.

답변1

당신 man이 출신 이라면man-db패키지(대부분의 GNU/Linux 배포판과 마찬가지로 man 2.x)에서 가장 빠른 방법은 플래그를 사용하는 것 -L입니다 man. 원하는 로캘의 약어만 알면 됩니다.

man -Len man   # -> English man-page of man
man -Lru man   # -> Russian man-page of man

다른 것을 사용하는 경우남자 구현(man 1.x) 유일한 방법은 환경 변수를 변경 $LC_MESSAGES하거나 $LANG다른 항목에 설명된 것과 같이 변경하는 것입니다.답변.

답변2

현지화된 매뉴얼 페이지를 얻으려면LC_MESSAGES 장소환경 변수. 단일 호출의 경우 man:

LC_MESSAGES=ru_RU man man

.bashrc매뉴얼 페이지는 항상 러시아어로 작성하고 다른 명령은 영어로 작성하고 싶다면, 자신 이나 다른 쉘 초기화 파일 에 별칭을 설정할 수 있습니다 :

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.

관련 정보