[Top][All Lists]

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

Re: using gettext for libraries

From: Andrew Clausen
Subject: Re: using gettext for libraries
Date: Wed, 03 Jan 2001 17:02:34 -0200

Andrew Clausen wrote:
> Hi all,
> How should gettext be used for libraries?  i.e. how should
> bindtextdomain() and textdomain() be used?
> (Obviously, both the library and the program/library using
> the program would like to have strings translated, but operate
> from a different domain)

>From the glibc manual (should also be in the gettext manual):

"The important point is that at any time exactly one domain
is active."

Why? It means you have to switch domains on all entry points into
a library, OR at gettext() time.

The former is a huge amount of bureaucracy.  The later is
rather trivial to implement, by changing the _() macro.  But,
in this case, it raises the question: "why bother with having
an active text domain at all?  why not just pass the
text domain to gettext()?"

So, why is there always exactly one domain active?

Andrew Clausen

reply via email to

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