Closed fabianoarruda closed 10 years ago
I just create another method, i.e.
def state_label
I18n.t "models.<model name>.#{current_state}"
end
The put your translations directly into your yml file under, i.e. for a model post in the en.yml file:
...
en:
models:
post:
draft: "Draft"
published: "Published"
...
I would also suggest creating a separate method as suggested by @miletbaker
Is that possible? My ideia is that you could have a .yml file with the translations of the states and events of a given model, then I could call it on my views... something like:
What do you guys think?