This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i18n support


On Sat, 30 Jan 1999 11:37:49 -0700, Jeffrey A Law wrote:
>
>  In message <199901301835.NAA16156@blastula.phys.columbia.edu>you write:
>  > If we #if out just the setlocale call, it will disable translation
>  > (since we'll be left in "C" locale by default).
>Right.  I understand that.  I just don't know if it is otherwise safe.  My
>experience with locale & i18n is somewhere between zero and none.

The docs I have (Solaris and glibc) imply that it's otherwise safe.
Of course, both of them have LC_MESSAGES.  I don't know FreeBSD.

>  > bindtextdomain/textdomain don't look at the locale, so that would be
>  > safe, unless there's another setlocale() call in the program
>  > program...?
>All that box has is:
>
>#define LC_ALL          0
>#define LC_COLLATE      1
>#define LC_CTYPE        2
>#define LC_MONETARY     3
>#define LC_NUMERIC      4
>#define LC_TIME         5

This is ugly, but it might work to do

setlocale(LC_ALL, "");
setlocale(LC_COLLATE, "C");
setlocale(LC_CTYPE, "C");
setlocale(LC_MONETARY, "C");
setlocale(LC_NUMERIC, "C");
setlocale(LC_TIME, "C");

Make that really ugly.  There's gotta be a *BSD expert around who
knows what the right thing is.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]