On Wed, 22 Oct 2003 17:10:20 +0200
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:
Hi!
> Markus> LyX seems to use LC_MESSAGES for the interface (speaking
> Markus> English) correctly, but concerning the keybindings, it uses
> Markus> the LANG value. Exporting LANG=C prior to launching LyX does
> Markus> the trick to get back my beloved "ALT-p"... :)
>
> The code which loads help files and bindings says:
>
> // this comment is from intl/dcigettext.c. We try to mimick this
> // behaviour here.
> /* The highest priority value is the `LANGUAGE' environment
> variable. But we don't use the value if the currently
> selected locale is the C locale. This is a GNU extension. */
>
> string const lc_all = GetEnv("LC_ALL");
> string lang = GetEnv("LANGUAGE");
> if (lang.empty() || lc_all == "C") {
> lang = lc_all;
> if (lang.empty()) {
> lang = GetEnv("LANG");
> }
> }
>
> This is code I added some time ago to try to mimic what gettext does.
> Could you tell me what the real rule is? Did I get it wrong? Is it
> that I should test explicitely for LC_MESSAGE?
Hmmm, I think this depends on how you look at it.
On the one hand, the LANG setting _is_ important and actually should
determine what overall language the user uses for their programs.
LC_MESSAGES actually simply sets the language for information and
messages presented by the program.
On the other hand, I use LC_MESSAGES to get an English interface (I
prefer it this way 'cause that _is_ consistent most everywhere, whereas
the German translations are not always complete).
I've not been a developer yet and haven't dived into the correct usage
of the local-variables. Though I would probably check for LC_MESSAGES
first in this case (as I think an English interface should be accessible
using English shortcuts), I don't know if it is "correct" to do so...
Cheers,
Markus A.
--
The first time any man's freedom is trodden on, we're all damaged.
<Cpt. Picard, "The Drumhead", StarTrek TNG>
http://homex.subnet.at/~max/