Re: [tutor] ã“ã‚“ã«ã¡ã¯ä¸–界。 "Hello World"
- Posted by irv Feb 26, 2019
- 2248 views
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

