[Ready for test/1.5.0] libiconv & gettext (many)

Corinna Vinschen vinschen@redhat.com
Thu Jul 17 08:24:00 GMT 2003


On Wed, Jul 16, 2003 at 11:57:56PM -0400, Charles Wilson wrote:
> Corinna Vinschen wrote:
> >   localedir = bindtextdomain (PACKAGE, LOCALEDIR);
> >   ...
> >   puts (localedir);
> > 
> > Am I right here?  I had not much to do with libintl so far so please
> > excuse my questions.
> 
> No, I think that actually SETS the localedir to the appropriate
> subdirectory under the specified LOCALEDIR.  You want to know where it
> would look by *default*, so instead of (for instance) /usr/share/locale
> [the value of _nl_default_dirname, you get
> "LOCALEDIR/<domain>/PACKAGE.po"
> [...]

Thanks for the description.  It convinced me that my above code is
correct ;-)  The thing is, the code actually already calls

  bindtextdomain (PACKAGE, LOCALEDIR);

unconditionally.  So the correct locale dir is known to the application
but not used later when --print-text-domain-dir is given on the command
line.

The man page of shar says:

  --print-text-domain-dir
      
      Prints the directory shar looks in to find messages files for
      different languages, then immediately exits.

So it's not the systems default dir but the directory shar is looking in,
the one set with bindtextdomain.

Now there's just one configury problem left.  Setting datadir on the
command line doesn't help.  It's always /usr/lib later on.  Or, if I
use --with-gnu-gettext, it always builds and links against the own
libintl.a :-(

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.



More information about the Cygwin-apps mailing list