bug-texinfo
[Top][All Lists]
Advanced

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

Re: LANG and @documentlanguage


From: Bruno Haible
Subject: Re: LANG and @documentlanguage
Date: Tue, 2 Dec 2003 17:21:25 +0100
User-agent: KMail/1.5

Karl Berry wrote:
> For Texinfo, once again my suggestion is that we setlocale to the
> @documentlanguage when we see it, and only switch back to the $LANG
> locale when we have to print a diagnostic message.

Doesn't this bring in a maintainability problem? This way, you have to
modify each code that uses gettext(), regex(), <ctype.h>, etc. It goes as
far as xmalloc(), which - in the gnulib version - calls gettext() for
its error message.

> Obviously performance is not an issue in that case

Then I would just bite the bullet and use a single function that switches
setlocale() away and back.

The gettext API might be enhanced in the future with a function that takes
the locale as argument; this is needed for multithreaded environments where
performance counts, like web servers built on PHP. This API is not yet there;
so I don't recommend to wait for it. But when it comes, you would regret
having made complicated modifications all over the place that wouldn't be
needed any more.

Bruno





reply via email to

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