tags:

views:

37

answers:

1

I have a custom magento sales module. I want to translate the custom mail template located in my local module folder(mailtemplate/template1.html). I copied it from the locale/en_US/template/email/sales folder.

I want to replace the placeholders with the customername and telephone number. And translate the message according to the customers country.

Also wanted to check if the telephone number has international country code and add the code, if not present, according to the customers country.

How do i translate text in magento.

A: 

To translate an email, you can copy it from the en_US folder to a corresponding language folder (es_ES, for example), then perform the translation. When you do this, you can also add or remove other vars from the email. Most emails will have headers that show you what vars are available.

As for adding a country code to the telephone number, you will need to define a new block in a module that will do this for you.

Joseph Mastey