eumandy/eugtk/examples/test68.ex
2016-11-25 00:33:18 -07:00

38 lines
814 B
Elixir

---------------------------------------------------------------
--# Locale
---------------------------------------------------------------
include GtkEngine.e
-- following only works if you have spanish language installed;
include std/locale.e
locale:set("es_MX.UTF-8")
constant docs = `<u><b>Locale</b></u>
the button captions will change to español
if a spanish language locale is installed.
`
constant win = create(GtkWindow,"size=300x100,position=1,$destroy=Quit")
constant panel = create(GtkBox,"border_width=10,orientation=1")
gtk:add(win,panel)
constant lbl = create(GtkLabel,{{"markup",docs}})
gtk:add(panel,lbl)
constant box = create(GtkButtonBox)
pack(panel,-box)
gtk:add(box,{
create(GtkButton,"gtk-quit","Quit"),
create(GtkButton,"gtk-ok")})
show_all(win)
main()