【问题标题】:Who can I localize text inside resque job?谁可以在 resque 作业中本地化文本?
【发布时间】:2012-05-01 14:08:22
【问题描述】:

我想在 resque 工作中使用 i8ng?有可能吗?

【问题讨论】:

    标签: ruby internationalization resque


    【解决方案1】:

    是的,您应该可以访问 resque 作业中的整个 rails 堆栈。

    如果没有,您总是可以手动完成:

       require 'i8ln'
       config = YAML.load_file("#{Rails.root}/config/locales/en.yml")
       ...
       ...
    

    【讨论】:

      猜你喜欢
      • 2013-12-05
      • 2011-09-24
      • 1970-01-01
      • 1970-01-01
      • 2014-02-25
      • 1970-01-01
      • 2011-12-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多