Forum: Rails I18n Organizing translations with I18n::Cascade and I18n::MissingTranslations

402602a60e500e85f2f5dc1ff3648ecb?d=identicon&s=25 Sven Fuchs (Guest)
on 2011-02-13 14:16
(Received via mailing list)
I thought I'd drop you a note that I've written up a few things about
what tools we are using to organize translations at work. I get asked
these questions a lot so maybe it makes sense to spam the list with this

What other techniques/conventions do people apply?

Comments welcome!
05c3f39db309047f28628a223a757bec?d=identicon&s=25 Hans Marmolin (marmolin)
on 2011-02-13 15:52
(Received via mailing list)
These advices are really good. I myself made the mistake to aim for
DRY .yml files

I have an addition to the string class .to_local(key) that allows me
to use my own coventions for key and that works really good
For example I have one enumeration.class.variable for enumerations and
one key models and one key controllers etc
Ialso have one key views to be DRY but I will now change that to the
deafults in Rails 3 (i.e controller.view.word)

I also use a set of common flash messages for the common actions
(sucess and failure)
Finally I use a method that stores translations of flash messages as
flash.controller.action.flash_key (ie. error_1,error_2..., success,
warning etc)
Hans Marmolin
St: Larsgatan 50, 58224 Linkping, Sweden
Phone: +46708371202

13 feb 2011 kl. 14.15 skrev Sven Fuchs:
This topic is locked and can not be replied to.