GNOME Bugzilla – Bug 729066
[RFE] Please expose the translatable and context PropertyInfo properties
Last modified: 2014-08-03 15:48:27 UTC
Consider a program that allows the language to be changed after the program has started. For the most this is possible by setting $LANG to the new value, retranslating any active widgets, and continuing with the program. A problem arises when widgets have translation contexts set in the builder XML. The context property is not accessible from the program, so all context information must be duplicated within the program. It would be nice to have access to the context and translatable properties.
do you have any examples of programs that successfully do this ? it is by no means easy, and generally not supported.
Note that calling setenv() after a threaded process is running can cause crashes if any other thread calls getenv(). See: https://bugzilla.gnome.org/show_bug.cgi?id=659326 https://bugs.freedesktop.org/show_bug.cgi?id=65681
Created attachment 275321 [details] test interface file
Created attachment 275322 [details] test program
Created attachment 275323 [details] test translation file
Attached a small example program. As far as real-world examples, the welcome spoke of anaconda does this.
Yeah, installers are just about the only example where people have tried to make this work - gnome-initial-setup does it too. I recommend simply reloading the UI