I’m using the i18n api in my pet project and ran into a little problem: I need to use the “t” method in models and controllers, but I couldn’t since “t” is for views.
I thought about including the views modules where needed, which is very ugly. But, Ryan Bates showed me the solution: If you’re outside the view, call “I18n.translate”.
Advertisement