Kaixo!

[note: that kind of i18n/l10n problems are better for cooker-i18n ML]

> I have installation with English and Russian languages selected during
> installation. System language is set to Russian (KOI8-R to be sure),
> i18n variables are ru_RU.KOI8-R.
> 
> I mostly do ssh from a workplace that does not support Russian display
> (never had real need for that actually). I can reset LC_TIME and
> LC_MESSAGES to prevent (unreadable) Russian text. BUT! How can I prevent
> man pages from being displayed in Russian? The problem is not trivial:

translations (and man pages translations) use primarly the LANGUAGE variable;
only weak programs not knowing about LANGUAGE ressort to LC_MESSAGEs or
even to LANG (like Netscape).

So, redefine LANGUAGE and LC_ALL and you are ok.

If the IP adresse(s) you slogin from are known; then you can put something
like this in your ~/.profile or ~/.bashrc



case "$SSH_CLIENT" in
        192.168.85.129*) export LANGUAGE=C ; export LC_ALL=C ;;
esac

note that by redefining LC_CTYPE (LC_ALL overrides all LC_* values) you
lost the support for the charset encoding (but if you cannot display koi8-r
from the callign machine it's not a problem).

If the calling machine can display cyrillic, just in a different encoding,
then you can redefine LC_ALL only to the appropriate locale (CP1251, 
ISO-8859-5 or UTF-8)

The variable SSH_CLIENT holds the IP adress you are connecting from.

> Mandrake does not actually have *English* manual pages. It has fallback
> pages, that are displayed if nothing else is found. I.e. it has
> /usr/share/man/ru for Russian but does *not* have /usr/share/man/en for
> English - it has /usr/share/man

Yes. English is always set as the default (which sometimes can have
side effects, as with LANGUAGE=en:ru you get the Russian translations;
the libc doesn't know the default is English (en); (it knows that 'C'
is defautl however, I think).
That being said, such a situation is higly unlikely.

> Now, man seems to have (I checked sources once) the weirdest way to
> select language to display. It tries all possible language variables and
> falls back to /usr/share/man (a.k.a. English) *only* when nothing more
> is found. It means, that if one of the LANG, LC_MESSAGES, LANGUAGE (and
> possibly more) has ru in it - I get Russian manual pages.

Yes (but they are checked in the reverse order: LANGUAGE, LC_MESSAGES, LANG)

> I definitely do not want to reset all language variables just to please
> man.

Not only 'man', all translated programs.

> I do not want to deinstalll Russian manuals. I just want to tell
> man to display English man pages.

Just redefine LANGUAGE variable to not request Russian language.

You can also do that on the command line:

LANGUAGE=C man foo

or create a small shell wrapper:

#!/bin/bash
export LANGUAGE=C
export LC_ALL=C
man $@


> I claim it is Mandrake packaging bug. English manuals should be packaged
> under /usr/share/man/en just like all other languages. It could then be
> used as default fallback as well.

That won't change anything if they are still used as fallback.
Ifd there is no fallback then that will break too many thigns and will made
too much disgusted people (with reason).

You jsut need to define the LANGUAGE variable to what you actually want.
If you define it to ask for Russian translations then you get Russian
translations.

> 
> -andrej

-- 
Ki �a vos v�ye b�n,
Pablo Saratxaga

http://www.srtxg.easynet.be/            PGP Key available, key ID: 0x8F0E4975

Reply via email to