This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


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