Sha256: 1a981d143ff914733c2e53f5adc2ec20b7c9f704d850486105ae483db466ac6d
Contents?: true
Size: 1.09 KB
Versions: 13
Compression:
Stored size: 1.09 KB
Contents
# encoding: utf-8 module Typus module I18n class << self # Instead of having to translate strings and defining a default value to # avoid "missing translation" messages: # # I18n.t("Hello World!", :default => "Hello World!") # # We define a Typus translation method which will set up a default value # for you: (Interpolation still works) # # Typus::I18n.t("Hello World!") # Typus::I18n.t("Hello %{world}!", :world => @world) # def t(key, options = {}) options[:default] ||= key ::I18n.t(key, options) end def default_locale :en end def available_locales { "Brazilian Portuguese" => "pt-BR", "Català" => "ca", "German" => "de", "Greek" => "el", "Italiano" => "it", "English" => "en", "Español" => "es", "Français" => "fr", "Magyar" => "hu", "Portuguese" => "pt-PT", "Russian" => "ru", "中文" => "zh-CN", } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems