[Glade-users] Glade3 gettext



I cant be sure at this point what is going wrong, you shouldn't have
to use the domain argument if you are writing an app, just install
in the right place and libglade will call gettext().

Does a file generated with glade 2 work ? the only thing
I can think of that we could have got wrong is if you are trying
to translate a string that for some reason we marked untranslatabe,
but I doubt that.

Also, did you setup the locale and everything before creating
the GladeXML ?

I also have no idea of what impacts using PHP can have.

Cheers,
                   -Tristan

On Dec 14, 2007 7:11 PM, martti pitkanen <martti.pitkanen at aplcomp.fi> wrote:

Hi Tristan,
I managed to get t show _('strings')  transalation correctly, aftrer
realising that in windows
the 'locale'  has to "Finnish" instead of "fi_FI".
My glade translations are bundled in the same "gladephpw.mo'  -file, but
they are not shown.
As said, _(...) strings translations do show up ok.
I use GladeXML, like this:
$glade = new GladeXML(dirname(__FILE__) .
'/invnoteform'.$system.'.glade');
Before that, I have initiated LC_ALL as follows:

   $domain = 'gladephpw';
   setlocale(LC_ALL, $Language);
   bindtextdomain($domain, dirname(__FILE__) . _SLASH_.'locale');
   textdomain($domain);

I'd be grateful for any hint how to proceed, 'cos I have translated tons
of *. glade files already.

Tristan Van Berkom wrote:
On Dec 12, 2007 8:50 PM, martti <martti.pitkanen at aplcomp.fi
<mailto:martti.pitkanen at aplcomp.fi>> wrote:

    Hi,
    Can gettext make use of Glade3 -files? I have failed to make *.mo
    files
    extracted from Glade3
    appear onscreen. I am using php-gtk2.
    Manual page examples appear to be from Glade2, anyway.

    I'd appreciate yes/no answer very much


Yes the files are the same in that respect, the functionality
is in libglade - just install the .mo files and any strings
that are translatable will be passed through gettext() by
libglade before usage.

If you provide the "domain" argument to glade_xml_new()
then dgettext() will be used instead.

Cheers,
                 -Tristan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20071214/50d339cf/attachment.html 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]