How to Use Email Template Based on the Selected Language in Website that Created with PHPMaker 8.0.3

If you create the multi language website application using PHPMaker, then you will find that by default your web site will send an email using the English email template to the user regarding the event your user have just done, even the user has selected non English language before. This could be happened since PHPMaker has not handled the email templates that support for multilanguage, yet. So we will handle this situation by customizing the generated files that using those email templates.

For example, your site supports for English and Indonesian languages. When your user select Indonesian, and the user forgot the password, then they will request or reset the password, afterwards that site will send the password to the user’s email using the English email template. This also can be happened for the other event such as registration and change password. Of course, this is not the proper condition we want. That site should send an email in Indonesian (not in English) since that user has selected the Indonesian language before asked for the password.

So, this customization below will solve the problem. After implementing it, then your user will get an email content based on the selected language they chosen. If they chose English, then they will get emails in English. If they chose Indonesian, then they will get emails in Indonesian. This will more make sense. Generally, this email template are needed for registration, forgot password, and change password process. If you implement the audit trail in your site, then you should also do the same modification to all the generated files regarding this audit trail process.

Please Login or register to read the rest of this content.

Speak Your Mind

s2Member®