Re: locale data in different prefix
- From: James Henstridge <james daa com au>
- To: Gediminas Paulauskas <menesis delfi lt>
- Cc: <gnome-i18n gnome org>, <gnome-devel-list gnome org>,<gal-hackers ximian com>
- Subject: Re: locale data in different prefix
- Date: Sun, 6 May 2001 21:30:34 +0800 (WST)
On 6 May 2001, Gediminas Paulauskas wrote:
>
> Hello.
>
> I have just recompiled GNOME and installed into another prefix (thanks
> to vicious for his build scripts;). Then removed packages and my
> previously installed crap from /usr prefix.
>
> What I see now is that library messages are not translated (I have gal,
> bonobo, oaf only in $HOME/INSTALL).
>
> The problem is, that there is no way for library to specify domain
> search path. In an app, it is done by:
>
> bindtextdomain (PACKAGE, LOCALEDIR); /* this associates domain (mo file) with */
> /* directory where it is installed */
> textdomain (PACKAGE); /* selects default translation domain, */
> /* used for gettext() calls */
>
> in library, gettext () is not used, because default domain always
> belongs to caller app. But gettext does not know, where to search for
> library's domain files!
What is the problem? The library calls bindtextdomain() for its
translation domain, with the localedir for the prefix under which it was
installed. To perform translations, it uses the dgettext(DOMAIN, STRING)
function instead of straight gettext(). This should allow the library to
find its translations and not interfere with the app's.
James.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]