Re: Searching example for 'gtk_item_factory_set_translate_func'

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

 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


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