How Translated Tweets Work?

H
Published in: Language Translation - Twitter

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.

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: Language Translation - Twitter

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
A
Amit Agarwal

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. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account
G

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube