Sha256: 9c33ba315ac2bf20360376b77185fff6bb0303efe2b1d813283ad11fa0a9948f

Contents?: true

Size: 336 Bytes

Versions: 4

Compression:

Stored size: 336 Bytes

Contents

class String
  # Special string translations
  #
  # == Usage
  #
  #   I18n.locale = :pl
  #   "Some string to translate".translate # => Jakis tekst do przetlumaczenia
  def translate(options={})
    I18n.gettext(self, options)
  end
  
  # Shortcuts for #translate
  alias_method :gettext, :translate
  alias_method :t, :translate
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kriss-gettext_i18n-0.2.0 lib/ruby/string.rb
kriss-gettext_i18n-0.2.1 lib/ruby/string.rb
kriss-gettext_i18n-0.2.2 lib/ruby/string.rb
kriss-gettext_i18n-0.2.3 lib/ruby/string.rb