I have a Mongoid field that’s localized, achieved via:
field :name, localize: true
It has both a en version and a de version. Is there a way I can output both locals on the same View? Something like this in HAML, but displaying en and de versions.
= user.name
You can get and set all the translations at once by using the corresponding _translations method.
You can do this for each language in config.i18n.available_locales = [:de, :en] :
or just:
It’s described there http://mongoid.org/en/mongoid/docs/documents.html#localized_fields