lib/i18n_attributes/configuration.rb in i18n_attributes-0.1.4 vs lib/i18n_attributes/configuration.rb in i18n_attributes-0.1.6

- old
+ new

@@ -1,8 +1,26 @@ +#encoding: utf-8 +=begin + I18nAttributes.configure do |config| + # more see https://github.com/svenfuchs/rails-i18n + config.locales = [:en, :"zh-CN"] + + config.translator = { + #you mast install youdao_fanyi, see https://github.com/vkill/youdao_fanyi + :"zh-CN" => Proc.new{|str| YoudaoFanyi.t(str).first} + + ##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 + module I18nAttributes Configuration = Struct.new( - :locales + :locales, + :translator ).new( - [:en] + [:en], + {} ) end