I am using devem gem and want to translate a confirmation email. I already have my own template and overridden mail method:
class LocalizedDeviseMailer < Devise::Mailer def confirmation_instructions(record, locale) @locale = locale super end end
So, in my template, I can do something like this:
I18n.locale = @locale
And then:
t("it.really.works")
But I donβt know how to pass my language variable to the mailer method. What is the best way to do this? Any help would be appreciated.
ruby ruby-on-rails internationalization devise actionmailer
zachar
source share