From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: ldries46 Subject: Re: A Gtk/GtkAda and Glade question Newsgroups: comp.lang.ada References: <5ea6cd11$0$1724$e4fe514c@news.kpn.nl> X-Mozilla-News-Host: news://news.kpn.nl Date: Fri, 15 May 2020 11:17:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Message-ID: <5ebe5e41$0$18833$e4fe514c@news.kpn.nl> NNTP-Posting-Host: a224e7e1.news.kpn.nl X-Trace: G=Hf6zFwOt,C=U2FsdGVkX19VtzsufPdilOfiyJIDHfzezxzgLfUboY4aKWXvimrNScRH4S+12Gsm+lsyotgWxt4p/zK63U/nG0GPz6w3Bbpjvm3n814RoWc= X-Complaints-To: abuse@kpn.nl X-Received-Bytes: 4030 X-Received-Body-CRC: 208226971 Xref: reader01.eternal-september.org comp.lang.ada:58690 Date: 2020-05-15T11:17:53+02:00 List-Id: Op 13-5-2020 om 10:18 schreef Dmitry A. Kazakov: > On 2020-05-13 09:04, ldries46 wrote: >> Op 9-5-2020 om 17:06 schreef mgr: >>> On 27/4/20 14:16, ldries46 wrote: >>> > Another problem I encountered is that you have for your program >>> constant >>> > strings in your GUI and I do want variables in that positions to >>> change >>> > the look of my GUI by a simple redraw action. One reason is that I >>> want >>> > to create a multi language program So I need for instance the menu >>> to be >>> > possible in several languages (f.i. English, Dutch, German, French >>> and >>> > Spanish) and just switch these languages with one redraw. I can do >>> that >>> > when I do not use the GtkBuilder statement. >>> >>> You should look for gettext library support in Glade and the >>> gtkada.intl package (which is a binding to the former). I haven't >>> tried it, but interfaces produced by Glade should be translatable >>> using gettext files. >> I am glad somebody answered. I could not find the listing of gettext >> but I suspect that the answer is not inside that listings. I just >> want to know all the possibilities and where applicable for lines like: >>    >>   True >>    >> I just found three different types of lines that matter. I think that >> I have found all object class names like "GtkBox" here but of the >> property name I need far more as which is the case with signal name. >> I need the complete set of each of the different types an if there >> are more events like object class etc. > > It is not properties, it is style properties you are looking for. > Style properties can be set in a CSS sheet for a class of widgets and > for individual instances of. It has a quite complex matching > algorithm, admittedly poorly documented. The CSS sheet is defaulted by > GTK per user basis. A sheet can be loaded by the GTK application > explicitly. The widgets get a signal when the style gets changed. For > further information see: > > https://developer.gnome.org/gtk3/stable/chap-css-overview.html > > So, when you create your custom widget, you can define all texts it > would use as style properties of the widget class. Default these > properties to English, that will serve as a fallback. Within the > widget implementation get texts from the corresponding style > properties. For each locale create a CSS file. Load this file when the > language is changed. You can also consider setting left-to-right vs. > right-to-left, if you ever plan Hebrew or Arabic. Of course you can > set fonts and colors. Alas, you cannot embed images into CSS as you > could in GTK 2.x RC files, but there is a workaround via icon factory. > I am just interested in a list of XML- code used in the .glade files and Gtk routines they should be translated in. I cannot find this list so where can I find it?