You can do that with the translator API, however word-for-word translations are usually less accurate than phrase or sentence based ones.
For example, consider the English "Good Morning", which in Japanese is:
And then the English "Good" which in Japanese is:
|
良い
You'll see that the word 'Good' translates completely differently between 'Good' and 'Good Morning'.
Another option is to use the Microsoft Translator Widget, if you are doing this for a website. The widget, post translation, allows the user to hover over words and phrases to see the original text. Details of how to add it (it's cut and paste code) are
at http://www.microsofttranslator.com/widget.
|