[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Re: lynx should respect LANG

From: Klaus Weide
Subject: Re: lynx-dev Re: lynx should respect LANG
Date: Sun, 28 May 2000 17:41:48 -0500 (CDT)

On Thu, 25 May 2000, Klaus Weide wrote:
> On Thu, 25 May 2000, Henry Nelson wrote:
> > TEXTDOMAINDIR and TEXTDOMAIN are environment variables used by gettext()
> > to determine the path to message catalogues and the domain (=language)
> > to use.  Essentially it tells gettext() where the *.mo file is.  Thus, you
> > can have multiple message catalogues available (e.g., one for regular users
> > and another for public-access users, or one for experienced users and one
> > for novices) and chose which one to display on the basis of the environment
> > variable.
> Thank you.  I was vaguely aware that such mechanisms exist, but have never
> used them.

Actually, now that I have tried it - you must be talking about some other
programs [1], not lynx.   Or at least, not lynx at runtime (maybe those
variables get honored at some stage during configuration or
installation?).  Either that, or your system behaves radically different
from mine; and I cannot see how that could be: the text domain and
associated directory are hardcoded in LYMain.c, as

#ifdef LOCALE
     *  LOCALE support for international characters.
    setlocale(LC_ALL, "");
#endif /* LOCALE */
    /* Set the text message domain.  */
#ifndef __DJGPP__
    bindtextdomain ("lynx", LOCALEDIR);
#endif /* !__DJGPP__ */
    textdomain ("lynx");
#endif /* HAVE_LIBINTL_H */

> > I disagree that LANG should be the major criterion for deciding the message
> > catalogue to use.  
> The way I see it, if you want to decide based on local vs guest user,
> or experienced vs novice user, then use TEXTDOMAIN*.  But if you need
> to select a catalogue based on locale (i.e. here: user's language and
> character set), then use LANG [*] - that's what it is there for.

> [*] More exactly, LC_ALL or LC_MESSAGES or LANG - the way gettext already
> does it!

Actually, according to my new findings, the L* env variables are the
only way to select among catalogues at runtime - unless you resort
to shuffling files or symlinks around, or modify the lynx code.

Can you explain the difference?

[1] Actually, the gettext *program* (utility for shell scripts)
observes those environment variables.  BUt we were talking about
lynx, right?


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]