enigma-devel
[Top][All Lists]
Advanced

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

Re: [Enigma-devel] TLA on windows


From: Daniel Heck
Subject: Re: [Enigma-devel] TLA on windows
Date: Sun, 7 Nov 2004 19:22:16 +0100

> The manual does not say that. it says to use code like this:
>   /* Change language.  */
>   setenv ("LANGUAGE", "fr", 1);
> 
>   /* Make change known.  */
>   {
>     extern int  _nl_msg_cat_cntr;
>     ++_nl_msg_cat_cntr;
> }

I tried that, and it works (even without modifying that obscure internal
variable), but only once.  Calling setlocale (LC_MESSAGES, "C") seems to
reset some internal flag that inhibits further language changes, but I
didn't dig this deep. 

> >And the second problem can be solved by copying 1000 lines of
> > code from libintl and duplicting that code in your own program.  Never
> > mind that reading the libintl source code is extremely painful to read,
> > since there are three lines of macro code for every other line of code.
> > Yuck.
> 
> um... you cannot just call _nl_locale_name directly using the applicable 
> category?

I don't think so, because the function is named differently if libintl
is included in glibc.

> I'll admit that the whole category/locale system used by gettext is overly 
> complicated.

Well, that's not exactly gettext's fault,  l10n is inherently
complicated.  But the GNU implementation is not particularly good, in my
opinion.

> If more work is needed than just that little bit of code i may actually 
> create a patch like i said i would in the other message.

My current solution does work on Linux and Windows, unless it fails on
other systems, I will try not to touch it again :-)

D.




reply via email to

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