Sha256: 9639914b59037b22d770e464b6e528898b99b7035850beff3d7666fef9eab54f

Contents?: true

Size: 428 Bytes

Versions: 14

Compression:

Stored size: 428 Bytes

Contents

#!/usr/bin/ruby
# hello2.po - sample for _() and module
#
# Copyright (C) 2002-2004 Masao Mutoh
# This file is distributed under the same license as Ruby-GetText-Package.

require 'gettext'

module Hello
  include GetText

  bindtextdomain("hello2", "locale")

  module_function
  def hello
    num = 1
    puts _("One is %{num}\n") % {:num => num}
    puts _("Hello %{world}\n") % {:world => _("World")}
  end
end

Hello.hello

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gettext-1.10.0-mswin32 samples/hello2.rb
gettext-1.9.0-mswin32 samples/hello2.rb
gettext-1.8.0-mswin32 samples/hello2.rb
gettext-1.7.0-mswin32 samples/hello2.rb
gettext-1.6.0-mswin32 samples/hello2.rb
gettext-1.10.0 samples/hello2.rb
gettext-1.8.0 samples/hello2.rb
gettext-1.7.0 samples/hello2.rb
gettext-1.6.0 samples/hello2.rb
gettext-1.91.0 samples/hello2.rb
gettext-1.9.0 samples/hello2.rb
gettext-1.90.0 samples/hello2.rb
gettext-1.92.0 samples/hello2.rb
gettext-1.93.0 samples/hello2.rb