I’m coding a web application with Symfony 1.4 with SwitftMailer for the emails. My site will be available in several languages depending on the connected user.
I have already created a mail class that call partials templates (get_partial) using the __(‘some text’) messages.
That works fine : Symfony translate automatically the partial with the user culture and the mail is sent with the culture of the current user.
My problem is that I would like to send an email to a user who is not the current user so the culture of the email have to be different.
I thought to change the current user culture before getting the partial and restore it after but it’s not the cleanest way…
Thank you for your help.
Sandrino
Thanks for your help.
Meanwhile, I found another simple solution that I found in the symfony documentation.
Hope that could help someone else !