Sha256: 08aba9306aa0bb251a81eb2ee693c1da8953f2996c7331421eacd7c4fb042f1f
Contents?: true
Size: 667 Bytes
Versions: 11
Compression:
Stored size: 667 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 def default_locale :en end end end end
Version data entries
11 entries across 11 versions & 1 rubygems