Jan
Jan

Reputation: 3124

Mongoid::Document label localization

How do I localize form labels for Mongoid::Document objects?

For ActiveRecord and ActiveModel, I put these in my somelang.yml:

activerecord:
  attributes:
    user:
      name: "Foo"
activemodel:
  attributes:
    user:
      name: "Bar"

For Mongoid and localization I only find information about localizing attribute content, not attribute names (label).

Upvotes: 0

Views: 151

Answers (1)

Jan
Jan

Reputation: 3124

This works for me:

mongoid:
  attributes:
    user:
      name: "Nombre Schmombre"

Upvotes: 1

Related Questions