I am using Ruby on Rails 3.1 and I would like to know how to correctly handle internationalization related to partial template files. That is, ...
... in my app/vi
app/vi
I wrote this. What do you think about it?
def translate_for_partials key, *args I18n.t("#{params[:controller].gsub('/', '.')}.#{params[:action]}.#{key}", *args) end
Is that bad to make such a method ?