Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example

$ man -English man
Man is a manual program
…
$ man -Russian man
Инструцтия для Unix, BSD и Linux.
…
share|improve this question
add comment

3 Answers

To get a localized manual page, set the LC_MESSAGES locale environment variable. For a single invocation of man:

LC_MESSAGES=ru_RU man man

If you always want manual pages in Russian, but want other commands to speak English, you can set up an alias in your .bashrc or other shell initialization file:

alias man='LC_MESSAGES=ru_RU man'
share|improve this answer
    
The manpages in different languages in Debian seem to come in packages like manpages-ru for Russian, manpages-fr for French, etc. But I can't find a -se (for Swedish). Do you know (or do you know how to find out) if this is in fact so? Man pages in your native language would be a dream! –  Emanuel Berg Jul 19 '12 at 8:10
1  
@EmanuelBerg That's a good point, in Ubuntu (and Debian and many other distributions) there is a package with translations of manpages from many common sources. There's no manpages-sv though, presumably because few people bother to translate English into Swedish. I think this is where the active translation efforts are coordinated, there's no mention of Swedish. –  Gilles Jul 19 '12 at 8:29
    
I wrote a mail to the guy on your link, if everything works out, I'll start translating right away. I know of other guys that would love such a project, as well. It is a huge project of course but if it was possible for all those other languages, it is possible for Swedish as well. I never did anything like this before, so if you think I should talk to some person or read something (or whatever), don't hesitate to contact me. –  Emanuel Berg Jul 21 '12 at 0:14
add comment

If your man is from the man-db package (man 2.x, like on most GNU/Linux distributions), the fastest way is to use the -L flag of man. You need just to know the abbreviation of the wanted locale.

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

If you use the other man implementation (man 1.x), the only way is to change the environment variables $LC_MESSAGES or $LANG like described in the other answers.

share|improve this answer
1  
I only found the stuff I put in my post when I searched the man man page for "language". But if you search for "locale", you find the very useful option of jofel's post. This could be useful to remember if you ever do other language related configuration. –  Emanuel Berg Jul 20 '12 at 14:29
    
$ man -Len man man: invalid option -- 'L' man, version 1.6g on gentoo –  A.D. Jan 19 at 14:20
1  
@A.D. I extended my answer. I was not aware of the fact, that man has forked long time ago. Use man from the man-db package if you want to use the -L option. –  jofel Jan 20 at 9:38
add comment

Reading man man, it appears you should change your environmental variables and then use man as usual. If it is not there in your language, it will still show the English version.

   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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.