Re: Searching example for 'gtk_item_factory_set_translate_func'
- From: egger suse de
- To: couderj agf fr
- Cc: gtk-i18n-list gnome org
- Subject: Re: Searching example for 'gtk_item_factory_set_translate_func'
- Date: Tue, 27 Mar 2001 16:26:33 +0200 (CEST)
On 27 Mar, Jerome COUDERC wrote:
> I had been already a look to Gimp sources, but I didn't find it 'very
> clear'...
It's really quite simple and you should be able to figure it out.
Simply write a function that accepts a const gchar * as the
translateable string and a gpointer to some additional data (if
needed). The function should translate the string and return the
translation.
Pass the function to this pointer into the set_translate_func call.
It's as simple as that.
For simple applications you can also pass a pointer to a function that
just calls the gettext function. It's just dynamic so more complex
applications can have their own handling and also use other libraries
than gettext (libxml comes to mind).
In GIMP we've implemented a bit more to handle plugins which have their
own catalog and some other stuff...
> Let me see in gnome.. :)
Bad luck, GNOME doesn't use item_factory except for rc file parsing and
thus you probably won't find it there. Also the menus are completely
broken wrt to internationalisation because they use(d?) the translation as
identifier.
--
Servus,
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]