Re: libglademm and disappearing button icons

On Fri, 2008-06-13 at 00:42 -0700, johnmb wrote:
> Hi Murray,
>    I am using my application to control a machine that is marketed around
> the world.  I appreciate what you are saying, as there are doubtless other
> methods of supporting multiple languages in the gui.  However, what I am
> doing (loading language texts from XML files) is part of a larger scheme
> that includes loading menu structures dynamically to initialise treeview
> structures that support all my menus.

OK. I do similar things in Glom. For instance, the tables menu is
dynamically built and the table names (and translations of those names)
are all in the .glom file. The translations can be exported/imported
to/from .po format.

I detect the current locale when the application starts, so I can show
the correct translations.

So, I think there's nothing wrong with what you are doing.

>   These menus will be subject to change
> as the systems is developed and is selectively populated in the treeview
> according to user privilege and must also be of selectable language.
>    Moreover, I also need to dynamically change the function and thus the
> text and icons of buttons according to the context of a state machine that
> tracks the state of the machine I am controlling.
>   I am designing the form in glade and thus the initial text of the button
> and the icon selection is set there.  I need to be able to access thoses
> wettings and change them.

Remember if any parts of this are not dynamic then you probably can use
gettext for some parts, even if you call gettext's functions explicitly,
specifying a locale.

murrayc murrayc com

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