【问题标题】:Not translated model parameter未翻译模型参数
【发布时间】:2013-07-27 17:25:11
【问题描述】:

摘自我的 config/locales/models/de.yml:

de:
  activerecord:
    attributes:
      guestbook:
        message: Nachricht

数据库中的确切含义是messages,只是验证错误的message而不是“Nachricht”写成“Messages”。有什么问题?

【问题讨论】:

    标签: ruby-on-rails internationalization rails-i18n


    【解决方案1】:

    确保您在 config/application.rb 中设置了以下内容:

    config.i18n.default_locale = :de
    

    【讨论】:

    • 我真的在使用它。其他一切都有效。没有完全翻译。
    猜你喜欢
    • 2013-05-01
    • 2020-11-05
    • 2013-09-19
    • 2015-06-03
    • 2013-09-16
    • 2018-06-16
    • 2020-10-09
    • 2015-06-26
    • 1970-01-01
    相关资源
    最近更新 更多