[TYPO3-mvc] Localized email templates
Pankaj Lele
pankaj at lelesys.com
Wed Oct 5 11:11:37 CEST 2011
> I have a question about best practice in localizing email templates.
> I have one simple fluid template, containing some labels which are
> translated through locallang.xml.
> Now I want to make this template more fancy - add some links, pictures,
> etc...
> So it's getting more complicated to translate it this way.
> The solution I have in mind is to use a separate fluid template for
> every language.
> But, maybe somebody knows better approach ?
So far I have created mail templates only plain text. In this case I
have a Fluid template MyMail.txt and in this template file I just have a
<f:translate
key="LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:myMailBody"
arguments="{0:'Pankaj', 1:'Lele'}" htmlEscape="FALSE" /> and in the
locallang.xml for the myMailBody key I have the full text I wanted to
send as e-mail body. e.g.
"Hello %s %s,
This is test e-mail.
Team.
"
And then just translate the text from the locallang.xml.
This approach works very well when you have only plain text e-mails. Not
sure about html mails though. But maybe from this you can get some idea :)
--
With best regards,
Pankaj Lele
---------------------------
CTO & Executive Director
Lelesys Infotech Pvt. Ltd.
Pune/Goa, India
Web: http://www.lelesys.com
[Certified TYPO3 Integrator]
More information about the TYPO3-project-typo3v4mvc
mailing list