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