Sha256: cca04dff0b5bdc11a3ee7e2a5bf6340de35c046f587f0e98294b36c3e18adb74
Contents?: true
Size: 619 Bytes
Versions: 10
Compression:
Stored size: 619 Bytes
Contents
module Typus module I18n class << self ## # Instead of having to translate strings and defining a default value: # # Typus::I18n.t("Hello World!", :default => 'Hello World!') # # We define this method to define the value only once: # # Typus::I18n.t("Hello World!") # # Note that interpolation still works: # # Typus::I18n.t("Hello %{world}!", :world => @world) # def t(msg, *args) options = args.extract_options! options[:default] = msg ::I18n.t(msg, options) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems