manzyuk/google-translate — pull request #3 by cbilson (2013-06-06 05:31:30+00:00)
Title: Option to show phonetic version of source language

When using the google translate website to translate languages such as
Chinese, you get to see the pinyin version of the Chinese
text. [Here's an
example](http://translate.google.com/#en/zh-TW/Bob's%20your%20uncle.)
Notice the text `Bào bó shì nǐ de shūshu.`. This is the pinyin
phonetic transcription of the text above.

I am using google-translate and twittering for emacs to improve my
Chinese, and when I come across a new word it's nice to see how to
pronounce it.

I couldn't seem to find any documentation for the google translate API
being used (all the documentation I found was for some kind of paid
interface,) but I was able to look at the repsone google-translate
gets and see the text I wanted as the third element in each item array.

As a way to get what I wanted, I added an option,
`google-translate-show-phonetic` and when this is true, show the
phonetic text above the translated text, which ends up looking like this:

```text
Translate from Chinese Traditional to English:

@hswtw 靠, 這病症也太嚴重了吧!!!! #啊啊啊怎麼辦啊我! // from web [Taiwan] in reply to hswtw

@Hswtw kào, zhè bìngzhèng yě tài yánzhòngle ba!!!! #A a a zěnme bàn a
wǒ! // From web [Taiwan] in reply to hswtw

@ hswtw rely on, this is too serious illness it ! ! ! ! # ah ah ah ah
how do I ! / / from web [Taiwan] in reply to hswtw
```

If there is a more elegant way to do this I'd be interested in
improving my elisp skills by learning it. Also, any ideas where to find docs for the API?

Thanks!