I want to translate the custom mail And translate the message according to the customers country. In magneto please tell me if anybody did this or is their any script for the simple php? Thanks in advance
Basically what you want is a program that will translate a block of text into another language, make the result sound fairly sane, and be something you can add to your website. Write that and you'll be the next Bill Gates. It doesn't exist, and probably won't for a long time. Other than sending the text to a translation site, like Alta Vista or Babylon, and scraping the result, you can't do it if you're generating random text. If you have a limited number of texts, just translate them to all the languages you're going to handle, then store each one as a separate file and use one of those files as the text of the email - triggered by which email and which language has to be sent. You could easily write a program that translates each word, but the result will probably kill some of your recipients from laughter. Write a short paragraph, translate it to some other language using a translation site, then translate that back into the original language. These sites are pretty good, but sometimes, when you do a double translation, the results are pretty funny. The classic was "The spirit is willing, but the flesh is weak" translated from English to Russian, then back to English. The result was "The vodka is strong, but the meat is rotten". Machine translation is better these days (Babylon just drops the second "the"), but sometimes ...
You could make a plugin that uses the Google Translate API and this would avoid scraping, but as Rukbat mentioned the end result can be strange, funny, or just plain confusing.