ruby on rails - how does globalize3 actually work? -
well, in process of internationalising current project english , chinese. works flawless far static content i18n gem.
now installed globalize3 translate products, or, more precise, allow end-user (shop manager) translate products while created.
unfortunately documentation little short globalize3, dont know how go it.
i have now
class product < activerecord::base translates :title, :subtitle, :description, :fallbacks_for_empty_translations => true #... end
and created product_translations table through migration.
i played around in console bit, cause thought can like:
prods = product.all p = prods.first p.title # works p.title_en # doesn't work
i know going switch i18n.locale, question how add translations product_translations table. in same form when creating new product or editing. hints? thx...
solved using batch_translations
Comments
Post a Comment