delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/01/31/16:17:13

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <37603.83.86.0.251.1296508615.squirrel@lavabit.com>
In-Reply-To: <201101282158.55782.bruno@clisp.org>
References: <201101282158 DOT 55782 DOT bruno AT clisp DOT org>
Date: Mon, 31 Jan 2011 22:16:55 +0100 (CET)
Subject: Re: 1.7.7: Localization does not follow the language of the OS
From: cornwarecjp AT lavabit DOT com
To: "Bruno Haible" <bruno AT clisp DOT org>
Cc: cygwin AT cygwin DOT com, bug-gnu-gettext AT gnu DOT org
User-Agent: SquirrelMail/1.4.13
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Replying to <http://www.cygwin.com/ml/cygwin/2011-01/msg00399.html>:

>> I think that doing setlocale(LC_ALL, ""); on application initialization
>> should do the trick.
>
> Yes it does - assuming you use a libintl from gettext version >= 0.18,
> and assuming that you have a #include <libintl.h> in the source file that
> invokes setlocale (LC_ALL, "").
>
> This was implemented in gettext 0.18.

I have a #include <libintl.h> in the source file that invokes setlocale.
Now that I look at it again: actually I'm doing setlocale(LC_MESSAGES, "")
instead of setlocale(LC_ALL, ""), because I only want translation of the
message texts. I suppose it shouldn't matter for this discussion, but I
mention it anyway, just in case it does matter.

I also happen to supply an 'intl' directory with my application, which
contains a gettext implementation. It can be activated by giving the
--with-included-gettext parameter to the configure script of my
application. I tried whether this would fix my problem, but it doesn't;
I guess because my included gettext is also version 0.17.

Would it help to update my included gettext to version 0.18? Or would this
just give me compilation headaches on Cygwin? I noticed that setlocale is
not implemented in my included gettext, so I suppose that setlocale has to
be supplied by Cygwin anyway. Does this mean that it will never make a
difference for me to use the included gettext, or is it possible to somehow
influence the behavior of setlocale with the included gettext version?




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019