MultiLingual Email template with grails
I am trying to send emails from grails and the mail template should be
multilingual.
I found that we can render GSP as a string or even in the grails mail
plugin we can render the GSP.
In the GSP now I read the static messages from messages.properties
assuming that I would define for each languages and my emails would go
multi lingual.
Now here is the problem that I am facing
In the template the language is always set to en_US. I am using the below
API to get the string of the template. I am not using mail plugin directly
as I need to store the send message as string into the database as well
def contents =
groovyPageRenderer.render(template:"/layouts/emailparse",
model:[mailObj: mailObj])
I also read on other post on forum about setting the language using lang
parameter but still the language is set to en_US only.
Would the above method call support specifying language? Is there an
option to use velocity template to do this kind of multilingual mails?
No comments:
Post a Comment