Sha256: 5e745ace95868c328519e88d06e787f526182030790722314686dc236533dd30

Contents?: true

Size: 548 Bytes

Versions: 18

Compression:

Stored size: 548 Bytes

Contents

#!/usr/bin/ruby
# hello_gtk2.rb - sample for Ruby/GTK2
#
# Copyright (C) 2001-2006 Masao Mutoh
# This file is distributed under the same license as Ruby-GetText-Package.

require 'rubygems'
require 'gettext'
require 'gtk2'

class LocalizedWindow < Gtk::Window
  include GetText

  bindtextdomain("hello_gtk", :path => "locale", :output_charset => "utf-8") 

  def initialize
    super
    signal_connect('delete-event') do
      Gtk.main_quit
    end

    add(Gtk::Label.new(_("hello, gtk world")))
  end
end

LocalizedWindow.new.show_all
Gtk.main

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
experteer-gettext-2.0.4.1 samples/hello_gtk2.rb
experteer-gettext-2.0.4.2 samples/hello_gtk2.rb
experteer-gettext-2.0.4 samples/hello_gtk2.rb
grosser-gettext-2.0.0 samples/hello_gtk2.rb
fair-gettext-2.0.7 samples/hello_gtk2.rb
fair-gettext-2.0.6 samples/hello_gtk2.rb
fair-gettext-2.0.5 samples/hello_gtk2.rb
fair-gettext-2.0.4 samples/hello_gtk2.rb
fair-gettext-2.0.3 samples/hello_gtk2.rb
fair-gettext-2.0.2 samples/hello_gtk2.rb
fair-gettext-2.0.1 samples/hello_gtk2.rb
fair-gettext-2.0.0 samples/hello_gtk2.rb
gettext-2.1.0 samples/hello_gtk2.rb
gettext-2.0.0 samples/hello_gtk2.rb
gettext-2.0.1 samples/hello_gtk2.rb
gettext-2.0.2 samples/hello_gtk2.rb
gettext-2.0.4 samples/hello_gtk2.rb
gettext-2.0.3 samples/hello_gtk2.rb