How Translated Tweets Work?

Twitter has recently added a helpful translation feature to help you understand the text of tweets that are not written in your native language. The language translation feature is internally powered by the Bing Translator.

If you would like to give it a try, go to @MuhammadMorsi’s Twitter page, expand any tweet and click “View Translation.” Twitter will translate the tweet from Arabic to your language.

translated tweets

How Twitter Translates Tweets

Internally, when you click the Translate link, Twitter makes a simple http request with the ID of that particular tweet and the destination language (in our case, English). The response, in JSON, contains the translated text.

https://twitter.com/i/translations/show.json?dest=**<LANG>**&id=**<TWEET_ID>**

Twitter has rolled out the translation feature to select accounts but you can actually make translation requests for any tweet as long as the Twitter account is public.

For instance, if you wish to translate this tweet (ID: 344115057778642945) from English (en) to, say, German (de), the request would be:

https://twitter.com/i/translations/show.json?dest=de&id=344115057778642945

or, for Italian, we will just change the destination language parameter from fr to it:

https://twitter.com/i/translations/show.json?dest=it&id=344115057778642945

The language translation requests in Twitter require no authentication and developers can easily build simple apps around this feature. For instance, you may offer RSS feeds for Twitter translated in different languages. Or a Twitter bot that cross-posts your regular tweets but in another language.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.