Saturday, September 21, 2013

Subscribe to Foreign Blogs in your Native Language with Google Scripts

Han Han is the world’s most popular blogger but am not subscribed to his RSS feed as the content is written in Chinese. Earlier, some web apps did allow you to subscribe to foreign-language RSS feeds but ever since Google Translation API turned into a premium service, most of them have shut shop.
Google Translate for RSS Feeds
This is the Digital Inspiration RSS feed, automatically translated to French language.

Build your own RSS Feed Translation Service

You can build your own feed translation service using Google Scripts in less than a minute. This offers a few advantages:
  1. You can easily subscribe to foreign-language RSS feeds and they’ll display content translated in your native language. For instance, here’s Han Han’s blog feed translated to English.
  2. You can offer your blog’s RSS feed is multiple languages and thus reach a wider audience. For instance, the default RSS feed of Digital Inspiration is in English but, thanks to Google Scripts, you can also subscribe to the feed in FrançaisGermanHindiArabicEspañol or any other language supported by Google Translate.
  3. Google Reader does include feed translation but the issue is that quite a few of us are using apps like Flipboard, Reeder, Feedly, etc. to keep up with feeds and none of them really offer language translation.

How to Translate Foreign-language RSS Feeds

Now that you have a good idea of what we are trying to achieve, let’s see the script in action.
  1. Open the Google Script and choose File -> Make a copy to create a personal copy of that feed translation script into your Google Drive.
  2. Replace the source language (line #4), the target language (line #7) and the RSS feed URL (line #10) with your own values.
  3. Go to File -> Manage Versions and choose Save a new version. You may leave the description field blank.
  4. Go to Publish -> Deploy as Web App, choose “Anyone, even Anonymous” under “Who can access the app” and click the Deploy button.
Google Script will now offer you a link to the web app. That’s actually the new URL of the translated RSS feed which you can directly subscribe in Google Reader or any other news reader app like Reeder, Flipboard, etc.
If you wish to translate another RSS feed, or offer the same feed but in another language, just go back to step #1.
Google Translate API is now a paid service but if you access the same through Google Scripts, which we have done in this case, there isn’t any fee involved.

0 comments:

Post a Comment