[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using gettext for runtime translations
From: |
Torsten Bronger |
Subject: |
Re: Using gettext for runtime translations |
Date: |
Sat, 16 Apr 2005 13:05:36 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Hallöchen!
Bruno Haible <address@hidden> writes:
> [...]
>
> Portability of LANGUAGE: No portability problem is known, since
> LANGUAGE is only considered by libintl, not by system code.
Okay, I think I understand it now much better. However, I have two
possibilities:
First, the gettext manual suggests to set LANGUAGE with setenv(),
with flushing the cache:
/* Change language. */
setenv ("LANGUAGE", "fr", 1);
/* Make change known. */
{
extern int _nl_msg_cat_cntr;
++_nl_msg_cat_cntr;
}
Below this code excerpts, it says:
The variable `_nl_msg_cat_cntr' is defined in `loadmsgcat.c'.
You don't need to know what this is for. But it can be used to
detect whether a `gettext' implementation is GNU gettext and
not non-GNU system's native gettext implementation.
Does this mean that there are non-GNU gettexts out there and that
that excerpt would break on such systems? Or is this dealt with by
the Autotools?
And secondly, I have
http://lists.gnu.org/archive/html/bug-texinfo/2003-12/msg00023.html
which unsets LANGUAGE and sets LC_ALL instead. I assume that if you
only want to adjust gettext messages, it doesn't matter. But there
are two things that I don't understand: Why doesn't this code care
about the gettext cache? And why does it call setlocale() which the
above excerpt doesn't do?
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus