代码之家  ›  专栏  ›  技术社区  ›  ThoKra

I18N::使用I18N.L的MissingInterpolationArgument

  •  0
  • ThoKra  · 技术社区  · 14 年前

    我得到这个错误 I18n::MissingInterpolationArgument 运行此代码时

    <%= l Date.today, :format => :short %>
    

    它以前起过作用,但现在,在Ubuntu, Rails 2.3.5 Ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] 它不起作用了…

    有人帮忙吗?

    1 回复  |  直到 14 年前
        1
  •  0
  •   ThoKra    14 年前

    好的,我有一个快速修复。不是我想要的那样,但它起作用了

    已将此添加到en.yml文件中

      date:                   
        formats:              
          default: "%d.%m.%Y" 
          short: "%b %e"      
          long: "%e. %B %Y"