Re: [tutor] こんにちは世界。 "Hello World"

new topic     » goto parent     » topic index » view thread      » older message » newer message

In EuGTK, you can use any image and any caption on a button:

 btn = create(GtkButton,"gtk-quit#さようなら。","Quit") -- stock "quit" icon 

The stock icon (or image file) is first, followed by a pound sign (#) and then the caption.

 btn = create(GtkButton,"~/demos/thumbnails/mongoose.png#さようなら。","Quit") -- image from file 

There's also a way to change captions using an .ini file, which means a single program can change languages without changes to the source code. Users can modify the captions to their favorite languages very easily. Example:

-- Μετάφραση από την Google 
 
--! MainWindow.title = Δοκιμή αριθμού προγράμματος 3 
--! MainWindow.border = 10 
 
+ MainWindow.HelpCaption = Βοήθεια 
+ MainWindow.HelpTitle = Σχετικά με αυτό το πρόγραμμα 
+ MainWindow.HelpText = Δεν υπάρχει τίποτα να πει κανείς, | είναι απλά ένα πρόγραμμα, ok? 
If they run your program without an .ini, your program reverts to english. You can have more than one .ini, one for each language.

See /demos/examples/misc/multi.ex

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu