twtlang v. 0.1

twtlang: A Twitter and Google powered translator.

Get a translation in minutes:

  • Follow the @twtlang account.
  • Mention @twtlang, type a phrase in double quotes, then pick a language. Like this: @twtlang "We're cooking with fire now." fr
  • Get the translation in 5 minutes or less in a Direct Message: Nous sommes maintenant de cuisson avec le feu.
  • Tack an @ symbol on the end to get the translation as an @reply instead of a Direct Message.
It works pretty much the same way, on the front end, as my Twitter definition service, twtdict, does. Also, like twtdict, if the definition is longer than 140 characters, you'll get two (or more) tweets with the full translation. If you don't have a smart phone and do all your tweeting through SMS, you probably want to set your account to send direct messages as texts to your phone. Here is a good place to go for more information on that.

What languages are supported?

Any language supported by the Google Translate service can be used for translations by twtlang:

AFRIKAANS : af ALBANIAN : sq AMHARIC : am ARABIC : ar
ARMENIAN : hy AZERBAIJANI : az BASQUE : eu BELARUSIAN : be
BENGALI : bn BIHARI : bh BULGARIAN : bg BURMESE : my
CATALAN : ca CHEROKEE : chr CHINESE : zh CHINESE_SIMPLIFIED : zh-CN
CHINESE_TRADITIONAL : zh-TW CROATIAN : hr CZECH : cs DANISH : da
DHIVEHI : dv DUTCH : nl ENGLISH : en ESTONIAN : et
FILIPINO : tl FINNISH : fi FRENCH : fr GALICIAN : gl
GEORGIAN : ka GERMAN : de GREEK : el GUARANI : gn
GUJARATI : gu HEBREW : iw HINDI : hi HUNGARIAN : hu
ICELANDIC : is INDONESIAN : id INUKTITUT : iu IRISH : ga
ITALIAN : it JAPANESE : ja KANNADA : kn KAZAKH : kk
KHMER : km KOREAN : ko KURDISH : ku KYRGYZ : ky
LAOTHIAN : lo LATVIAN : lv LITHUANIAN : lt MACEDONIAN : mk
MALAY : ms MALAYALAM : ml MALTESE : mt MARATHI : mr
MONGOLIAN : mn NEPALI : ne NORWEGIAN : no ORIYA : or
PASHTO : ps PERSIAN : fa POLISH : pl PORTUGUESE : pt-PT
PUNJABI : pa ROMANIAN : ro RUSSIAN : ru SANSKRIT : sa
SERBIAN : sr SINDHI : sd SINHALESE : si SLOVAK : sk
SLOVENIAN : sl SPANISH : es SWAHILI : sw SWEDISH : sv
TAJIK : tg TAMIL : ta TAGALOG : tl TELUGU : te
THAI : th TIBETAN : bo TURKISH : tr UKRAINIAN : uk
URDU : ur UZBEK : uz UIGHUR : ug VIETNAMESE : vi
WELSH : cy YIDDISH : yi    
Now, I haven't personally tested all of these, so there could be some surprises. If you notice anything off, send me an email or @reply me. (Just don't put it in quotes, unless you want it translated.)

Also, a note about how this works. Google will detect what language is being sent. So far it's been right every time, but since I only speak English, it's a bit one-sided. Also, if you get DMs sent to your phone via SMS, some of the languages won't show up. Chinese Simplified does not show up on my Nokia 5230 Nuron at all, but accented letters in French are changed into their plain, unaccented counterparts. This will require some more testing. However, so far, in email and on Twitter.com, the translations have shown up just fine.

Why did you make this?

Well, I don't know, actually. Unlike twtdict, I didn't have a single epiphanous moment when I unexpectedly needed something translated. The idea just kind of popped into my head one day. And here it is.

Technically Speaking

Like twtdict, I pretty much nabbed some existing code and cobbled it together for my own purposes.

I'm only checking for requests every 5 minutes, to limit the number of hits I make to the Twitter API. If this gets popular at all, I'll apply for white-listing by Twitter so I can up the frequency with which I check for mentions. I wasn't able to find anything about rate limits for the Google translation API, so we'll see if that comes up.

PRIVACY POLICY

When using the twtlang service, your Twitter username is not saved in any way. It will only ever be used for DMs and @replies and will never be sold, bartered, traded, auctioned, or loaned to anyone or anything. I hate spam just as much as you do.

© Michael Howland, 2010