agente_secreto
agente_secreto

Reputation: 8079

How to implement i18n / translations for ActiveRecord models?

I am internationalizing my app, and after having translated the interface with the yml locale files, I now want to localize my models. I am using ActiveAdmin so the editors can update content and I would like the solution to be suitable for this.

Is there any way to define some of my model attributes as translatable, so rails generates a migration that creates an extra field for each locale / language? This, or something similar, would be my prefered solution, but I a open to other aproaches.

Upvotes: 0

Views: 676

Answers (2)

Mark Pegasov
Mark Pegasov

Reputation: 5285

You can use globalize3 gem. It's great gem to manage model translations.

Upvotes: 0

Paulo Fidalgo
Paulo Fidalgo

Reputation: 22331

Check this discussion you'll find an approach for the same problem you have.

Upvotes: 1

Related Questions