I'm building a web application that needs to send a confirmation email at the end of the registration process. The text of the email should be localized.
What I initially did was to build the email on the client-side, but I don't really like the idea of all this data going from the client to the server. Also, one could access the javascript code and hack the message.
If I build the email on the server side I will loose the localization.
What is the best approach in this case?
EDIT: My question is not really about using i18n on the server side, but if it's correct to build the email on the client side.