require 'gettext'

class Person
  include GetText
  def initialize(name, age, children_num)
    @name, @age, @children_num = name, age, children_num
    bindtextdomain("myapp")
  end
  def show
    puts _("Information")
    puts _("Name: %{name}, Age: %{age}") % {:name => @name, :age =>
@age}
    puts n_("%{name} has a child.", "%{name} has %{num} children.",
             @children_num) % {:name => @name, :num => @children_num}
  end
end

john = Person.new("John", 25, 1)
john.show
linda = Person.new("Linda", 30, 3)
linda.show

