localized man pages

Ruslan Ermilov ru at freebsd.org
Tue Oct 30 20:52:35 UTC 2007


On Sat, Oct 27, 2007 at 08:57:54AM +0200, Marc Fonvieille wrote:
> [...] but I now think the problem was
> on this point: our manual page system does not easily allow this
> selection and the fall-back on the en_US version when the manual page is
> not translated.  This should also work with ports manual pages.
> 
Isn't this easy enough (copied from the man(1) manpage)?

: By default, man searches for a localized manpage in a set of
: locale subdirectories of each manpath(1) component.
:
: Locale name is taken from the first of three environment vari-
: ables with a nonempty value: LC_ALL, LC_CTYPE, or LANG, in the
: specified order.
:
: If the value could not be determined, or is not a valid locale
: name, then only non-localized manpage will be looked up.
:
: Otherwise, man will search in the following subdirectories, in
: the order of precedence:
:
:       <lang>_<country>.<charset>
:       <lang>.<charset>
:       en.<charset>
:
: For example, for the ``de_DE.ISO8859-1'' locale, man will
: search in the following subdirectories of the /usr/share/man
: manpath component:
:
:       /usr/share/man/de_DE.ISO8859-1
:       /usr/share/man/de.ISO8859-1
:       /usr/share/man/en.ISO8859-1
:
: Finally, if the search of localized manpage fails, it will be
: looked up in the default /usr/share/man directory.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer



More information about the freebsd-doc mailing list