Hello all,
Here is the scenario:
The site is multilingual as expected using gettext and that works fine. The problem is that when I select a language (E.g German) on the site and I want to send a semi static EMail (using ActionMailer and gettext) to another person which has another language (stored in DB). I am trying to find a way to temporarily set the language to the other persons language so that his/her email is send in that language. And after sending set it back to my language.
I have tried several things already like:
[code] GetText.bindtextdomain('mysite', person.language.name) tmp = cookies[:lang] cookies[:lang] = person.language.name params[:lang] = person.language.name init_gettext [/code]
I have tried the above in all possible combinations before sending the email to the other person but nothing helped.
Any suggestions?
Thanks in advance