bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext


From: Paul Eggert
Subject: Re: gettext
Date: Fri, 12 Apr 2002 11:20:29 -0700 (PDT)

> From: Vlada von Strasnic <address@hidden>
> Date: Fri, 12 Apr 2002 12:18:14 +0200
> 
> even if i compile the program from sources and ./configure
> detects NLS , it compiles , i do "make install" and it doesn't work !!!

That could be due to a portability bug in gettext; it could also be
due to a problem with your installation.  Without more information
it's hard to tell.  However, other people don't have your problem, and
I expect that it should be easy to fix (whatever it is).

>         how can i find out , how nls support is compiled into the
>                 program ???

That depends on what you mean by "compiled".  There are several ways
you can inquire about it.  For example, you can see whether ENABLE_NLS
is defined to be nonzero.

>         why my programs work , when i compile them just with gcc file.c 
>                 ( without any -l -I )

I don't fully understand this question.  However, on many systems
gettext is preinstalled, so if you compile them just with gcc file.c
you will get internationalization support.

>         if the program, that realizes LC_ALL=some_language , can also
>                 realize, that it cannot that language !!!!

A program can do that by inspecting the returned value of setlocale
and the like.

> Program just says
> bindtextdomain(..)  and doesn't receive any information back : 
>         - if the directory that was argument to bindtextdomain is usable
>         - what catalogs are installed there
>         - if the language , that is requested by LC_ALL or some other
>                 variable is really there ...
>         - if program tries to translate some message, it doesn't really know 
>                 if it really get translated ... And if requested more than 
>                 one language , you have no way to realize into what
>                 language, it had been really translated !!!!!!!
> This means that its kept magic.

No, it's not entirely magic.  Some of that information is available by
inspecting the value returned by setlocale etc.

In practice, though, few GNU programs bother with the strategy that
you're suggesting.  Yes, programs could inspect the return values of
setlocale etc. and issue a diagnostic, and perhaps even exit with a
failure status.  That is how some traditional Unix programs behave, so
we've had some experience with that.  We've found that in practice
noisily failing is less useful than ignoring those returned values and
continuing (in English) if the requested locale is not supported.

Any diagnostic would have to be in English anyway, so issuing it is
not going to help the user who doesn't understand a word of English.



reply via email to

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