Sha256: 2c4ba846af6eed6407b211c482ece107de9ca6f277eb02c834cdde1431df37f8

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

if Rails.env.development?
  I18nAttributes.configure do |config|
    # more see https://github.com/svenfuchs/rails-i18n
    config.locales = [:en, :"zh-CN"]

    config.translator = {
      ##if use this, you mast install youdao_fanyi, see https://github.com/vkill/youdao_fanyi
      :"zh-CN" => Proc.new{|str| YoudaoFanyi.t(str).first}

      ##if use this, you mast install and config to_lang, see https://github.com/jimmycuadra/to_lang
      #:"es" => Proc.new{|str| str.translate('es', :from => 'en') }
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_attributes-0.1.6 spec/rails3_0_app/config/initializers/i18n_attributes.rb